network_vgg16.py 文件源码

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

项目:HandDetection 作者: YunqiuXu 项目源码 文件源码
def _anchor_component(self):
    with tf.variable_scope('ANCHOR_' + self._tag) as scope:
      # just to get the shape right
      height = tf.to_int32(tf.ceil(self._im_info[0] / np.float32(self._feat_stride[0])))
      width = tf.to_int32(tf.ceil(self._im_info[1] / np.float32(self._feat_stride[0])))
      anchors, anchor_length = tf.py_func(generate_anchors_pre,
                                          [height, width,
                                           self._feat_stride, self._anchor_scales, self._anchor_ratios],
                                          [tf.float32, tf.int32], name="generate_anchors")
      anchors.set_shape([None, 4])
      anchor_length.set_shape([])
      self._anchors = anchors
      self._anchor_length = anchor_length

  # [Hand Detection] Batch normalization
  # http://stackoverflow.com/a/34634291/2267819
  # Note that this is different from the paper(they use another method)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号