def create_soft_min(d, k = 2.0): softmin = tf.reduce_sum(tf.mul(tf.nn.softmax(tf.scalar_mul(-k, d)), d),reduction_indices = 1); return softmin;