class_docstr: Shape and appearance conditioned network for radiance fields.
class_docstr_tok: ["Shape","and","appearance","conditioned","network","for","radiance","fields","."]
docstr: Initialize models and variables.
docstr_tok: ["Initialize","models","and","variables","."]
code: def init_model_and_codes(self):
      """Initialize models and variables."""
      self.model = self.get_model()
      self.model_backup = self.get_model()
      self.latest_epoch = tf.Variable(
          0, trainable=False, dtype=tf.int64
      )
      self.global_step = tf.Variable(0, trainable=False, dtype=tf.int64)
      init_latent_codes = tf.random.normal(
          (self.num_latent_codes, self.latent_code_dim)
      )
      self.latent_code_vars = tf.Variable(
          init_latent_codes, trainable=True
      )
      self.network_vars = self.model.trainable_variables
  
imports: from absl import logging
  import numpy
  import tensorflow
  import tensorflow_graphics.geometry.representation.ray
  import tensorflow_graphics.math.feature_representation
  import tensorflow_graphics.projects.radiance_fields.nerf.layers
  import tensorflow_graphics.projects.radiance_fields.sharf.voxel_functions
  import tensorflow_graphics.projects.radiance_fields.utils
  import tensorflow_graphics.rendering.volumetric.ray_radiance
label_desc: Use image node_id 2 for calling the AppearanceNetwork obj's underlying member method code with example usage: obj.init_model_and_codes() without return types