class_docstr: Transformer MLP / feed-forward block.
class_docstr_tok: ["Transformer","MLP","\/","feed-forward","block","."]
docstr: Applies Transformer MlpBlock module.
docstr_tok: ["Applies","Transformer","MlpBlock","module","."]
code: def __call__(self, inputs: jnp.ndarray, *, deterministic: bool):
      """Applies Transformer MlpBlock module."""
      actual_out_dim = (
          inputs.shape[-1] if self.out_dim is None else self.out_dim
      )
      x = nn.Dense(
          self.mlp_dim,
          dtype=self.dtype,
          use_bias=self.use_bias,
          kernel_init=self.kernel_init,
          bias_init=self.bias_init,
          precision=self.precision,
      )(inputs)
      x = nn_layers.IdentityLayer(name="mlp1")(self.activation_fn(x))
      x = nn.Dropout(rate=self.dropout_rate)(
          x, deterministic=deterministic
      )
      output = nn.Dense(
          actual_out_dim,
          dtype=self.dtype,
          use_bias=self.use_bias,
          kernel_init=self.kernel_init,
          bias_init=self.bias_init,
          precision=self.precision,
      )(x)
      output = nn_layers.IdentityLayer(name="mlp2")(output)
      output = nn.Dropout(rate=self.dropout_rate)(
          output, deterministic=deterministic
      )
      return output
  
imports: import functools
  from typing import Callable, Optional, Sequence, Tuple
  import flax.linen
  import jax
  import jax.numpy
  import numpy
  from scenic.model_lib.layers import nn_layers
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