class_docstr: Transformer MLP / feed-forward block.
  
  Attributes:
    config: hyperparameters of the module
    out_dim: optionally specify out dimension.
class_docstr_tok: ["Transformer","MLP","\/","feed-forward","block",".","Attributes",":","config",":","hyperparameters","of","the","module","out_dim",":","optionally","specify","out","dimension","."]
docstr: Applies Transformer MlpBlock module.
docstr_tok: ["Applies","Transformer","MlpBlock","module","."]
code: def __call__(self, inputs, train):
      """Applies Transformer MlpBlock module."""
      cfg = self.config
      actual_out_dim = (
          inputs.shape[-1] if self.out_dim is None else self.out_dim
      )
      x = nn.Dense(
          cfg.mlp_dim,
          dtype=cfg.dtype,
          kernel_init=nn.initializers.xavier_uniform(),
          bias_init=nn.initializers.normal(stddev=1e-6),
      )(inputs)
      x = nn.relu(x)
      x = nn.Dropout(rate=cfg.dropout_rate)(x, deterministic=not train)
      output = nn.Dense(
          actual_out_dim,
          dtype=cfg.dtype,
          kernel_init=nn.initializers.xavier_uniform(),
          bias_init=nn.initializers.normal(stddev=1e-6),
      )(x)
      output = nn.Dropout(rate=cfg.dropout_rate)(
          output, deterministic=not train
      )
      return output
  
imports: from typing import Any, Dict, Optional, Tuple
  from absl import logging
  from flax import linen
  from flax.training import common_utils
  from immutabledict import immutabledict
  import jax
  from jax import lax
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.model_lib.base_models import base_model
  from scenic.model_lib.base_models import model_utils
  from scenic.projects.mbt import model
  from scenic.projects.mbt.model import temporal_encode
label_desc: Use image node_id 1 for calling the MlpBlock obj's underlying member method code with example usage: obj.__call__(inputs, train) and returns: output