class_docstr: Load pretrained grid encoder and evaluate single crops.
class_docstr_tok: ["Load","pretrained","grid","encoder","and","evaluate","single","crops","."]
docstr: Initialize computation graph for tensorflow.
      
docstr_tok: ["Initialize","computation","graph","for","tensorflow","."]
code: def _init_graph(self):
      """Initialize computation graph for tensorflow."""
      with self.graph.as_default():
          self.encoder = g2v.GridEncoder(
              in_grid_res=self.in_grid_res,
              num_filters=self.encoder_nf,
              codelen=self.codelen,
              name="g2v",
          )
          self.grid_ph = tf.placeholder(
              tf.float32,
              shape=[
                  None,
                  self.in_grid_res,
                  self.in_grid_res,
                  self.in_grid_res,
                  1,
              ],
          )
  
          self.lats = self.encoder(
              self.grid_ph, training=False
          )  # [gb, codelen]
          self.saver = tf.train.Saver()
          self.sess = tf.Session()
          self.saver.restore(self.sess, self.ckpt)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import ast
  import numpy
  import tensorflow.compat.v1
  from tensorflow.compat.v1.io import gfile
  from tensorflow_graphics.projects.local_implicit_grid.core import implicit_nets
  from tensorflow_graphics.projects.local_implicit_grid.core import local_implicit_grid_layer
  from tensorflow_graphics.projects.local_implicit_grid.core import model_g2g
  from tensorflow_graphics.projects.local_implicit_grid.core import model_g2v
label_desc: Use image node_id 2 for calling the EncoderEvaluator obj's underlying member method code with example usage: obj._init_graph() without return types