class_docstr: A Multi-Layer Perceptron (MLP) module.
  
  Args:
      num_input_dims (int): Number of input dimensions.
      num_output_dims (int): Number of output dimensions.
      num_hidden_dims (int): Number of hidden dimensions.
      num_layers (int): Number of layers in the MLP.
      bias (bool): If True, enables the bias in Linear layers. Default is True.
      block (BlockBuilder): A callable or class for constructing a block. Default is None.
class_docstr_tok: ["A","Multi-Layer","Perceptron","(","MLP",")","module",".","Args",":","num_input_dims","(","int",")",":","Number","of","input","dimensions",".","num_output_dims","(","int",")",":","Number","of","output","dimensions",".","num_hidden_dims","(","int",")",":","Number","of","hidden","dimensions",".","num_layers","(","int",")",":","Number","of","layers","in","the","MLP",".","bias","(","bool",")",":","If","True",",","enables","the","bias","in","Linear","layers",".","Default","is","True",".","block","(","BlockBuilder",")",":","A","callable","or","class","for","constructing","a","block",".","Default","is","None","."]
docstr: Build a single layer for the MLP.
  
  Args:
      num_input_dims (int): Number of input dimensions.
      num_output_dims (int): Number of output dimensions.
      bias (bool): If True, enables the bias in Linear layers. Default is True.
      block_builder (BlockBuilder): A callable or class for constructing a block. Default is None.
  
  Returns:
      List[nn.Module]: A list containing the layer's modules.
docstr_tok: ["Build","a","single","layer","for","the","MLP",".","Args",":","num_input_dims","(","int",")",":","Number","of","input","dimensions",".","num_output_dims","(","int",")",":","Number","of","output","dimensions",".","bias","(","bool",")",":","If","True",",","enables","the","bias","in","Linear","layers",".","Default","is","True",".","block_builder","(","BlockBuilder",")",":","A","callable","or","class","for","constructing","a","block",".","Default","is","None",".","Returns",":","List","[","nn.Module","]",":","A","list","containing","the","layer","'s","modules","."]
code: def build_layer(
      num_input_dims: int,
      num_output_dims: int,
      bias: bool = True,
      block_builder: BlockBuilder = None,
  ) -> List[nn.Module]:
      """
      Build a single layer for the MLP.
  
      Args:
          num_input_dims (int): Number of input dimensions.
          num_output_dims (int): Number of output dimensions.
          bias (bool): If True, enables the bias in Linear layers. Default is True.
          block_builder (BlockBuilder): A callable or class for constructing a block. Default is None.
  
      Returns:
          List[nn.Module]: A list containing the layer's modules.
      """
      if block_builder is None:
          return [
              nn.Linear(num_input_dims, num_output_dims, bias=bias),
              nn.ReLU(inplace=True),
          ]
      else:
          return [
              block_builder(num_input_dims, num_output_dims, bias=bias)
          ]
  
file_path: NeMo/nemo/collections/multimodal/modules/nerf/geometry/layers.py
imports: from typing import Callable, List, Type, Union
  import torch
  import torch.nn
label_desc: Use image node_id 3 for calling the MLP obj's underlying member method code with example usage: obj.build_layer(num_input_dims, num_output_dims, bias, block_builder) and returns: list, list