import tensorflow as tf


            # ============================================================================OUT
            # print('VNET Out:', X.get_shape().as_list())

        # if self.args.mode == 'adapt':
            return X, X_EARLY, X_MIDDLE, X_LATE, prediction
        # else:
        #     return X, prediction

    def D_4(self, X, reuse):
        def discrim_conv(name, X, out_channels, filtersize, stride=1, norm='', nonlin=True, init_stddev=-1):
            with tf.variable_scope(name) as scope:
                if init_stddev <= 0.0:
                    init = tf.contrib.layers.variance_scaling_initializer(dtype=tf.float32)
                else:
                    init = tf.truncated_normal_initializer(stddev=init_stddev)
                X = tf.layers.conv2d(X, out_channels, kernel_size=filtersize, strides=(stride, stride), padding="valid",
                                    kernel_initializer=init)
                if norm == 'I':
                    X = tf.contrib.layers.instance_norm(X, scope=scope, reuse=reuse, epsilon=0.001)
                elif norm == 'B':
                    X = tf.layers.batch_normalization(X, reuse=reuse, training=True)
