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",")"]
code: def __init__(
      self,
      dim_model: int,
      d_ff: int,
      dropout: float = 0.1,
      device: Optional[torch.device] = None,
  ) -> None:
      super().__init__()
      self.w_1 = nn.Linear(dim_model, d_ff, device=device)
      self.w_2 = nn.Linear(d_ff, dim_model, device=device)
      self.dropout = nn.Dropout(dropout)
  
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 1 to create a new PositionwiseFeedForward object from inherited base classes: nn with example: obj = PositionwiseFeedForward(dim_model, d_ff, dropout, device)