data_generation.py 文件源码

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

项目:deep-action-proposals 作者: escorciav 项目源码 文件源码
def proposals(self, X, return_index=False):
        """Retrieve proposals for a video based on its duration

        Parameters
        ----------
        X : ndarray
            m x 1 array with video duration

        Outputs
        -------
        Y : ndarray
            m * n_prop x 2 array with temporal proposals

        """
        if self.priors is None:
            raise ValueError('model has not been trained')

        Y = np.kron(np.expand_dims(X, 1), self.priors)
        idx = np.repeat(np.arange(X.shape[0]), self.n_prop)
        if return_index:
            return Y, idx
        return Y
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号