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: Given groups=1, weight of size [512, 1, 10], expected input[1, 182741, 1] to have 1 channels, but got 182741 channels instead #25

Open
Justsenger opened this issue Jun 22, 2023 · 4 comments

Comments

@Justsenger
Copy link

执行:python emotion_extract.py --filelists filelists/train.txt filelists/val.txt时出现以上错误,我不知道是代码里面有什么问题还是我哪里操作不对。

@weiku-233
Copy link

请问一下你解决了没有?我也遇到相同的问题

@jamesD33064
Copy link

版本問題(?
transformers版本用4.25.1

@weiku-233
Copy link

版本問題(? transformers版本用4.25.1

十分感谢,在更改版本后问题得到解决。

@Justsenger
Copy link
Author

请问一下你解决了没有?我也遇到相同的问题

没看见回复,我不是改版本解决的,我是在emotion_extract.py文件77行添加:
y = y.unsqueeze(0)
解决的,就是加了一个维度。

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

3 participants