当前位置: 首页> 健康> 科研 > 哪个网站可以查企业信息_今日重大新闻事件_外贸seo是啥_seo排名优化方法

哪个网站可以查企业信息_今日重大新闻事件_外贸seo是啥_seo排名优化方法

时间:2025/7/12 20:26:13来源:https://blog.csdn.net/qq_27390023/article/details/146436331 浏览次数:0次
哪个网站可以查企业信息_今日重大新闻事件_外贸seo是啥_seo排名优化方法

AlphaFold3  rigid_utils 模块的 rot_matmul 和 rot_vec_mul 函数实现了手动计算两个旋转矩阵的乘法 A×B 以及矩阵-向量乘法 R×t, 避免了直接用矩阵乘法的AMP(Automatic Mixed Precision)问题。

源代码:

def rot_matmul(a: torch.Tensor, b: torch.Tensor
) -> torch.Tensor:"""Performs matrix multiplication of two rotation matrix tensors. Writtenout by hand to avoid AMP downcasting.Args:a: [*, 3, 3] left multiplicandb: [*, 3, 3] right multiplicandReturns:The product ab"""def row_mul(i):return torch.stack([a[..., i, 0] * b[..., 0, 0]+ a[..., i, 1] * b[..., 1, 0]+ a[..., i, 2] * b[..., 2, 0],a[..., i, 0] * b[..., 0, 1]+ a[..., i, 1] * b[..., 1, 1]+ a[..., i, 2] * b[..., 2, 1],a[..., i, 0] * b[..., 0, 2]+ a[..., i, 1] * b[..., 1, 2]+ a[..., i, 2] * b[..., 2, 2],],dim=-1,)return torch.stack([row_mul(0), row_mul(1), row_mul(2),], dim=-2)def rot_vec_mul(r: torch.Tensor, t: torch.Tensor
) -> torch.Tensor:"""Applies a rotation to a vector. Written out by hand to avoid transferto avoid AMP downcasting.Args:r: [*, 3, 3] rotation matricest: [*, 3] coordinate tensorsReturns:[*, 3] rotated coordinates"""x, y, z = torch.unbind(t, dim=-1)return torch.stack([r[..., 0, 0] * x + r[..., 0, 1] * y + r[..., 0, 2] * z,r[..., 1, 0] * x + r[..., 1, 1] * y + r[..., 1, 2] * z,r[..., 2, 0] * x + r[..., 2, 1] * y + r[..., 2, 2] * z,],dim=-1,)

代码解读:

def rot_matmul(a: torch.Tensor, b: torch.Tensor
) -> torch.Tensor:

关键字:哪个网站可以查企业信息_今日重大新闻事件_外贸seo是啥_seo排名优化方法

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: