code: def load_quantized_model(model, ckpt_path, session, name):
      """Loads quantized model and dequantizes variables"""
      start_time = time.time()
      dequant_ops = []
      for tsr in tf.trainable_variables():
          with tf.variable_scope(tsr.name.split(":")[0], reuse=True):
              quant_tsr = tf.get_variable("quantized", dtype=tf.qint8)
              min_range = tf.get_variable("min_range")
              max_range = tf.get_variable("max_range")
              dequant_ops.append(
                  tsr.assign(
                      tf.dequantize(
                          quant_tsr, min_range, max_range, "SCALED"
                      )
                  )
              )
      restore_list = [
          tsr
          for tsr in tf.global_variables()
          if tsr not in tf.trainable_variables()
      ]
  
      saver = tf.train.Saver(restore_list)
      try:
          saver.restore(session, ckpt_path)
      except tf.errors.NotFoundError as e:
          utils.print_out("Can't load checkpoint")
          print_variables_in_ckpt(ckpt_path)
          utils.print_out("%s" % str(e))
      session.run(tf.tables_initializer())
      session.run(dequant_ops)
      utils.print_out(
          "  loaded %s model parameters from %s, time %.2fs"
          % (name, ckpt_path, time.time() - start_time)
      )
      return model
  
imports: from __future__ import print_function
  import collections
  import os
  import time
  import numpy
  import six
  import tensorflow
  from tensorflow.python.ops import lookup_ops
  from .utils import misc_utils, vocab_utils, iterator_utils
label_desc: Use image node_id 16 for calling a global function with example usage: load_quantized_model(model, ckpt_path, session, name) and returns: model