Skip to content

Commit

Permalink
prints predictions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Theile committed Aug 23, 2019
1 parent b35e3e9 commit 4e8c604
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions fromNotebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,26 @@

history = model.fit(x_train, y_train,
batch_size=batch_size,
epochs=30,
epochs=48,
verbose=1,
validation_split=0.1)
validation_split=0.1)




score = model.evaluate(x_test, y_test,
batch_size=batch_size, verbose=1)

print('Test accuracy:', score[1])

text_labels = encoder.classes_

for i in range(100):
prediction = model.predict(np.array([x_test[i]]))
predicted_label = text_labels[np.argmax(prediction[0])]
#print(test_files_names.iloc[i])
print('Actual label:' + test_tags.iloc[i])
print("Predicted label: " + predicted_label)



0 comments on commit 4e8c604

Please sign in to comment.