class_docstr: A wrapper torch.nn.Module for the VoxelGrid classes, which
  contains parameters that are needed to train the VoxelGrid classes.
  Can contain the parameters for the voxel grid as pytorch parameters
  or as registered buffers.
  
  Members:
      voxel_grid_class_type: The name of the class to use for voxel_grid,
          which must be available in the registry. Default FullResolutionVoxelGrid.
      voxel_grid: An instance of `VoxelGridBase`. This is the object which
          this class wraps.
      extents: 3-tuple of a form (width, height, depth), denotes the size of the grid
          in world units.
      translation: 3-tuple of float. The center of the volume in world units as (x, y, z).
      init_std: Parameters are initialized using the gaussian distribution
          with mean=init_mean and std=init_std. Default 0.1
      init_mean: Parameters are initialized using the gaussian distribution
          with mean=init_mean and std=init_std. Default 0.
      hold_voxel_grid_as_parameters: if True components of the underlying voxel grids
          will be saved as parameters and therefore be trainable. Default True.
      param_groups: dictionary where keys are names of individual parameters
          or module members and values are the parameter group where the
          parameter/member will be sorted to. "self" key is used to denote the
          parameter group at the module level. Possible keys, including the "self" key
          do not have to be defined. By default all parameters are put into "default"
          parameter group and have the learning rate defined in the optimizer,
          it can be overridden at the:
              - module level with “self” key, all the parameters and child
                  module's parameters will be put to that parameter group
              - member level, which is the same as if the `param_groups` in that
                  member has key=“self” and value equal to that parameter group.
                  This is useful if members do not have `param_groups`, for
                  example torch.nn.Linear.
              - parameter level, parameter with the same name as the key
                  will be put to that parameter group.
class_docstr_tok: ["A","wrapper","torch.nn.Module","for","the","VoxelGrid","classes",",","which","contains","parameters","that","are","needed","to","train","the","VoxelGrid","classes",".","Can","contain","the","parameters","for","the","voxel","grid","as","pytorch","parameters","or","as","registered","buffers",".","Members",":","voxel_grid_class_type",":","The","name","of","the","class","to","use","for","voxel_grid",",","which","must","be","available","in","the","registry",".","Default","FullResolutionVoxelGrid",".","voxel_grid",":","An","instance","of","`","VoxelGridBase","`",".","This","is","the","object","which","this","class","wraps",".","extents",":","3-tuple","of","a","form","(","width",",","height",",","depth",")",",","denotes","the","size","of","the","grid","in","world","units",".","translation",":","3-tuple","of","float",".","The","center","of","the","volume","in","world","units","as","(","x",",","y",",","z",")",".","init_std",":","Parameters","are","initialized","using","the","gaussian","distribution","with","mean=init_mean","and","std=init_std",".","Default","0.1","init_mean",":","Parameters","are","initialized","using","the","gaussian","distribution","with","mean=init_mean","and","std=init_std",".","Default","0.","hold_voxel_grid_as_parameters",":","if","True","components","of","the","underlying","voxel","grids","will","be","saved","as","parameters","and","therefore","be","trainable",".","Default","True",".","param_groups",":","dictionary","where","keys","are","names","of","individual","parameters","or","module","members","and","values","are","the","parameter","group","where","the","parameter\/member","will","be","sorted","to",".","``","self","''","key","is","used","to","denote","the","parameter","group","at","the","module","level",".","Possible","keys",",","including","the","``","self","''","key","do","not","have","to","be","defined",".","By","default","all","parameters","are","put","into","``","default","''","parameter","group","and","have","the","learning","rate","defined","in","the","optimizer",",","it","can","be","overridden","at","the",":","-","module","level","with","\u201c","self","\u201d","key",",","all","the","parameters","and","child","module","'s","parameters","will","be","put","to","that","parameter","group","-","member","level",",","which","is","the","same","as","if","the","`","param_groups","`","in","that","member","has","key=","\u201c","self","\u201d","and","value","equal","to","that","parameter","group",".","This","is","useful","if","members","do","not","have","`","param_groups","`",",","for","example","torch.nn.Linear",".","-","parameter","level",",","parameter","with","the","same","name","as","the","key","will","be","put","to","that","parameter","group","."]
docstr: Returns VolumeLocator calculated from `extents` and `translation` members.
docstr_tok: ["Returns","VolumeLocator","calculated","from","`","extents","`","and","`","translation","`","members","."]
code: def _get_volume_locator(self) -> VolumeLocator:
      """
      Returns VolumeLocator calculated from `extents` and `translation` members.
      """
      return VolumeLocator(
          batch_size=1,
          # The resolution of the voxel grid does not need to be known
          # to the locator object. It is easiest to fix the resolution of the locator.
          # In particular we fix it to (2,2,2) so that there is exactly one voxel of the
          # desired size. The locator object uses (z, y, x) convention for the grid_size,
          # and this module uses (x, y, z) convention so the order has to be reversed
          # (irrelevant in this case since they are all equal).
          # It is (2, 2, 2) because the VolumeLocator object behaves like
          # align_corners=True, which means that the points are in the corners of
          # the volume. So in the grid of (2, 2, 2) there is only one voxel.
          grid_sizes=(2, 2, 2),
          # The locator object uses (x, y, z) convention for the
          # voxel size and translation.
          voxel_size=tuple(self.extents),
          # volume_translation is defined in `VolumeLocator` as a vector from the origin
          # of local coordinate frame to origin of world coordinate frame, that is:
          # x_world = x_local * extents/2 - translation.
          # To get the reverse we need to negate it.
          volume_translation=tuple(-t for t in self.translation),
          device=self.get_device(),
      )
  
imports: import logging
  import warnings
  from collections.abc import Mapping
  from dataclasses import dataclass, field
  from distutils.version import LooseVersion
  from typing import Any, Callable, ClassVar, Dict, Iterator, List, Optional, Tuple, Type
  import torch
  from omegaconf import DictConfig
  from pytorch3d.implicitron.tools.config import Configurable, registry, ReplaceableBase, run_auto_creation
  from pytorch3d.structures.volumes import VolumeLocator
  from .utils import interpolate_line, interpolate_plane, interpolate_volume
label_desc: Use image node_id 10 for calling the VoxelGridModule obj's underlying member method code with example usage: obj._get_volume_locator() and returns: VolumeLocator