class_docstr: Feed-forward block.
  
  Args:
      dim_model (int): input/output dimensionality
      d_ff (int): hidden dimensionality
      dropout (float): the dropout probability
      device: (Optional[torch.device]).
  
  Example::
  
      self.feed_forward = PositionwiseFeedForward(
          dim_model=hidden, d_ff=feed_forward_hidden, dropout=dropout, device=device
      )
class_docstr_tok: ["Feed-forward","block",".","Args",":","dim_model","(","int",")",":","input\/output","dimensionality","d_ff","(","int",")",":","hidden","dimensionality","dropout","(","float",")",":","the","dropout","probability","device",":","(","Optional","[","torch.device","]",")",".","Example",":",":","self.feed_forward","=","PositionwiseFeedForward","(","dim_model=hidden",",","d_ff=feed_forward_hidden",",","dropout=dropout",",","device=device",")"]
docstr: forward function including the first Linear layer, ReLu, Dropout
  and the final Linear layer
  
  Args:
      x (torch.Tensor): the input tensor
  
  Returns:
      torch.Tensor.
docstr_tok: ["forward","function","including","the","first","Linear","layer",",","ReLu",",","Dropout","and","the","final","Linear","layer","Args",":","x","(","torch.Tensor",")",":","the","input","tensor","Returns",":","torch.Tensor","."]
code: def forward(self, x: torch.Tensor) -> torch.Tensor:
      """
      forward function including the first Linear layer, ReLu, Dropout
      and the final Linear layer
  
      Args:
          x (torch.Tensor): the input tensor
  
      Returns:
          torch.Tensor.
      """
      return self.w_2(self.dropout(nn.functional.relu(self.w_1(x))))
  
imports: import copy
  import math
  from typing import Callable, Optional, Tuple
  import torch
  import torch.nn
  from torchrec.modules.embedding_configs import EmbeddingConfig
  from torchrec.modules.embedding_modules import EmbeddingCollection
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
label_desc: Use image node_id 2 for calling the PositionwiseFeedForward obj's underlying member method code with example usage: obj.forward(x) and returns: self