def create_cost_spacing(self, c):
c1 = tf.slice(c, [0,1,0], [-1,-1,-1]);
c2 = tf.slice(c, [0,0,0], [-1,self.npoints-1,-1]);
d = tf.sqrt(tf.reduce_sum(tf.squared_difference(c1,c2), reduction_indices = 2));
return tf.reduce_mean(tf.squared_difference(d, tf.constant(self.model.length / (self.npoints-1), "float32")));
machine_vision_2.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录