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.

Keras compatability -- easy addition?

See original GitHub issue

Hi! Thanks for posting this code. I thought that I would give YF a try as a drop-in optimizer. Currently, I am using Keras, and I was able to modify your code to run on Keras models by doing the following:

  • Adding a compute_gradients standalone method
  • Adding a few checks for gradients being None in apply_gradients and after_apply
  • Wrapping the YFOptimizer object in a Keras TFOptimizer

However, while it runs and my loss goes down – I am not 100% I did everything properly. Do you think you might consider adding this support?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Zehaoscommented, Jul 1, 2017

@jmhessel I have validated it on mnist dataset, got 97.64% accuracy on test set.

0reactions
JianGoForItcommented, Jul 5, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Keras as a simplified interface to TensorFlow: tutorial
Keras layers and models are fully compatible with pure-TensorFlow tensors, and as a result, Keras makes a great model definition add-on for ...
Read more >
compatible Keras and Tensorflow version - Stack Overflow
I have trouble finding the compatible Keras version could work with tensorflow 1.8. I am wondering what's the Keras version for tensorflow 1.8...
Read more >
Getting Started with Keras
Allows the same code to run on CPU or on GPU, seamlessly. User-friendly API which makes it easy to quickly prototype deep learning...
Read more >
How to Install Keras Using Python and TensorFlow | Liquid Web
Tensorflow and Keras require a python version of at least 3.7. Use the following command to install Python 3.8. # sudo yum install...
Read more >
What is a Keras model and how to use it to make predictions
Algorithm Support – Keras is not well suited for working with certain basic machine learning algorithms and models like clustering and Principal ...
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