class_docstr: Base class for all Renderer implementations.
class_docstr_tok: ["Base","class","for","all","Renderer","implementations","."]
docstr: Each Renderer should implement its own forward function
  that returns an instance of RendererOutput.
  
  Args:
      ray_bundle: An ImplicitronRayBundle object containing the following variables:
          origins: A tensor of shape (minibatch, ..., 3) denoting
              the origins of the rendering rays.
          directions: A tensor of shape (minibatch, ..., 3)
              containing the direction vectors of rendering rays.
          lengths: A tensor of shape
              (minibatch, ..., num_points_per_ray)containing the
              lengths at which the ray points are sampled.
              The coordinates of the points on the rays are thus computed
              as `origins + lengths * directions`.
          xys: A tensor of shape
              (minibatch, ..., 2) containing the
              xy locations of each ray's pixel in the NDC screen space.
          camera_ids: A tensor of shape (N, ) which indicates which camera
              was used to sample the rays. `N` is the number of different
              sampled cameras.
          camera_counts: A tensor of shape (N, ) which how many times the
              coresponding camera in `camera_ids` was sampled.
              `sum(camera_counts)==minibatch`
      implicit_functions: List of ImplicitFunctionWrappers which define the
          implicit function methods to be used. Most Renderers only allow
          a single implicit function. Currently, only the
          MultiPassEmissionAbsorptionRenderer allows specifying mulitple
          values in the list.
      evaluation_mode: one of EvaluationMode.TRAINING or
          EvaluationMode.EVALUATION which determines the settings used for
          rendering.
      **kwargs: In addition to the name args, custom keyword args can be specified.
          For example in the SignedDistanceFunctionRenderer, an object_mask is
          required which needs to be passed via the kwargs.
  
  Returns:
      instance of RendererOutput
docstr_tok: ["Each","Renderer","should","implement","its","own","forward","function","that","returns","an","instance","of","RendererOutput",".","Args",":","ray_bundle",":","An","ImplicitronRayBundle","object","containing","the","following","variables",":","origins",":","A","tensor","of","shape","(","minibatch",",","...",",","3",")","denoting","the","origins","of","the","rendering","rays",".","directions",":","A","tensor","of","shape","(","minibatch",",","...",",","3",")","containing","the","direction","vectors","of","rendering","rays",".","lengths",":","A","tensor","of","shape","(","minibatch",",","...",",","num_points_per_ray",")","containing","the","lengths","at","which","the","ray","points","are","sampled",".","The","coordinates","of","the","points","on","the","rays","are","thus","computed","as","`","origins","+","lengths","*","directions","`",".","xys",":","A","tensor","of","shape","(","minibatch",",","...",",","2",")","containing","the","xy","locations","of","each","ray","'s","pixel","in","the","NDC","screen","space",".","camera_ids",":","A","tensor","of","shape","(","N",",",")","which","indicates","which","camera","was","used","to","sample","the","rays",".","`","N","`","is","the","number","of","different","sampled","cameras",".","camera_counts",":","A","tensor","of","shape","(","N",",",")","which","how","many","times","the","coresponding","camera","in","`","camera_ids","`","was","sampled",".","`","sum","(","camera_counts",")","==minibatch","`","implicit_functions",":","List","of","ImplicitFunctionWrappers","which","define","the","implicit","function","methods","to","be","used",".","Most","Renderers","only","allow","a","single","implicit","function",".","Currently",",","only","the","MultiPassEmissionAbsorptionRenderer","allows","specifying","mulitple","values","in","the","list",".","evaluation_mode",":","one","of","EvaluationMode.TRAINING","or","EvaluationMode.EVALUATION","which","determines","the","settings","used","for","rendering",".","*","*","kwargs",":","In","addition","to","the","name","args",",","custom","keyword","args","can","be","specified",".","For","example","in","the","SignedDistanceFunctionRenderer",",","an","object_mask","is","required","which","needs","to","be","passed","via","the","kwargs",".","Returns",":","instance","of","RendererOutput"]
code: def forward(
      self,
      ray_bundle: ImplicitronRayBundle,
      implicit_functions: List[ImplicitFunctionWrapper],
      evaluation_mode: EvaluationMode = EvaluationMode.EVALUATION,
      **kwargs,
  ) -> RendererOutput:
      """
      Each Renderer should implement its own forward function
      that returns an instance of RendererOutput.
  
      Args:
          ray_bundle: An ImplicitronRayBundle object containing the following variables:
              origins: A tensor of shape (minibatch, ..., 3) denoting
                  the origins of the rendering rays.
              directions: A tensor of shape (minibatch, ..., 3)
                  containing the direction vectors of rendering rays.
              lengths: A tensor of shape
                  (minibatch, ..., num_points_per_ray)containing the
                  lengths at which the ray points are sampled.
                  The coordinates of the points on the rays are thus computed
                  as `origins + lengths * directions`.
              xys: A tensor of shape
                  (minibatch, ..., 2) containing the
                  xy locations of each ray's pixel in the NDC screen space.
              camera_ids: A tensor of shape (N, ) which indicates which camera
                  was used to sample the rays. `N` is the number of different
                  sampled cameras.
              camera_counts: A tensor of shape (N, ) which how many times the
                  coresponding camera in `camera_ids` was sampled.
                  `sum(camera_counts)==minibatch`
          implicit_functions: List of ImplicitFunctionWrappers which define the
              implicit function methods to be used. Most Renderers only allow
              a single implicit function. Currently, only the
              MultiPassEmissionAbsorptionRenderer allows specifying mulitple
              values in the list.
          evaluation_mode: one of EvaluationMode.TRAINING or
              EvaluationMode.EVALUATION which determines the settings used for
              rendering.
          **kwargs: In addition to the name args, custom keyword args can be specified.
              For example in the SignedDistanceFunctionRenderer, an object_mask is
              required which needs to be passed via the kwargs.
  
      Returns:
          instance of RendererOutput
      """
      pass
  
imports: from __future__ import annotations
  from abc import ABC, abstractmethod
  from dataclasses import dataclass, field
  from enum import Enum
  from typing import Any, Dict, List, Optional, Tuple
  import torch
  from pytorch3d.implicitron.tools.config import ReplaceableBase
  from pytorch3d.ops import packed_to_padded
  from pytorch3d.renderer.implicit.utils import ray_bundle_variables_to_ray_points
label_desc: Use image node_id 2 for calling the BaseRenderer obj's underlying member method code with example usage: obj.forward(ray_bundle, implicit_functions, evaluation_mode) without return types