class_docstr: Transformer MLP / feed-forward block.
class_docstr_tok: ["Transformer","MLP","\/","feed-forward","block","."]
docstr: Applies Transformer MlpBlock model.
code: def __call__(
      self, inputs: jnp.ndarray, *, deterministic: bool = True
  ) -> jnp.ndarray:
      """Applies Transformer MlpBlock model."""
      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,
          kernel_init=self.kernel_init,
          bias_init=self.bias_init,
      )(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,
          kernel_init=self.kernel_init,
          bias_init=self.bias_init,
      )(x)
      output = nn.Dropout(rate=self.dropout_rate)(
          output, deterministic=deterministic
      )
      return output
  
imports: import functools
  from typing import Any, Callable, Dict, Tuple, Optional
  import flax.linen
  import jax
  from jax.nn import initializers
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.model_lib.layers import attention_layers
  from scenic.projects.baselines import resnet
  from scenic.projects.baselines.detr import detr_base_model
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