common.py 文件源码

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

项目:tf-image-interpreter 作者: ThoughtWorksInc 项目源码 文件源码
def _generate_shifts(self, width, height):
    shift_x = tf.range(0, height) * self._feat_stride
    shift_y = tf.range(0, width) * self._feat_stride
    shift_x, shift_y = tf.meshgrid(shift_x, shift_y, indexing='ij')
    shifts = tf.transpose(tf.pack(
      [tf.reshape(shift_x, (-1,)),
       tf.reshape(shift_y, (-1,)),
       tf.reshape(shift_x, (-1,)),
       tf.reshape(shift_y, (-1,))],
      axis=0
    ))
    return shifts
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号