-
Notifications
You must be signed in to change notification settings - Fork 54
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
训练过程出现的问题 #15
Comments
你好,能否提供下运行的方法和命令? |
谢谢啦 |
另外,output设置成mlp,lfm, nfm都会出现类似的问题,都会在prediction.py、使用self.fc()方法的这一行报错 |
啊 可是我设置1就报错这个 |
MPCN的num_fea是1,确定是最新版吗: |
哇 非常感谢你的耐心回答,真是num_fea的问题 |
你好,我开始训练之后出现维度不匹配的问题,不知道是什么原因,也没有找到有效的解决办法,请问如何解决这个问题。 user config: Traceback (most recent call last): |
这个应该是预加载的字典与设置的大小不一样的缘故,检查下,要么修改下voca_size要么修改下字典,试试 |
已经解决了,谢谢大佬回复,辛苦
…------------------ 原始邮件 ------------------
发件人: HT Liu ***@***.***>
发送时间: 2022年4月2日 09:17
收件人: ShomyLiu/Neu-Review-Rec ***@***.***>
抄送: xiulingque ***@***.***>, Comment ***@***.***>
主题: Re: [ShomyLiu/Neu-Review-Rec] 训练过程出现的问题 (#15)
这个应该是预加载的字典与设置的大小不一样的缘故,检查下,要么修改下voca_size要么修改下字典,试试
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
你好,我开始训练之后出现size mismatch的问题,不知道是什么原因,是torch版本不一样吗?我在电脑上装的1.5.0+cpu;或者是什么其他原因?
2020-10-14 11:25:57 Epoch 0...
Traceback (most recent call last):
File "F:\MyProgram\PyCharm\Neu-Review-Rec-master\main.py", line 213, in
fire.Fire()
File "E:\Program Files (x86)\Python-3.6.8\lib\site-packages\fire\core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "E:\Program Files (x86)\Python-3.6.8\lib\site-packages\fire\core.py", line 468, in _Fire
target=component.name)
File "E:\Program Files (x86)\Python-3.6.8\lib\site-packages\fire\core.py", line 672, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "F:\MyProgram\PyCharm\Neu-Review-Rec-master\main.py", line 85, in train
output = model(train_datas)
File "E:\Program Files (x86)\Python-3.6.8\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "F:\MyProgram\PyCharm\Neu-Review-Rec-master\framework\models.py", line 42, in forward
output = self.predict_net(ui_feature, uids, iids).squeeze(1)
File "E:\Program Files (x86)\Python-3.6.8\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "F:\MyProgram\PyCharm\Neu-Review-Rec-master\framework\prediction.py", line 32, in forward
return self.model(feature, uid, iid)
File "E:\Program Files (x86)\Python-3.6.8\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "F:\MyProgram\PyCharm\Neu-Review-Rec-master\framework\prediction.py", line 140, in forward
fm_out = self.build_fm(feature)
File "F:\MyProgram\PyCharm\Neu-Review-Rec-master\framework\prediction.py", line 129, in build_fm
fm_linear_part = self.fc(input_vec)
File "E:\Program Files (x86)\Python-3.6.8\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "E:\Program Files (x86)\Python-3.6.8\lib\site-packages\torch\nn\modules\linear.py", line 87, in forward
return F.linear(input, self.weight, self.bias)
File "E:\Program Files (x86)\Python-3.6.8\lib\site-packages\torch\nn\functional.py", line 1610, in linear
ret = torch.addmm(bias, input, weight.t())
RuntimeError: size mismatch, m1: [128 x 64], m2: [128 x 1] at C:\w\b\windows\pytorch\aten\src\TH/generic/THTensorMath.cpp:41
The text was updated successfully, but these errors were encountered: