MinfengZhu / DM-GAN

MIT License
187 stars 64 forks source link

When i try to train the the birds model, I encountered this problem. Coulde you help me solve this 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. #15

Closed hs457681503 closed 4 years ago

hs457681503 commented 4 years ago

When i try to train the the birds model, I encountered this problem.

Coulde you help me solve this 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.

ZirshaRiaz commented 4 years ago

Hi friend,

It seems you are one step ahead. Can you please guide me from where to get the right structure of data to generate captions.pickle file. I am facing issue in that. Because when I downloaded CUB dataset and used in this code, captons.pickle comes empty. I want to train and test this repository too.

Your help will be highly appreciated. Thanks

ZirshaRiaz commented 4 years ago

can you please mention your email id? Facing issue in registering on wechat. Thanks

On Sat, 25 Jul 2020 at 12:21, hs457681503 notifications@github.com wrote:

Hi friend,

It seems you are one step ahead. Can you please guide me from where to get the right structure of data to generate captions.pickle file. I am facing issue in that. Because when I downloaded CUB dataset and used in this code, captons.pickle comes empty. I want to train and test this repository too.

Your help will be highly appreciated. Thanks

hello,my wechat is 19845918683,

Please contact me

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MinfengZhu/DM-GAN/issues/15#issuecomment-663822012, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQCS4V3YPUGOAIAEGI2NRTR5KBXNANCNFSM4PGO2RXQ .

MinfengZhu commented 4 years ago

When i try to train the the birds model, I encountered this problem.

Coulde you help me solve this 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.

Could you please provide more information (e.g., config file or command)? If you train the model from scratch, there is no checkpoint to load.

MinfengZhu commented 4 years ago

It seems you are one step ahead. Can you please guide me from where to get the right structure of data to generate captions.pickle file. I am facing issue in that. Because when I downloaded CUB dataset and used in this code, captons.pickle comes empty. I want to train and test this repository too.

Have you downloaded the metadata for CUB dataset? python google_drive.py 1O_LtUP9sch09QH3s_EBAgLEctBQ5JBSJ ./data/bird.zip The size of captons.pickle file is 6.2M.

Please see #1 for data directory structures.

ZirshaRiaz commented 4 years ago

Thanks. I have one more question.

I am using example_filename.txt and generating images using main.py. But I am achieving IS 2.92 only. Can you please guide me why I am not getting the same mentioned IS score as you have mentioned in your paper. For FID, I am getting 65.48. Please guide me.

Thanks

MinfengZhu commented 4 years ago

Thanks. I have one more question.

I am using example_filename.txt and generating images using main.py. But I am achieving IS 2.92 only. Can you please guide me why I am not getting the same mentioned IS score as you have mentioned in your paper. For FID, I am getting 65.48. Please guide me.

Thanks

Please generate images using the following command. You should generate images using text descriptions from the whole valid dataset. python main.py --cfg cfg/eval_bird.yml --gpu 0

ZirshaRiaz commented 4 years ago

I am using this command already but with example_filename.txt. Where are the text descriptions for the validation set? Please help.

Thanks

MinfengZhu commented 4 years ago

Please do not use example_filename.txt. All captions are stored in captions.pickle. Please read dataset.py for more details.

This command will generate images for the validation set. python main.py --cfg cfg/eval_bird.yml --gpu 0