def __init__(
        self, nerf_model: NerfModel, image_size: tuple[int, int], device: torch.device | None, dtype: torch.dtype | None
    ) -> None:
        """Construct NerfModelRenderer.

        Args:
            nerf_model: NeRF model.
            image_size: image size.
            device: device to run the model on.
            dtype: dtype to run the model on.

        """
        self._nerf_model = nerf_model
        self._image_size = image_size
        self._device = device
        self._dtype = dtype

        self._pixels_grid, self._ones = self._create_pixels_grid()  # 1xHxWx2 and (H*W)x1
Construct NerfModelRenderer.

        Args:
            nerf_model: NeRF model.
            image_size: image size.
            device: device to run the model on.
            dtype: dtype to run the model on.

        
kornia/nerf/nerf_model.py