class_docstr: Given the initial estimate of densities, this samples more from regions/bins expected to have objects.
class_docstr_tok: ["Given","the","initial","estimate","of","densities",",","this","samples","more","from","regions\/bins","expected","to","have","objects","."]
docstr: Args:
      volume_range: the range in which a ray intersects the given volume.
      ts: earlier samples from the coarse rendering step
      weights: discretized version of density * transmittance
      blur_pool: if true, use 2-tap max + 2-tap blur filter from mip-NeRF.
      alpha: small value to add to weights.
docstr_tok: ["Args",":","volume_range",":","the","range","in","which","a","ray","intersects","the","given","volume",".","ts",":","earlier","samples","from","the","coarse","rendering","step","weights",":","discretized","version","of","density","*","transmittance","blur_pool",":","if","true",",","use","2-tap","max","+","2-tap","blur","filter","from","mip-NeRF",".","alpha",":","small","value","to","add","to","weights","."]
code: def __init__(
      self,
      volume_range: VolumeRange,
      ts: torch.Tensor,
      weights: torch.Tensor,
      blur_pool: bool = False,
      alpha: float = 1e-5,
  ):
      """
      Args:
          volume_range: the range in which a ray intersects the given volume.
          ts: earlier samples from the coarse rendering step
          weights: discretized version of density * transmittance
          blur_pool: if true, use 2-tap max + 2-tap blur filter from mip-NeRF.
          alpha: small value to add to weights.
      """
      self.volume_range = volume_range
      self.ts = ts.clone().detach()
      self.weights = weights.clone().detach()
      self.blur_pool = blur_pool
      self.alpha = alpha
  
imports: import math
  from dataclasses import dataclass
  from typing import Dict, Optional, Tuple
  import numpy
  import torch
  import torch.nn.functional
  from torch import nn
  from ...configuration_utils import ConfigMixin, register_to_config
  from ...models import ModelMixin
  from ...utils import BaseOutput
  from .camera import create_pan_cameras
label_desc: Use image node_id 1 to create a new ImportanceRaySampler object from inherited base classes: nn with example: obj = ImportanceRaySampler(volume_range, ts, weights, blur_pool, alpha)