class_docstr: NeRF solver class.
  
  Args:
      device: device for class tensors: Union[str, Device]
      dtype: type for all floating point calculations: torch.dtype
class_docstr_tok: ["NeRF","solver","class",".","Args",":","device",":","device","for","class","tensors",":","Union","[","str",",","Device","]","dtype",":","type","for","all","floating","point","calculations",":","torch.dtype"]
code: def __init__(self, device: torch.device, dtype: torch.dtype) -> None:
      # TODO: add support for the new CameraModel class
      # cameras used for training
      self._cameras: PinholeCamera | None = None
  
      # rays depth range
      self._min_depth: float = 0.0
      self._max_depth: float = 0.0
  
      # whether to convert ray parameters to normalized device coordinates
      self._ndc: bool = True
  
      # images used for training
      self._imgs: Images | None = None
  
      # number of rays to randomly cast from each camera
      self._num_img_rays: Tensor | int | None = None
  
      # number of rays to sample in a batch
      self._batch_size: int = 0
  
      # number of points to sample along rays
      self._num_ray_points: int = 0
  
      # the model and optimizer
      self._nerf_model: Module | None = None
      self._nerf_optimizer: optim.Optimizer | None = None
  
      self._device = device
      self._dtype = dtype
  
imports: from __future__ import annotations
  import logging
  from datetime import datetime
  from typing import cast
  import torch
  import torch.nn.functional
  from torch import optim
  from kornia.core import Module, Tensor, tensor
  from kornia.core.check import KORNIA_CHECK
  from kornia.geometry.camera import PinholeCamera
  from kornia.metrics import psnr
  from kornia.nerf.core import Images
  from kornia.nerf.data_utils import RayDataset, instantiate_ray_dataloader
  from kornia.nerf.nerf_model import NerfModel
  from kornia.utils import deprecated
label_desc: Use image node_id 1 to create a new NerfSolver object  with example: obj = NerfSolver(device, dtype)