class_docstr: Defines the ImageVAE model.
class_docstr_tok: ["Defines","the","ImageVAE","model","."]
code: def visual_decoder(self, bottleneck, clss, hparams):
      # goes from [batch, bottleneck_bits] to [batch, 64, 64, 1]
      with tf.variable_scope("visual_decoder", reuse=tf.AUTO_REUSE):
          # unbottleneck
          ret = tf.layers.dense(bottleneck, 1024, activation=None)
          ret = tf.reshape(ret, [-1, 4, 4, 64])
          clss = tf.reshape(clss, [-1])
  
          # new deconv to bring shape up
          ret = tf.layers.Conv2DTranspose(
              2 * hparams.base_depth,
              4,
              2,
              padding="SAME",
              activation=None,
          )(ret)
          ret = ops.conditional_instance_norm(
              ret, clss, hparams.num_categories
          )
          ret = tf.nn.relu(ret)
  
          # new deconv to bring shape up
          ret = tf.layers.Conv2DTranspose(
              2 * hparams.base_depth,
              4,
              2,
              padding="SAME",
              activation=None,
          )(ret)
          ret = ops.conditional_instance_norm(
              ret, clss, hparams.num_categories
          )
          ret = tf.nn.relu(ret)
  
          ret = tf.layers.Conv2DTranspose(
              2 * hparams.base_depth, 5, padding="SAME", activation=None
          )(ret)
          ret = ops.conditional_instance_norm(
              ret, clss, hparams.num_categories
          )
          ret = tf.nn.relu(ret)
  
          ret = tf.layers.Conv2DTranspose(
              2 * hparams.base_depth,
              5,
              2,
              padding="SAME",
              activation=None,
          )(ret)
          ret = ops.conditional_instance_norm(
              ret, clss, hparams.num_categories
          )
          ret = tf.nn.relu(ret)
  
          ret = tf.layers.Conv2DTranspose(
              hparams.base_depth, 5, padding="SAME", activation=None
          )(ret)
          ret = ops.conditional_instance_norm(
              ret, clss, hparams.num_categories
          )
          ret = tf.nn.relu(ret)
  
          ret = tf.layers.Conv2DTranspose(
              hparams.base_depth, 5, 2, padding="SAME", activation=None
          )(ret)
          ret = ops.conditional_instance_norm(
              ret, clss, hparams.num_categories
          )
          ret = tf.nn.relu(ret)
  
          ret = tf.layers.Conv2DTranspose(
              hparams.base_depth, 5, padding="SAME", activation=None
          )(ret)
          ret = ops.conditional_instance_norm(
              ret, clss, hparams.num_categories
          )
          ret = tf.nn.relu(ret)
  
          ret = tf.layers.Conv2D(1, 5, padding="SAME", activation=None)(
              ret
          )
  
          ret = tfd.Independent(
              tfd.Bernoulli(logits=ret),
              reinterpreted_batch_ndims=3,
              name="image",
          )
      return ret
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from magenta.models.image_stylization import ops
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.layers import common_layers
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
  import tensorflow_probability
label_desc: Use image node_id 8 for calling the ImageVAE obj's underlying member method code with example usage: obj.visual_decoder(bottleneck, clss, hparams) and returns: ret