class_docstr: 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
      )
      dense_dim = self.mlp_dim * (
          2 if self.activation_fn == nn.glu else 1
      )
      x = nn.Dense(
          dense_dim,
          dtype=self.dtype,
          use_bias=self.use_bias,
          kernel_init=self.kernel_init,
          bias_init=self.bias_init,
          precision=self.precision,
      )(inputs)
      x = 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.Dropout(rate=self.dropout_rate)(
          output, deterministic=deterministic
      )
      return output
  
imports: from typing import Any, Callable, Optional, Sequence, Tuple
  from absl import logging
  import flax.linen
  import jax
  import jax.numpy
  import ml_collections
  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