class_docstr: Class to represent a multi-layer perceptron.
  
  The MLP represents a deep NN of fully connected layers.
  The network is build of user defined sub-units, each with a user defined number of layers.
  
  Skip connections span between the sub-units.
  The model follows: Ben Mildenhall et el. (2020) at https://arxiv.org/abs/2003.08934.
docstr: Constructor method.
  
  Args:
      num_dims: Number of input dimensions (channels).
      num_units: Number of sub-units.
      num_unit_layers: Number of fully connected layers in each sub-unit.
      num_hidden: Layer hidden dimensions.
docstr_tok: ["Constructor","method",".","Args",":","num_dims",":","Number","of","input","dimensions","(","channels",")",".","num_units",":","Number","of","sub-units",".","num_unit_layers",":","Number","of","fully","connected","layers","in","each","sub-unit",".","num_hidden",":","Layer","hidden","dimensions","."]
code: def __init__(
      self,
      num_dims: int,
      num_units: int = 2,
      num_unit_layers: int = 4,
      num_hidden: int = 128,
  ) -> None:
      """Constructor method.
  
      Args:
          num_dims: Number of input dimensions (channels).
          num_units: Number of sub-units.
          num_unit_layers: Number of fully connected layers in each sub-unit.
          num_hidden: Layer hidden dimensions.
      """
      super().__init__()
      self._num_unit_layers = num_unit_layers
      layers = []
      for i in range(num_units):
          num_unit_inp_dims = (
              num_dims if i == 0 else num_hidden + num_dims
          )
          for j in range(num_unit_layers):
              num_layer_inp_dims = (
                  num_unit_inp_dims if j == 0 else num_hidden
              )
              layer = nn.Linear(num_layer_inp_dims, num_hidden)
              layers.append(nn.Sequential(layer, nn.ReLU()))
      self._mlp = nn.ModuleList(layers)
  
imports: from __future__ import annotations
  import torch
  from torch import nn
  from torch.nn import functional
  from kornia.core import Module, Tensor
  from kornia.geometry.camera import PinholeCamera
  from kornia.geometry.ray import Ray
  from kornia.nerf.positional_encoder import PositionalEncoder
  from kornia.nerf.samplers import sample_lengths, sample_ray_points
  from kornia.nerf.volume_renderer import IrregularRenderer, RegularRenderer
  from kornia.utils._compat import torch_inference_mode
  from kornia.utils.grid import create_meshgrid
label_desc: Use image node_id 1 to create a new MLP object from inherited base classes: Module with example: obj = MLP(num_dims, num_units, num_unit_layers, num_hidden)