import tensorflow as tf

                im = tf.clip_by_value(im, 0, 255)
                im = tf.cast(im, tf.uint8, name='viz')
            tf.summary.image(name, im, max_outputs=50)

        # use the initializers from torch
        with argscope([Conv2D, Deconv2D], use_bias=False,
                      W_init=tf.random_normal_initializer(stddev=0.02)), \
                argscope([Conv2D, Deconv2D, InstanceNorm], data_format='NCHW'), \
                argscope(LeakyReLU, alpha=0.2):
            with tf.variable_scope('gen'):
                with tf.variable_scope('B'):
                    AB = self.generator(A)
