class_docstr: UNet that consumes even dimension grid and outputs even dimension grid.
class_docstr_tok: ["UNet","that","consumes","even","dimension","grid","and","outputs","even","dimension","grid","."]
docstr: Initialization.
  
  Args:
    in_grid_res: int, input grid resolution, must be powers of 2.
    out_grid_res: int, output grid resolution, must be powers of 2.
    num_filters: int, number of feature layers at smallest grid resolution.
    max_filters: int, max number of feature layers at any resolution.
    out_features: int, number of output feature channels.
    name: str, name of the layer.
  
  Raises:
    ValueError: if in_grid_res or out_grid_res is not powers of 2.
docstr_tok: ["Initialization",".","Args",":","in_grid_res",":","int",",","input","grid","resolution",",","must","be","powers","of","2.","out_grid_res",":","int",",","output","grid","resolution",",","must","be","powers","of","2.","num_filters",":","int",",","number","of","feature","layers","at","smallest","grid","resolution",".","max_filters",":","int",",","max","number","of","feature","layers","at","any","resolution",".","out_features",":","int",",","number","of","output","feature","channels",".","name",":","str",",","name","of","the","layer",".","Raises",":","ValueError",":","if","in_grid_res","or","out_grid_res","is","not","powers","of","2","."]
code: def __init__(
      self,
      in_grid_res=32,
      out_grid_res=16,
      num_filters=16,
      max_filters=512,
      out_features=32,
      name="unet3d",
  ):
      """Initialization.
  
      Args:
        in_grid_res: int, input grid resolution, must be powers of 2.
        out_grid_res: int, output grid resolution, must be powers of 2.
        num_filters: int, number of feature layers at smallest grid resolution.
        max_filters: int, max number of feature layers at any resolution.
        out_features: int, number of output feature channels.
        name: str, name of the layer.
  
      Raises:
        ValueError: if in_grid_res or out_grid_res is not powers of 2.
      """
      super(UNet3D, self).__init__(name=name)
      self.in_grid_res = in_grid_res
      self.out_grid_res = out_grid_res
      self.num_filters = num_filters
      self.max_filters = max_filters
      self.out_features = out_features
  
      # assert dimensions acceptable
      if (
          math.log(out_grid_res, 2) % 1 != 0
          or math.log(in_grid_res, 2) % 1 != 0
      ):
          raise ValueError("in_grid_res and out_grid_res must be 2**n.")
  
      self.num_in_level = math.log(self.in_grid_res, 2)
      self.num_out_level = math.log(self.out_grid_res, 2)
      self.num_in_level = int(
          self.num_in_level
      )  # number of input levels
      self.num_out_level = int(
          self.num_out_level
      )  # number of output levels
  
      self._create_layers()
  
imports: import math
  import tensorflow.compat.v1
  from tensorflow_graphics.projects.local_implicit_grid.core import local_implicit_grid_layer
label_desc: Use image node_id 1 to create a new UNet3D object from inherited base classes: tf.keras.layers with example: obj = UNet3D(in_grid_res, out_grid_res, num_filters, max_filters, out_features, name)