import tensorflow as tf

  # load model.
  model = importlib.import_module(model)
  analysis_transform = model.AnalysisTransform(latent_points)
  hyper_encoder = model.HyperEncoder()
  hyper_decoder = model.HyperDecoder()
  entropy_bottleneck = EntropyBottleneck()
  conditional_entropy_model = SymmetricConditional()

  checkpoint = tf.train.Checkpoint(analysis_transform=analysis_transform, 
                                    hyper_encoder=hyper_encoder, 
                                    hyper_decoder=hyper_decoder, 
                                    estimator=entropy_bottleneck)
  status = checkpoint.restore(tf.train.latest_checkpoint(ckpt_dir))

  x = tf.convert_to_tensor(x_color, "float32")
  x_coori = tf.convert_to_tensor(x_coori, "float32")

  def loop_analysis(element):
    x = tf.expand_dims(element[0], 0)
    x_coori = tf.expand_dims(element[1], 0)
    y = analysis_transform(x_coori,x)
    return tf.squeeze(y,axis=0)

  element = [x,x_coori]
