Python / Pytorch / 计算机语言 RuntimeError: mixed dtype (CPU): expect input to have scalar type of BFloat16 2022-10-03 已阅: 68 目录 错误代码 产生原因 解决方法 错误代码 RuntimeError: mixed dtype (CPU): expect input to have scalar type of BFloat16 产生原因 将 tensor 与 numpy array 做运算,并将 Layernorm 应用到其计算结果。 解决方法 将 numpy array 换为 tensor。
近期评论