tensorflow / skflow

Simplified interface for TensorFlow (mimicking Scikit Learn) for Deep Learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Off by one bug in Neural language translation example

eli7 opened this issue · comments

commented

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 :)