class_docstr: Transformer MLP / feed-forward block.
  
  Args:
    config: TransformerConfig dataclass containing hyperparameters.
    out_dim: optionally specify out dimension.
docstr: Applies Transformer MlpBlock module.
docstr_tok: ["Applies","Transformer","MlpBlock","module","."]
code: def __call__(self, inputs):
      """Applies Transformer MlpBlock module."""
      config = self.config
      actual_out_dim = (
          inputs.shape[-1] if self.out_dim is None else self.out_dim
      )
      x = nn.Dense(
          config.mlp_dim,
          dtype=config.dtype,
          kernel_init=nn.with_logical_partitioning(
              config.kernel_init, ("embed", "mlp")
          ),
          bias_init=nn.with_logical_partitioning(
              config.bias_init, ("mlp",)
          ),
      )(inputs)
      x = nn.relu(x)
      x = nn.Dropout(rate=config.dropout_rate)(
          x, deterministic=config.deterministic
      )
      output = nn.Dense(
          actual_out_dim,
          dtype=config.dtype,
          kernel_init=nn.with_logical_partitioning(
              config.kernel_init, ("mlp", "embed")
          ),
          bias_init=nn.with_logical_partitioning(
              config.bias_init, ("embed",)
          ),
      )(x)
      output = nn.Dropout(rate=config.dropout_rate)(
          output, deterministic=config.deterministic
      )
      return output
  
imports: from typing import Callable, Any, Optional
  from flax import linen
  from flax import struct
  from jax import lax
  import jax.numpy
  import numpy
label_desc: Use image node_id 1 for calling the MlpBlock obj's underlying member method code with example usage: obj.__call__(inputs) and returns: output