class_docstr: Transformer MLP / feed-forward block.
  
  Attributes:
    dtype: floating point type used in the layer.
    mlp_dim: hidden dimension of the multilayer perceptron.
    dropout_rate: dropout rate used in the hidden layer.
    kernel_init: weight matrix initializer.
    bias_init: bias vector initializer.
class_docstr_tok: ["Transformer","MLP","\/","feed-forward","block",".","Attributes",":","dtype",":","floating","point","type","used","in","the","layer",".","mlp_dim",":","hidden","dimension","of","the","multilayer","perceptron",".","dropout_rate",":","dropout","rate","used","in","the","hidden","layer",".","kernel_init",":","weight","matrix","initializer",".","bias_init",":","bias","vector","initializer","."]
docstr: Applies Transformer MlpBlock module.
docstr_tok: ["Applies","Transformer","MlpBlock","module","."]
code: def __call__(
      self, inputs: jnp.ndarray, *, train: bool
  ) -> jnp.ndarray:
      """Applies Transformer MlpBlock module."""
      out_dim = inputs.shape[-1]
      x = nn.Dense(
          self.mlp_dim,
          dtype=self.dtype,
          kernel_init=self.kernel_init,
          bias_init=self.bias_init,
      )(inputs)
      x = nn_layers.IdentityLayer(name="gelu")(nn.gelu(x))
      x = nn.Dropout(rate=self.dropout_rate)(x, deterministic=not train)
      output = nn.Dense(
          out_dim,
          dtype=self.dtype,
          kernel_init=self.kernel_init,
          bias_init=self.bias_init,
      )(x)
      output = nn.Dropout(rate=self.dropout_rate)(
          output, deterministic=not train
      )
      return output
  
imports: from typing import Any, Callable, Optional, Sequence, Tuple, Union
  import flax.linen
  import jax
  from jax.nn import initializers
  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