docstr: This function takes per-point `features` predicted by `self.xyz_encoder`
  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.xyz_encoder","`","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
  ):
      """
      This function takes per-point `features` predicted by `self.xyz_encoder`
      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)
      )
  
imports: import logging
  from typing import Optional, Tuple
  import torch
  from pytorch3d.common.linear_with_repeat import LinearWithRepeat
  from pytorch3d.implicitron.models.renderer.base import conical_frustum_to_gaussian, ImplicitronRayBundle
  from pytorch3d.implicitron.tools.config import expand_args_fields, registry
  from pytorch3d.renderer.cameras import CamerasBase
  from pytorch3d.renderer.implicit import HarmonicEmbedding
  from pytorch3d.renderer.implicit.utils import ray_bundle_to_ray_points
  from .base import ImplicitFunctionBase
  from .decoding_functions import _xavier_init, MLPWithInputSkips, TransformerWithInputSkips
  from .utils import create_embeddings_for_implicit_function
label_desc: Use image node_id 4 for calling the NeuralRadianceFieldBase obj's underlying member method code with example usage: obj._get_colors(features, rays_directions) and returns: self