MinfengZhu / DM-GAN

MIT License
187 stars 64 forks source link

assert datasets和维度不匹配问题 #2

Closed HUANGYUEXIN closed 4 years ago

HUANGYUEXIN commented 5 years ago

在复现过程中,我出现了两个问题: 1、严格按照说明放置模型文件和数据文件,出现了assert datasets错误。 2、出现了维度不匹配问题,不知道是模型位置问题还是模型提供错误。 RuntimeError: Error(s) in loading state_dict for RNN_ENCODER: size mismatch for encoder.weight: copying a param of torch.Size([1, 300]) from checkpoint, where the shape is torch.Size([5450, 300]) in current model.“data”

MinfengZhu commented 5 years ago

1、能否提供一下确切的错误信息,数据文件的目录组织请查看 #1 2、是否是模型有误?请您查看一下bird的text_encoder200.pth,encoder.weight的shape是否为[5450, 300]。text_encoder200.pth的md5值应当为11fe9392efb4f231fd29f2cf77ff357e。

hs457681503 commented 4 years ago

在复现过程中,我出现了两个问题: 1、严格按照说明放置模型文件和数据文件,出现了assert datasets错误。 2、出现了维度不匹配问题,不知道是模型位置问题还是模型提供错误。 RuntimeError: Error(s) in loading state_dict for RNN_ENCODER: size mismatch for encoder.weight: copying a param of torch.Size([1, 300]) from checkpoint, where the shape is torch.Size([5450, 300]) in current model.“data” 我也出现了和你一模一样的问题,请问是怎么解决的呢?作者可以回复一下吗?

hcudhcb commented 3 years ago

Yes, I got the same problem "RuntimeError: Error(s) in loading state_dict for RNN_ENCODER:size mismatch for encoder.weight: copying a param of torch.Size([1, 300]) from checkpoint, where the shape is torch.Size([5450, 300]) in current model.". So how could I fix it?