class_docstr: Renders a novel synthesis view of a trained NeRF model for given camera.
docstr: Creates the pixels grid to unproject to plane z=1.
  
  Args:
      image_size: image size: tuple[int, int]
  
  Returns:
      - Pixels grid: Tensor (1, H, W, 2)
      - Ones: Tensor (H*W, 1)
docstr_tok: ["Creates","the","pixels","grid","to","unproject","to","plane","z=1",".","Args",":","image_size",":","image","size",":","tuple","[","int",",","int","]","Returns",":","-","Pixels","grid",":","Tensor","(","1",",","H",",","W",",","2",")","-","Ones",":","Tensor","(","H","*","W",",","1",")"]
code: def _create_pixels_grid(self) -> tuple[Tensor, Tensor]:
      """Creates the pixels grid to unproject to plane z=1.
  
      Args:
          image_size: image size: tuple[int, int]
  
      Returns:
          - Pixels grid: Tensor (1, H, W, 2)
          - Ones: Tensor (H*W, 1)
      """
      height, width = self._image_size
      pixels_grid: Tensor = create_meshgrid(
          height,
          width,
          normalized_coordinates=False,
          device=self._device,
          dtype=self._dtype,
      )  # 1xHxWx2
      pixels_grid = pixels_grid.reshape(-1, 2)  # (H*W)x2
  
      ones = torch.ones(
          pixels_grid.shape[0],
          1,
          device=pixels_grid.device,
          dtype=pixels_grid.dtype,
      )  # (H*W)x1
  
      return pixels_grid, ones
  
imports: from __future__ import annotations
  import torch
  from torch import nn
  from torch.nn import functional
  from kornia.core import Module, Tensor
  from kornia.geometry.camera import PinholeCamera
  from kornia.geometry.ray import Ray
  from kornia.nerf.positional_encoder import PositionalEncoder
  from kornia.nerf.samplers import sample_lengths, sample_ray_points
  from kornia.nerf.volume_renderer import IrregularRenderer, RegularRenderer
  from kornia.utils._compat import torch_inference_mode
  from kornia.utils.grid import create_meshgrid
label_desc: Use image node_id 2 for calling the NerfModelRenderer obj's underlying member method code with example usage: obj._create_pixels_grid() and returns: pixels_grid,  ones