predict.py 文件源码

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

项目:planet-pytorch 作者: kefth 项目源码 文件源码
def fscore(prediction):
    """ Get the fscore of the validation set. Gives a good indication
    of score on public leaderboard"""
    target = torch.FloatTensor(0, 17)
    for i, (_,y) in enumerate(val_loader):
        target = torch.cat((target, y), 0)
    fscore = fbeta_score(target.numpy(), prediction.numpy() > 0.23,
                beta=2, average='samples')
    return fscore
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号