class_docstr: Class for using optimization to acquire feature grid.
class_docstr_tok: ["Class","for","using","optimization","to","acquire","feature","grid","."]
code: def __init__(
      self,
      ckpt,
      origin,
      grid_shape,
      part_size,
      occ_idx,
      indep_pt_loss=True,
      overlap=True,
      alpha_lat=1e-2,
      npts=2048,
      init_std=1e-2,
      learning_rate=1e-3,
      var_prefix="",
      nows=False,
  ):
      self.ckpt = ckpt
      self.ckpt_dir = os.path.dirname(ckpt)
      self.params = self._load_params(self.ckpt_dir)
      self.origin = origin
      self.grid_shape = grid_shape
      self.part_size = part_size
      self.occ_idx = occ_idx
      self.init_std = init_std
      self.learning_rate = learning_rate
      self.var_prefix = var_prefix
      self.nows = nows
  
      self.xmin = self.origin
      if overlap:
          true_shape = (np.array(grid_shape) - 1) / 2.0
          self.xmax = self.origin + true_shape * part_size
      else:
          self.xmax = (
              self.origin + (np.array(grid_shape) - 1) * part_size
          )
  
      _, sj, sk = self.grid_shape
      self.occ_idx_flat = (
          self.occ_idx[:, 0] * (sj * sk)
          + self.occ_idx[:, 1] * sk
          + self.occ_idx[:, 2]
      )
  
      self.indep_pt_loss = indep_pt_loss
      self.overlap = overlap
      self.alpha_lat = alpha_lat
      self.npts = int(npts)
      self._init_graph()
  
imports: import os
  import numpy
  from skimage import measure
  import tensorflow.compat.v1
  from tensorflow_graphics.projects.local_implicit_grid.core import evaluator
  from tensorflow_graphics.projects.local_implicit_grid.core import local_implicit_grid_layer
  from tensorflow_graphics.projects.local_implicit_grid.core import point_utils
label_desc: Use image node_id 1 to create a new LIGOptimizer object from inherited base classes: object with example: obj = LIGOptimizer(ckpt, origin, grid_shape, part_size, occ_idx, indep_pt_loss, overlap, alpha_lat, npts, init_std, learning_rate, var_prefix, nows)