machine_vision_c.py 文件源码

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

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


问题


面经


文章

微信
公众号

扫码关注公众号