class_docstr: A multi-layer perceptron with N dense layers.
  
  All layers (except for an optional additional extra output layer) share the same
  activation function, bias setup (use bias or not), and LayerNorm setup
  (use layer normalization or not).
  
  If `output_dim` (int) is not None, an additional, extra output dense layer is added,
  which might have its own activation function (e.g. "linear"). However, the output
  layer does NOT use layer normalization.
class_docstr_tok: ["A","multi-layer","perceptron","with","N","dense","layers",".","All","layers","(","except","for","an","optional","additional","extra","output","layer",")","share","the","same","activation","function",",","bias","setup","(","use","bias","or","not",")",",","and","LayerNorm","setup","(","use","layer","normalization","or","not",")",".","If","`","output_dim","`","(","int",")","is","not","None",",","an","additional",",","extra","output","dense","layer","is","added",",","which","might","have","its","own","activation","function","(","e.g",".","``","linear","''",")",".","However",",","the","output","layer","does","NOT","use","layer","normalization","."]
code: def forward(self, x):
      return self.mlp(x.type(self.expected_input_dtype))
  
file_path: ray/python/ray/rllib/core/models/torch/primitives.py
imports: from typing import Callable, Dict, List, Optional, Union, Tuple
  from ray.rllib.core.models.torch.utils import Stride2D
  from ray.rllib.models.torch.misc import same_padding, same_padding_transpose_after_stride, valid_padding
  from ray.rllib.models.utils import get_activation_fn, get_initializer_fn
  from ray.rllib.utils.framework import try_import_torch
label_desc: Use image node_id 2 for calling the TorchMLP obj's underlying member method code with example usage: obj.forward(x) and returns: self