focal_loss.py 文件源码

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

项目:RetinaNet 作者: c0nn3r 项目源码 文件源码
def test_focal_loss():
    loss = FocalLoss()

    input = Variable(torch.randn(3, 5), requires_grad=True)
    target = Variable(torch.LongTensor(3).random_(5))

    print(input)
    print(target)

    output = loss(input, target)
    print(output)
    output.backward()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号