tensorflow / skflow

Simplified interface for TensorFlow (mimicking Scikit Learn) for Deep Learning
Apache License 2.0
3.18k stars 441 forks source link

Off by one bug in Neural language translation example #148

Closed eli7 closed 8 years ago

eli7 commented 8 years ago

This line: https://github.com/tensorflow/skflow/blob/master/examples/neural_translation_word.py#L156 Is: idx = random.randint(0, len(X_test))

From reading the help for randint, I think it should be: idx = random.randint(0, len(X_test) - 1)

Also I got unlucky and got an index out of range exception :)