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: Automatically ran before loading the parameters with `load_state_dict()`.
  Creates new parameters with the sizes of the ones in the loaded state dict.
  This is necessary because the parameters are changing throughout training and
  at the time of construction `VoxelGridModule` does not know the size of
  parameters which will be loaded.
  
  Args:
      state_dict (dict): a dict containing parameters and
          persistent buffers.
      prefix (str): the prefix for parameters and buffers used in this
          module
      local_metadata (dict): a dict containing the metadata for this module.
          See
      strict (bool): whether to strictly enforce that the keys in
          :attr:`state_dict` with :attr:`prefix` match the names of
          parameters and buffers in this module
      missing_keys (list of str): if ``strict=True``, add missing keys to
          this list
      unexpected_keys (list of str): if ``strict=True``, add unexpected
          keys to this list
      error_msgs (list of str): error messages should be added to this
          list, and will be reported together in
          :meth:`~torch.nn.Module.load_state_dict`
  Returns:
      nothing
  """
docstr_tok: ["Automatically","ran","before","loading","the","parameters","with","`","load_state_dict","(",")","`",".","Creates","new","parameters","with","the","sizes","of","the","ones","in","the","loaded","state","dict",".","This","is","necessary","because","the","parameters","are","changing","throughout","training","and","at","the","time","of","construction","`","VoxelGridModule","`","does","not","know","the","size","of","parameters","which","will","be","loaded",".","Args",":","state_dict","(","dict",")",":","a","dict","containing","parameters","and","persistent","buffers",".","prefix","(","str",")",":","the","prefix","for","parameters","and","buffers","used","in","this","module","local_metadata","(","dict",")",":","a","dict","containing","the","metadata","for","this","module",".","See","strict","(","bool",")",":","whether","to","strictly","enforce","that","the","keys","in",":","attr",":","`","state_dict","`","with",":","attr",":","`","prefix","`","match","the","names","of","parameters","and","buffers","in","this","module","missing_keys","(","list","of","str",")",":","if","``","strict=True","``",",","add","missing","keys","to","this","list","unexpected_keys","(","list","of","str",")",":","if","``","strict=True","``",",","add","unexpected","keys","to","this","list","error_msgs","(","list","of","str",")",":","error","messages","should","be","added","to","this","list",",","and","will","be","reported","together","in",":","meth",":","`","~torch.nn.Module.load_state_dict","`","Returns",":","nothing","''","''","''"]
code: def _create_parameters_with_new_size(
      self,
      state_dict: dict,
      prefix: str,
      local_metadata: dict,
      strict: bool,
      missing_keys: List[str],
      unexpected_keys: List[str],
      error_msgs: List[str],
  ) -> None:
      '''
      Automatically ran before loading the parameters with `load_state_dict()`.
      Creates new parameters with the sizes of the ones in the loaded state dict.
      This is necessary because the parameters are changing throughout training and
      at the time of construction `VoxelGridModule` does not know the size of
      parameters which will be loaded.
  
      Args:
          state_dict (dict): a dict containing parameters and
              persistent buffers.
          prefix (str): the prefix for parameters and buffers used in this
              module
          local_metadata (dict): a dict containing the metadata for this module.
              See
          strict (bool): whether to strictly enforce that the keys in
              :attr:`state_dict` with :attr:`prefix` match the names of
              parameters and buffers in this module
          missing_keys (list of str): if ``strict=True``, add missing keys to
              this list
          unexpected_keys (list of str): if ``strict=True``, add unexpected
              keys to this list
          error_msgs (list of str): error messages should be added to this
              list, and will be reported together in
              :meth:`~torch.nn.Module.load_state_dict`
      Returns:
          nothing
      """
      '''
      new_params = {}
      for name in self.params:
          key = prefix + "params." + name
          if key in state_dict:
              new_params[name] = torch.zeros_like(state_dict[key])
      self.set_voxel_grid_parameters(
          self.voxel_grid.values_type(**new_params)
      )
  
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 7 for calling the VoxelGridModule obj's underlying member method code with example usage: obj._create_parameters_with_new_size(state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs) without return types