class_docstr: ## Feedback Transformer Layer
  
  This implements a single transformer layer in the feedback transformer.
class_docstr_tok: ["#","#","Feedback","Transformer","Layer","This","implements","a","single","transformer","layer","in","the","feedback","transformer","."]
docstr: * `d_model` is the number of features in the transformer
  * `attn` is the feedback attention module
  * `feed_forward` is the position-wise feed forward layer
  * `dropout_prob` is the dropout probability for dropout layers after attention and feed-forward
docstr_tok: ["*","`","d_model","`","is","the","number","of","features","in","the","transformer","*","`","attn","`","is","the","feedback","attention","module","*","`","feed_forward","`","is","the","position-wise","feed","forward","layer","*","`","dropout_prob","`","is","the","dropout","probability","for","dropout","layers","after","attention","and","feed-forward"]
code: def __init__(
      self,
      *,
      d_model: int,
      attn: FeedbackAttention,
      feed_forward: FeedForward,
      dropout_prob: float,
  ):
      """
      * `d_model` is the number of features in the transformer
      * `attn` is the feedback attention module
      * `feed_forward` is the position-wise feed forward layer
      * `dropout_prob` is the dropout probability for dropout layers after attention and feed-forward
      """
      super().__init__()
      # Transformer size $d_{model}$
      self.size = d_model
      #
      self.attn = attn
      self.feed_forward = feed_forward
      self.dropout = nn.Dropout(dropout_prob)
  
      # Normalization layers
      self.norm_self_attn = nn.LayerNorm([d_model])
      self.norm_ff = nn.LayerNorm([d_model])
  
imports: import math
  from typing import Optional
  import torch
  from torch import nn
  from labml_helpers.module import Module
  from labml_nn.transformers.feed_forward import FeedForward
  from labml_nn.transformers.mha import PrepareForMultiHeadAttention
  from labml_nn.utils import clone_module_list
label_desc: Use image node_id 1 to create a new FeedbackTransformerLayer object from inherited base classes: Module with example: obj = FeedbackTransformerLayer()