class_docstr: NeRF model with Torch-NGP encoding and MLPs for sigma and features.
  
  Args:
      num_input_dims (int): Number of input dimensions.
      bound (torch.Tensor): The bounding box tensor.
      density_activation (DensityActivationEnum): Activation function for density.
      blob_radius (float): Radius for the blob.
      blob_density (float): Density for the blob.
      normal_type (Optional[NormalTypeEnum]): Method to compute normals.
      encoder_type (str): Type of the encoder.
      encoder_max_level (int): Maximum level of the encoder.
      sigma_net_num_output_dims (int): Number of output dimensions for the sigma network.
      sigma_net_cfg (Dict): Configuration for the sigma network.
      features_net_num_output_dims (int): Number of output dimensions for the features network.
      features_net_cfg (Optional[Dict]): Configuration for the features network.
class_docstr_tok: ["NeRF","model","with","Torch-NGP","encoding","and","MLPs","for","sigma","and","features",".","Args",":","num_input_dims","(","int",")",":","Number","of","input","dimensions",".","bound","(","torch.Tensor",")",":","The","bounding","box","tensor",".","density_activation","(","DensityActivationEnum",")",":","Activation","function","for","density",".","blob_radius","(","float",")",":","Radius","for","the","blob",".","blob_density","(","float",")",":","Density","for","the","blob",".","normal_type","(","Optional","[","NormalTypeEnum","]",")",":","Method","to","compute","normals",".","encoder_type","(","str",")",":","Type","of","the","encoder",".","encoder_max_level","(","int",")",":","Maximum","level","of","the","encoder",".","sigma_net_num_output_dims","(","int",")",":","Number","of","output","dimensions","for","the","sigma","network",".","sigma_net_cfg","(","Dict",")",":","Configuration","for","the","sigma","network",".","features_net_num_output_dims","(","int",")",":","Number","of","output","dimensions","for","the","features","network",".","features_net_cfg","(","Optional","[","Dict","]",")",":","Configuration","for","the","features","network","."]
code: def __init__(
      self,
      num_input_dims: int,
      bound: torch.Tensor,
      density_activation: DensityActivationEnum,
      blob_radius: float,
      blob_density: float,
      normal_type: Optional[NormalTypeEnum],
      encoder_cfg: Dict,
      sigma_net_num_output_dims: int,
      sigma_net_cfg: Dict,
      features_net_num_output_dims: int,
      features_net_cfg: Optional[Dict],
  ):
      super().__init__(
          num_input_dims=num_input_dims,
          bound=bound,
          density_activation=density_activation,
          blob_radius=blob_radius,
          blob_density=blob_density,
          normal_type=normal_type,
      )
  
      # Build the Torch-NGP encoder
      self.encoder_max_level = encoder_cfg.get(
          "encoder_max_level", None
      )
      self.encoder, self.encoder_output_dims = get_encoder(
          input_dim=num_input_dims, **encoder_cfg
      )
  
      # Build the sigma network
      assert (
          sigma_net_num_output_dims == 1
      ), "sigma_net_num_output_dims must be equal to 1"
      self.sigma_mlp = MLP(
          num_input_dims=self.encoder_output_dims,
          num_output_dims=sigma_net_num_output_dims,
          num_hidden_dims=sigma_net_cfg.num_hidden_dims,
          num_layers=sigma_net_cfg.num_layers,
          bias=sigma_net_cfg.bias,
      )
  
      # Build the features network
      self.features_mlp = None
      if features_net_cfg is not None:
          self.features_mlp = MLP(
              num_input_dims=self.encoder_output_dims,
              num_output_dims=features_net_num_output_dims,
              num_hidden_dims=features_net_cfg.num_hidden_dims,
              num_layers=features_net_cfg.num_layers,
              bias=features_net_cfg.bias,
          )
  
file_path: NeMo/nemo/collections/multimodal/modules/nerf/geometry/torchngp_nerf.py
imports: from typing import Dict, Optional
  import torch
  from nemo.collections.multimodal.modules.nerf.geometry.layers import MLP
  from nemo.collections.multimodal.modules.nerf.geometry.nerf_base import DensityActivationEnum, NeRFBase, NormalTypeEnum
  from nemo.collections.multimodal.modules.nerf.utils.torch_ngp.encoding import get_encoder
label_desc: Use image node_id 1 to create a new TorchNGPNerf object from inherited base classes: NeRFBase with example: obj = TorchNGPNerf(num_input_dims, bound, density_activation, blob_radius, blob_density, normal_type, encoder_cfg, sigma_net_num_output_dims, sigma_net_cfg, features_net_num_output_dims, features_net_cfg)