attention_ops.py 文件源码

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

项目:hart 作者: akosiorek 项目源码 文件源码
def attention_to_bbox(self, att):
        with tf.variable_scope('attention_to_bbox'):
            yx = att[..., :2] * self.inpt_size[np.newaxis, :2]
            hw = att[..., 2:4] * (self.inpt_size[np.newaxis, :2] - 1)
            bbox = tf.concat(axis=tf.rank(att) - 1, values=(yx, hw))
            bbox.set_shape(att.get_shape()[:-1].concatenate((4,)))
        return bbox
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号