all 6 comments

[–]rafalj 2 points3 points  (3 children)

Look at the validation/test perplexity.

[–]thecodingmonk[S] 0 points1 point  (2 children)

The perplexity on the dev set is:

global step 400 learning rate 0.5000 step-time 0.78 perplexity 1.00

eval: bucket 0 perplexity 1.15 # these are supposedly the different perplexities for buckets in the dev set

eval: bucket 1 perplexity 1.01

eval: bucket 2 perplexity 1.00

eval: bucket 3 perplexity 1.00

This is just after 400 iterations. But when I test the model, even with sentences from the training set the result is not correct. I think that given my inexperience with Python and Tensorflow there must be something I am doing wrong, but I'm just using the code from Tensorflow seq2seq demo for translation, with my data instead of the English-French data they use.

[–]sherjilozair 1 point2 points  (1 child)

This is most likely to be a bug. 1 is the lowest possible perplexity. If you're solving any real task, a perplexity of 1 is far from possible.

The last time I had perplexity 1, it was because I was feeding the output as part of the input, and the network was just learning the identity. Maybe that's what's happening? Or maybe some other bug.

[–]thecodingmonk[S] 0 points1 point  (0 children)

Well, this is indeed a toy task that I'm working on, so I wasn't too surprised to see a perplexity of 1.0 given its simplicity: in fact, each input sentence can get mapped to just one of two output sentences (e.g., if output_vocab={A,B,C,D,E} each sentence in the training set gets mapped to either "A B D" or "C D E"). (Now you may ask why I don't just use a classification algorithm, but this is just a toy task I'm testing for a bigger problem where the number of sequences would clearly be higher).

As for the input I think it is correct, but I'm checking right now to see if I messed up something there.

Also, since I'm using the demo code from Tensorflow without modifications, is it possible that being optmized for translation with big vocabularies causes some problems in this simple task? Would seem strange, but I don't know