Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. model.compile(loss='mean_squared_error',
  2. optimizer='sgd',
  3. metrics=['mae', ignore_class_accuracy(0)])
  4. model.evaluate(test_sentences_X, to_categorical(test_tags_y, len(tag2index)))
  5.  
  6.  
  7. 680/680 [==============================] - 10s 14ms/step
  8. [0.0009350364973001621, 0.0011567071230862947, 0.9160830103105271]
  9.  
  10.  
  11. # summarize history for accuracy
  12. plt.plot(history.history['ignore_accuracy'])
  13. plt.plot(history.history['val_ignore_accuracy'])
  14. plt.title('model accuracy')
  15. plt.ylabel('accuracy')
  16. plt.xlabel('epoch')
  17. plt.legend(['train', 'test'], loc='upper left')
  18. plt.show()
  19. # summarize history for loss
  20. plt.plot(history.history['loss'])
  21. plt.plot(history.history['val_loss'])
  22. plt.title('model loss')
  23. plt.ylabel('loss')
  24. plt.xlabel('epoch')
  25. plt.legend(['train', 'test'], loc='upper left')
  26. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement