Hey you seem to set len(sel.lex) as the size of the latent vector.
|
len(self.lex), device=self.device, |
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.