amzn / convolutional-handwriting-gan

ScrabbleGAN: Semi-Supervised Varying Length Handwritten Text Generation (CVPR20)
https://www.amazon.science/publications/scrabblegan-semi-supervised-varying-length-handwritten-text-generation
MIT License
264 stars 55 forks source link

BUG: Size of the the latent should be the alphabet and not the number of fake words... #28

Open ysig opened 2 years ago

ysig commented 2 years ago

Hey you seem to set len(sel.lex) as the size of the latent vector.

https://github.com/amzn/convolutional-handwriting-gan/blob/f7daa5045a281be23c1d20c5b74f12ffbddf69f9/models/ScrabbleGAN_baseModel.py#L109

self.lex is the lexicon and as so taking it's size will return the number of words found in the lexicon.

But as latent vector you need an one-hot on the alphabet size.

Of-course this will still work as len(self.lex) >> len(opt.n_classes) but there is probably something wrong.

rlit commented 2 years ago

Hi Thanks for your interest in this package.

You seem to be right, but since I am no longer able to edit this repo I cannot fix this. @sharonFogel can you help?