Skip to content

Commit 2b83f17

Browse files
authored
SyntaxWarning tf2-12-4-rnn_long_char.py (#268)
1 parent be54767 commit 2b83f17

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tf2/tf2-12-4-rnn_long_char.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
results = tf.model.predict(X_one_hot)
5252
for j, result in enumerate(results):
5353
index = np.argmax(result, axis=1)
54-
if j is 0: # print all for the first result to make a sentence
54+
if j == 0: # print all for the first result to make a sentence
5555
print(''.join([char_set[t] for t in index]), end='')
5656
else:
5757
print(char_set[index[-1]], end='')

0 commit comments

Comments
 (0)