main.py 文件源码

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

项目:PoseNet 作者: bellatoris 项目源码 文件源码
def rotation_error(input, target):
    x1 = torch.norm(input, dim=1)
    x2 = torch.norm(target, dim=1)

    x1 = torch.div(input, torch.stack((x1, x1, x1, x1), dim=1))
    x2 = torch.div(target, torch.stack((x2, x2, x2, x2), dim=1))
    d = torch.abs(torch.sum(x1 * x2, dim=1))
    theta = 2 * torch.acos(d) * 180/math.pi
    theta = torch.mean(theta)

    return theta
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号