class_docstr: ### Position-wise Feed Forward Layer $      ext{F\small{FW}}$
  
  This consists of two linear layers and an activation in the middle.
class_docstr_tok: ["#","#","#","Position-wise","Feed","Forward","Layer","$","ext","{","F\\small","{","FW","}","}","$","This","consists","of","two","linear","layers","and","an","activation","in","the","middle","."]
docstr: * `d_model` is the number of features in transformer embeddings
  * `d_ff` is the number features in the hidden layer
docstr_tok: ["*","`","d_model","`","is","the","number","of","features","in","transformer","embeddings","*","`","d_ff","`","is","the","number","features","in","the","hidden","layer"]
code: def __init__(self, d_model: int, d_ff: int):
      """
      * `d_model` is the number of features in transformer embeddings
      * `d_ff` is the number features in the hidden layer
      """
  
      super().__init__()
  
      # The two linear layers
      self.lin1 = nn.Linear(d_model, d_ff)
      self.lin2 = nn.Linear(d_ff, d_model)
  
      # ReLU Activation
      self.act = nn.ReLU()
  
      # Pre-norm layer
      self.norm = nn.LayerNorm(d_model)
  
imports: import math
  from typing import Set
  import torch
  from torch import nn
  from labml.logger import inspect
label_desc: Use image node_id 1 to create a new FeedForward object from inherited base classes: nn with example: obj = FeedForward(d_model, d_ff)