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

张量大小不匹配 #21

Open
SupremeU opened this issue Oct 27, 2024 · 3 comments
Open

张量大小不匹配 #21

SupremeU opened this issue Oct 27, 2024 · 3 comments

Comments

@SupremeU
Copy link

Screenshot 2024-10-27 111602
请问这里张量大小不匹配是什么原因
style经过 dilation_layer变成了[5, 512, 4, 22], 而add_position2D为dmodel=256

@dailenson
Copy link
Owner

你有修改过代码嘛?我这边运行是没问题的。这里报错指的的是添加位置编码的时候尺寸不一致,但按道理不会出现这个bug

@SupremeU
Copy link
Author

没改过 可是conv5_x输出通道数确实是512 与d_model大小不一致

@dailenson
Copy link
Owner

conv5_x的输出通道和d_model的大小应该都是512。你看下你的配置参数里面d_model是不是被改成了256?配置参数指的是configs目录下yml文件里面的MODEL下的EMB_DIM: 512

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