class_docstr: Original NeRF network.
class_docstr_tok: ["Original","NeRF","network","."]
docstr: Estimate the positional encoding of the 3D position and direction of the samples along a ray.
  
  Args:
    ray_points: A tensor of shape `[A, B, C, 3]` where A is the batch size, B
      is the number of rays, C is the number of samples per ray.
    ray_dirs: A tensor of shape `[A, B, 3]` where A is the batch size, B
    is the number of rays.
  
  Returns:
    A list containing a tensor of shape `[A, B, C, M]` and a tensor of shape
    `[A, B, C, N]`, where M is the dimensionality of the location positional
    encoding and N is dimensionality of the direction positional encoding.
docstr_tok: ["Estimate","the","positional","encoding","of","the","3D","position","and","direction","of","the","samples","along","a","ray",".","Args",":","ray_points",":","A","tensor","of","shape","`","[","A",",","B",",","C",",","3","]","`","where","A","is","the","batch","size",",","B","is","the","number","of","rays",",","C","is","the","number","of","samples","per","ray",".","ray_dirs",":","A","tensor","of","shape","`","[","A",",","B",",","3","]","`","where","A","is","the","batch","size",",","B","is","the","number","of","rays",".","Returns",":","A","list","containing","a","tensor","of","shape","`","[","A",",","B",",","C",",","M","]","`","and","a","tensor","of","shape","`","[","A",",","B",",","C",",","N","]","`",",","where","M","is","the","dimensionality","of","the","location","positional","encoding","and","N","is","dimensionality","of","the","direction","positional","encoding","."]
code: def prepare_positional_encoding(self, ray_points, ray_dirs):
      """Estimate the positional encoding of the 3D position and direction of the samples along a ray.
  
      Args:
        ray_points: A tensor of shape `[A, B, C, 3]` where A is the batch size, B
          is the number of rays, C is the number of samples per ray.
        ray_dirs: A tensor of shape `[A, B, 3]` where A is the batch size, B
        is the number of rays.
  
      Returns:
        A list containing a tensor of shape `[A, B, C, M]` and a tensor of shape
        `[A, B, C, N]`, where M is the dimensionality of the location positional
        encoding and N is dimensionality of the direction positional encoding.
      """
      n_ray_samples = tf.shape(ray_points)[-2]
      scaled_ray_points = self.scene_scale * (
          ray_points + self.scene_transl
      )
      features_xyz = feature_rep.positional_encoding(
          scaled_ray_points, self.n_freq_posenc_xyz
      )
      ray_dirs = tf.tile(
          tf.expand_dims(ray_dirs, -2), [1, 1, n_ray_samples, 1]
      )
      features_dir = feature_rep.positional_encoding(
          ray_dirs, self.n_freq_posenc_dir
      )
      return features_xyz, features_dir
  
file_path: graphics/tensorflow_graphics/projects/radiance_fields/nerf/model.py
imports: from absl import logging
  import numpy
  import tensorflow
  import tensorflow_graphics.geometry.representation.ray
  import tensorflow_graphics.math.feature_representation
  import tensorflow_graphics.projects.radiance_fields.nerf.layers
  import tensorflow_graphics.projects.radiance_fields.utils
  import tensorflow_graphics.rendering.volumetric.ray_radiance
label_desc: Use image node_id 7 for calling the NeRF obj's underlying member method code with example usage: obj.prepare_positional_encoding(ray_points, ray_dirs) and returns: features_xyz,  features_dir