Closed tejas-gokhale closed 3 years ago
If you want to generate images from customized descriptions, you should modify B_VALIDATION to False.
Thanks @WhereISmyroad and @MinfengZhu . Another thing worth mentioning here is that the vocabulary (build_dictionary) of the pre-trained RNN_ENCODER and the new input captions must be the same -- that's the reason for the error. Two solutions are
Closing the issue. Thanks!
Hi,
I'm trying to load captions from txt files during validation (i.e. the if block on line 223 in datasets.py). However it gives me the following error:
RuntimeError: Error(s) in loading state_dict for RNN_ENCODER: size mismatch for encoder.weight: copying a param of torch.Size([26835, 300]) from checkpoint, where the shape is torch.Size([27297, 300]) in current model.
This has also been reported in the AttnGAN issues: https://github.com/taoxugit/AttnGAN/issues/45 Would be great if you could tell me why this error pops up using txt files.
The validation works if I use the default method.