code: def _FeedForwardBlock(
      d_model, d_ff, dropout, dropout_shared_axes, mode, activation
  ):
      """Returns a list of layers implementing a feed-forward block.
  
      Args:
        d_model: int:  depth of embedding
        d_ff: int: depth of feed-forward layer
        dropout: float: dropout rate (how much to drop out)
        dropout_shared_axes: list of integers, axes to share dropout mask
        mode: str: 'train' or 'eval'
        activation: the non-linearity in feed-forward layer
  
      Returns:
        A list of layers which maps vectors to vectors.
      """
      dropout = tl.Dropout(
          rate=dropout, shared_axes=dropout_shared_axes, mode=mode
      )
  
      return [
          tl.Dense(d_ff),
          activation(),
          dropout,
          tl.Dense(d_model),
      ]
  
file_path: trax/trax/models/research/rezero.py
imports: from trax import layers
  from trax.fastmath import numpy
label_desc: Use image node_id 9 for calling a global function with example usage: _FeedForwardBlock(d_model, d_ff, dropout, dropout_shared_axes, mode, activation) and returns: list