import tensorflow as tf

		crit_gen = tf.reduce_mean(tf.square(crit_fake - tf.ones_like(crit_fake)))

		rep_loss = tf.reduce_mean(tf.square(pred - x2d))

		KK = tf.matmul(K, K, transpose_b=True)
		K_trace = tf.expand_dims(tf.expand_dims(tf.trace(KK), -1), -1)
		K_loss = tf.reduce_mean(tf.abs(KK / K_trace - tf.eye(2))) 

