class_docstr: Local Implicit Grid layer.
    
docstr: Evaluate function values by querying shared dense network.
  
  Args:
    lat: `[batch_size, num_points, 2**dim, in_features]` tensor, neighbor
    latent codes for each input point.
    weights: `[batch_size, num_points, 2**dim]` tensor, bi/tri-linear
    interpolation weights for each neighbor.
    xloc: `[batch_size, num_points, 2**dim, dim]`tensor, relative coordinates.
    training: bool, flag indicating training phase.
  Returns:
    values: `[batch_size, num_point, out_features]` tensor, query values.
code: def _eval_net(self, lat, weights, xloc, training=False):
      """Evaluate function values by querying shared dense network.
  
      Args:
        lat: `[batch_size, num_points, 2**dim, in_features]` tensor, neighbor
        latent codes for each input point.
        weights: `[batch_size, num_points, 2**dim]` tensor, bi/tri-linear
        interpolation weights for each neighbor.
        xloc: `[batch_size, num_points, 2**dim, dim]`tensor, relative coordinates.
        training: bool, flag indicating training phase.
      Returns:
        values: `[batch_size, num_point, out_features]` tensor, query values.
      """
      nb, np, nn, nc = lat.get_shape().as_list()
      nd = self.dim
      if self.method == "linear":
          inputs = tf.concat([xloc, lat], axis=-1)
          # `[batch_size, num_points, 2**dim, dim+in_features]`
          inputs = tf.reshape(inputs, [-1, nc + nd])
          values = self.net(inputs, training=training)
          values = tf.reshape(values, [nb, np, nn, self.cout])
          # `[batch_size, num_points, 2**dim, out_features]`
          if self.interp:
              values = tf.reduce_sum(
                  tf.expand_dims(weights, axis=-1) * values, axis=2
              )
              # `[batch_size, num_points out_features]`
          else:
              values = (values, weights)
      else:  # nearest neighbor
          nid = tf.cast(tf.argmax(weights, axis=-1), tf.int32)
          # [batch_size, num_points]
          bid = tf.broadcast_to(
              tf.range(nb, dtype=tf.int32)[:, tf.newaxis], [nb, np]
          )
          pid = tf.broadcast_to(
              tf.range(np, dtype=tf.int32)[tf.newaxis, :], [nb, np]
          )
          gather_id = tf.stack((bid, pid, nid), axis=-1)
          lat_ = tf.gather_nd(
              lat, gather_id
          )  # [batch_size, num_points, in_feat]
          xloc_ = tf.gather_nd(
              xloc, gather_id
          )  # [batch_size, num_points, dim]
          inputs = tf.concat([xloc_, lat_], axis=-1)
          inputs = tf.reshape(inputs, [-1, nc + nd])
          values = self.net(inputs, training=training)
          values = tf.reshape(values, [nb, np, self.cout])
          # `[batch_size, num_points, out_features]`
  
      return values
  
file_path: graphics/tensorflow_graphics/projects/local_implicit_grid/core/local_implicit_grid_layer.py
imports: import tensorflow.compat.v1
  from tensorflow_graphics.projects.local_implicit_grid.core import implicit_nets
  from tensorflow_graphics.projects.local_implicit_grid.core import regular_grid_interpolation
label_desc: Use image node_id 4 for calling the LocalImplicitGrid obj's underlying member method code with example usage: obj._eval_net(lat, weights, xloc, training) and returns: values