gelpaths.py 文件源码

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

项目:torch-gel 作者: jayanthkoushik 项目源码 文件源码
def _find_support(B, ns, supp_thresh):
    """Find features with non-zero coefficients."""
    try:
        support = (B.norm(p=2, dim=1) >= supp_thresh).expand_as(B)
        support = torch.cat([s_j[:n_j] for s_j, n_j in
                             zip(support, ns)])
        return torch.nonzero(support)[:, 0]
    except IndexError:
        return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号