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,
      matvit_mask: Optional[Any] = None,
  ):
      """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)
  
      if matvit_mask is not None:
          x = nn_layers.IdentityLayer(name="mlp1")(
              self.activation_fn(x * matvit_mask)
          )
      else:
          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: from typing import Any, Callable, Optional, Sequence
  import flax.linen
  import jax
  import jax.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