import tensorflow as tf

            output_h4 = decode(trans_z, tgtctx_h3, tgtctx_h2, tgtctx_h1, tgtctx_h0)
            scope.reuse_variables()
            truthoutput_h4 = decode(tgtimg_z, tgtctx_h3, tgtctx_h2, tgtctx_h1, tgtctx_h0)

        self.simloss = tf.reduce_mean((trans_z - tgtimg_z) ** 2) * 1e3
        print(tgtimg_z.get_shape())
        self.out = output_h4
        self.out2 = truthoutput_h4
        print(self.out.get_shape())
        self.recon1 = tf.nn.l2_loss(tgtimg - self.out)
        self.recon2 = tf.nn.l2_loss(tgtimg - self.out2)
        if ablation_type == "None":
            self.loss = self.recon1 + self.recon2 + self.simloss
        elif ablation_type == "L2":
            self.loss = self.recon1 + self.recon2
        elif ablation_type == "L2L3":
            self.loss = self.recon1
        elif ablation_type == "L1":
