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
评论列表
文章目录