Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- model.compile(loss='mean_squared_error',
- optimizer='sgd',
- metrics=['mae', ignore_class_accuracy(0)])
- model.evaluate(test_sentences_X, to_categorical(test_tags_y, len(tag2index)))
- 680/680 [==============================] - 10s 14ms/step
- [0.0009350364973001621, 0.0011567071230862947, 0.9160830103105271]
- # summarize history for accuracy
- plt.plot(history.history['ignore_accuracy'])
- plt.plot(history.history['val_ignore_accuracy'])
- plt.title('model accuracy')
- plt.ylabel('accuracy')
- plt.xlabel('epoch')
- plt.legend(['train', 'test'], loc='upper left')
- plt.show()
- # summarize history for loss
- plt.plot(history.history['loss'])
- plt.plot(history.history['val_loss'])
- plt.title('model loss')
- plt.ylabel('loss')
- plt.xlabel('epoch')
- plt.legend(['train', 'test'], loc='upper left')
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement