AizuddinAzman
AizuddinAzman

Reputation: 1317

Keras with Theano BackEnd

im new to Keras in python, i got this warning message when after executing my code. I tried to search on google, but still didnt manage to solve this problem. Thank you in advance.

UserWarning: he "show_accuracy" argument is deprecated, instead you should pass the "accurac " metric to the model at compile time: model.compile(optimizer, loss, metrics=["accuracy"]) warnings.warn('The "show_accuracy" argument is deprecated, '

Upvotes: 1

Views: 236

Answers (1)

Dr. Snoopy
Dr. Snoopy

Reputation: 56377

In Keras < 1.0 (I believe), one would pass the show_accuracy argument to model.fit in order to display the accuracy during training.

This method has been replaced by metrics, as you can now define custom metrics that can help you during training. One of the metrics is of course, accuracy. The changes to your code to keep the same behavior are minimum:

  • Remove show_accuracy from the model.fit call.
  • Add metrics = ["accuracy"] to the model.compile call.

And that's it.

Upvotes: 1

Related Questions