docstr: This function takes per-point `features` predicted by `self.mlp_xyz`
  and evaluates the color model in order to attach to each
  point a 3D vector of its RGB color.
docstr_tok: ["This","function","takes","per-point","`","features","`","predicted","by","`","self.mlp_xyz","`","and","evaluates","the","color","model","in","order","to","attach","to","each","point","a","3D","vector","of","its","RGB","color","."]
code: def _get_colors(
      self, features: torch.Tensor, rays_directions: torch.Tensor
  ) -> torch.Tensor:
      """
      This function takes per-point `features` predicted by `self.mlp_xyz`
      and evaluates the color model in order to attach to each
      point a 3D vector of its RGB color.
      """
      # Normalize the ray_directions to unit l2 norm.
      rays_directions_normed = torch.nn.functional.normalize(
          rays_directions, dim=-1
      )
  
      # Obtain the harmonic embedding of the normalized ray directions.
      rays_embedding = self.harmonic_embedding_dir(
          rays_directions_normed
      )
  
      return self.color_layer(
          (self.intermediate_linear(features), rays_embedding)
      )
  
file_path: pytorch3d/projects/nerf/nerf/implicit_function.py
imports: from typing import Tuple
  import torch
  from pytorch3d.common.linear_with_repeat import LinearWithRepeat
  from pytorch3d.renderer import HarmonicEmbedding, ray_bundle_to_ray_points, RayBundle
label_desc: Use image node_id 3 for calling the NeuralRadianceField obj's underlying member method code with example usage: obj._get_colors(features, rays_directions) and returns: self