Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (CUDABFloat16Type) should be the same #138

Open
l2j5 opened this issue Sep 6, 2024 · 1 comment

Comments

@l2j5
Copy link

l2j5 commented Sep 6, 2024

RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (CUDABFloat16Type) should be the same这个是为什么?改了好多地方了,都是数据类型需要转换

@linbingkong
Copy link

RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (CUDABFloat16Type) should be the same这个是为什么?改了好多地方了,都是数据类型需要转换

将这句代码enc_out, n_vars = self.patch_embedding(x_enc.to(torch.bfloat16))改成enc_out, n_vars = self.patch_embedding(x_enc.to(torch.float))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants