AttnGAN
AttnGAN copied to clipboard
One possible code error in `datasets.py`
Codes in
https://github.com/taoxugit/AttnGAN/blob/0d000e652b407e976cb88fab299e8566f3de8a37/code/datasets.py#L305
should be changed to
sent_ix = random.randint(0, self.embeddings_num - 1)
since sent_ix
could be 10 when you invoke random.randint(0, 10)
, that is 1/11 probability loading wrong caption.
Hi guys, I made a mistake, the author import numpy.random as random
at the beginning was neglected by me. The same mudule and function name in Python stardard library random
misled me.
Sorry, the original code is right.