class_docstr: Glow generative model.
  
  Reference: https://arxiv.org/abs/1807.03039
class_docstr_tok: ["Glow","generative","model",".","Reference",":","https",":","\/\/arxiv.org\/abs\/1807.03039"]
code: def infer(
      self, features, *args, **kwargs
  ):  # pylint: disable=arguments-differ
      del args, kwargs
      x = features["inputs"]
      batch_size = common_layers.shape_list(x)[0]
      features["targets"] = tf.zeros(shape=(batch_size, 1, 1, 1))
      _, _ = self(features)  # pylint: disable=not-callable
  
      ops = [
          glow_ops.get_variable_ddi,
          glow_ops.actnorm,
          glow_ops.get_dropout,
      ]
      var_scope = tf.variable_scope("glow/body", reuse=True)
      # If eps=None, images are sampled from the prior.
      with arg_scope(ops, init=False), var_scope:
          predictions, _, _, _ = glow_ops.encoder_decoder(
              "codec",
              self.z_sample,
              self.hparams,
              eps=None,
              reverse=True,
              temperature=self.temperature,
          )
  
      return glow_ops.postprocess(predictions, self.hparams.n_bits_x)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.layers import common_layers
  from tensor2tensor.models.research import glow_init_hook
  from tensor2tensor.models.research import glow_ops
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 5 for calling the Glow obj's underlying member method code with example usage: obj.infer(features) and returns: glow_ops