-
Notifications
You must be signed in to change notification settings - Fork 34
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
Comments
没特别看懂,使用torch.cfloat类型不会让你多一个维度,只是每个number都是复数,你看看torch version 是不是错了
…On Thu, Jul 13, 2023 at 9:47 AM cui huan ***@***.***> wrote:
FourierBlock.weights1的权重是复数,init时是4维,在训练时变成了5维,实部和虚部分开多了一个维度,导致在compl_mul1d时维度对不齐报错
—
Reply to this email directly, view it on GitHub
<#10>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3JGO4ON2TK64ILQWDT4GDXP5HURANCNFSM6AAAAAA2IH2R5U>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
我还真不确定,没遇到过......正常训练的时候weight的类型不应该发生变化吧==你的意思是这个weight开始时候类型是cfloat的,训练的时候变成了float?
这也可以么==
…On Thu, Jul 13, 2023 at 10:32 AM cui huan ***@***.***> wrote:
tianzhou2011 <http:///tianzhou2011>
[image: image]
<https://user-images.githubusercontent.com/48019827/253142593-99d4f4ce-791e-4079-aedf-2bfc5ef529e5.png>
能看到截图不,这是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跑不起来,还没验证过==
感谢你的回答!
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3JGO5ARYKO23XCCOMJTHLXP5M4JANCNFSM6AAAAAA2IH2R5U>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
是的,确实遇到了这个情况,一个cfloat的变成了两个分别是实虚部float的数组,还有一点是我刚单gpu跑不会出现这种情况,multigpu会 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FourierBlock.weights1的权重是复数,init时是4维,在训练时变成了5维,实部和虚部分开多了一个维度,导致在compl_mul1d时维度对不齐报错
The text was updated successfully, but these errors were encountered: