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

报错,FourierBlock权重为复数,训练时会增加一个维度 #10

Open
Ken19981102 opened this issue Jul 13, 2023 · 4 comments
Open

Comments

@Ken19981102
Copy link

FourierBlock.weights1的权重是复数,init时是4维,在训练时变成了5维,实部和虚部分开多了一个维度,导致在compl_mul1d时维度对不齐报错

@tianzhou2011
Copy link

tianzhou2011 commented Jul 13, 2023 via email

@Ken19981102
Copy link
Author

tianzhou2011

image
能看到截图不,这是init后和训练时的FourierBlock.weights1,可以看到extra dim就是去权重的复数数值的实部和虚部被分开了。tensor(3.6024e-08+5.1638e-08j, grad_fn=)---->tensor([3.6024e-08, 5.1638e-08], device='cuda:0', grad_fn=) 。torch version是1.9.1,应该是推荐的。
————————————————————————————————————
看到一个issue貌似multi-gpu就会出现这个情况?但我单gpu跑不起来,还没验证过==
感谢你的回答!

@tianzhou2011
Copy link

tianzhou2011 commented Jul 13, 2023 via email

@Ken19981102
Copy link
Author

是的,确实遇到了这个情况,一个cfloat的变成了两个分别是实虚部float的数组,还有一点是我刚单gpu跑不会出现这种情况,multigpu会

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