Closed eli7 closed 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))
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)
idx = random.randint(0, len(X_test) - 1)
Also I got unlucky and got an index out of range exception :)
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 :)