machine_vision_2.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:CElegansBehaviour 作者: ChristophKirst 项目源码 文件源码
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")));
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号