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

关于代码维度不匹配问题 #10

Open
ouyang982020 opened this issue Nov 29, 2021 · 1 comment
Open

关于代码维度不匹配问题 #10

ouyang982020 opened this issue Nov 29, 2021 · 1 comment

Comments

@ouyang982020
Copy link

在learn_framework.py中,存在函数
image
这里设置 num_labels=-1
在 pg.py 中的loss函数中存在调用,
image
这里没有给num_labels进行传参, 于是会进行报错
image
我进行查找,发现是这里出现了问题
s维度为 128, -1
作者运行时没有该问题吗

@davidlvxin
Copy link
Member

在format_batch函数中,只有满足type(batch_e2[0]) is list或者type(batch_e1[0]) is list时才会调用,这种情况只出现在训练表示学习的模型阶段,不会涉及到pg.py代码。可以检查一下是不是错误的更改了config文件,建议参考README的教程运行代码。

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