def create_cost_spacing(t, length, normalized = True):
d = tf.sqrt(tf.reduce_sum(tf.square(t), reduction_indices = 1));
if normalized:
s = t.get_shape().as_list();
return tf.reduce_mean(tf.squared_difference(d, tf.constant(length / s[0], "float32")));
else:
return tf.reduce_mean(tf.squared_difference(d, tf.constant(length, "float32")));
machine_vision_c.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录