Skip to content

Commit

Permalink
Merge pull request #13 from stefan-it/imdb-example-update
Browse files Browse the repository at this point in the history
imdb example: fix deprecated warnings
  • Loading branch information
Bjarke Felbo authored Oct 17, 2017
2 parents 423f868 c5ce58a commit ac27e25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/imdb_from_scratch.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 18,7 @@
batch_size = 32

print('Loading data...')
(X_train, y_train), (X_test, y_test) = imdb.load_data(nb_words=nb_tokens)
(X_train, y_train), (X_test, y_test) = imdb.load_data(num_words=nb_tokens)
print(len(X_train), 'train sequences')
print(len(X_test), 'test sequences')

Expand All @@ -37,7 37,7 @@
metrics=['accuracy'])

print('Train...')
model.fit(X_train, y_train, batch_size=batch_size, nb_epoch=15,
model.fit(X_train, y_train, batch_size=batch_size, epochs=15,
validation_data=(X_test, y_test))
score, acc = model.evaluate(X_test, y_test, batch_size=batch_size)
print('Test score:', score)
Expand Down

0 comments on commit ac27e25

Please sign in to comment.