code: def __init__(self, input_dim=3, degree=4):
      super().__init__()
  
      self.input_dim = input_dim  # coord dims, must be 3
      self.degree = degree  # 0 ~ 4
      self.output_dim = degree**2
  
      assert (
          self.input_dim == 3
      ), "SH encoder only support input dim == 3"
      assert (
          self.degree > 0 and self.degree <= 8
      ), "SH encoder only supports degree in [1, 8]"
  
file_path: NeMo/nemo/collections/multimodal/modules/nerf/utils/torch_ngp/shencoder.py
imports: import _shencoder
  import torch
  import torch.nn
  from torch.autograd import Function
  from torch.cuda.amp import custom_bwd, custom_fwd
label_desc: Use image node_id 1 to create a new SHEncoder object from inherited base classes: nn with example: obj = SHEncoder(input_dim, degree)