def create_cost_distance(self, l, r, d): dd = tf.reduce_sum(tf.squared_difference(l,r), reduction_indices=1); dd = tf.squared_difference(dd, d); return tf.reduce_mean(dd);