question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The "show_accuracy" argument is deprecated

See original GitHub issue

C:\Program Files\Anaconda2\lib\site-packages\keras\models.py:635: 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, ’

In your example application:

model.fit(X_train, Y_train,
              batch_size={{choice([64, 128])}},
              nb_epoch=1,
              show_accuracy=True,
              verbose=2,
              validation_data=(X_test, Y_test))

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

19reactions
JAStarkcommented, Feb 19, 2017

The issue arises from: model.fit(X_train, y_train_ohe, nb_epoch=50, batch_size=300, verbose=1, validation_split=0.1, show_metrics=True) which is from a book (Python Machine Learning by @Rasbt https://github.com/rasbt/python-machine-learning-book. It’s awesome, but I guess the code gets old quick!)

The new way of doing it means to add metrics=['accuracy'] to the model.compilesection, rather than themodel.fit`:

model.compile(loss='categorical_crossentropy', optimizer=sgd, metrics=['accuracy']) I’ve just run into this issue, and changing the code in these places worked for me 😄

5reactions
jdelangecommented, Jan 30, 2017

@isrugeek As noted above: replace the show_accuracy=True statement with metrics=['accuracy'] I’m not sure exactly where this applies, but it is either in the code you are writing, or it is in existing (example) code in Keras/Hyperas if it has not yet been fixed. Note: I had too many issues with Hyperas, I used Hyperopt instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

show accuracy is deprecated · Issue #5 · vict0rsch/deep_learning ...
The show accuracy argument is deprecated, instead you should pass the accuracy metric to the model at compile time: model.compile(optimizer, loss, ...
Read more >
Unrecognized keyword arguments: {'show_accuracy': True ...
In older versions of Keras (< 1) the argument show_accuracy=True does exist. EDIT 2: With tensorflow 2.0 keras is included. With this version ......
Read more >
Method CreateAsync - ArcGIS Developers
Creates asynchronously a new instance of the ArcGISPortal class that represents ArcGIS Online (i.e https://www.arcgis.com as Portal Uri).
Read more >
Chest X-Ray Pneumonia CNN Classification | Kaggle
... FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 ......
Read more >
Changelog · Prodigy · An annotation tool for AI, Machine ...
The deprecated --api arguments on the built-in recipes have been removed ... new, Show accuracy per entity type, tag or text category in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found