Addons: Implement Weight Decay Optimizers

Created on 18 Jan 2019  路  9Comments  路  Source: tensorflow/addons

Per the RFC, we need to move Weight Decay Optimizers from contrib to addons:

  • [x] DecoupledWeightDecayExtension
  • [x] AdamWOptimizer
  • [x] MomentumWOptimizer

This will involve inheriting from base Keras optimizer, modifying the code to match those APIs, and modifying test cases to run in TF2.

help wanted optimizers

Most helpful comment

Sorry, the last few weeks have been extremely busy and to make matters worse my machine broke. Now I'm set up again, I've adapted the optimizer, only tests are still missing. I'll be able to finish and open the pull request tomorrow, finally :)
Sorry again!

All 9 comments

Hi,
I'd look into this if nobody else has already started working on it ;)
Also, it seems someone added ShampooW in the meantime, should I move that over as well?

@PhilJd That'd be great... we'd very much appreciate the help!

We're still very early on with setting up contribution guidelines (tests, docs, etc.) so bare with us during review. Also regarding ShampooW, we had not slated the Shampoo optimizer to be moved so that's why the weight decay version is not tracked in this issue.

@PhilJd Are you still working on this issue?

@tabshaikh I've postponed this for a while as I wanted to wait until the CI is up and running. I'll take a look at it tomorrow ;)

Looks like CI is up and running now. @PhilJd are you still working on this issue?

@lgeiger @PhilJd Best way is to create an issue and assign to yourself, and if you are not working on it anymore then un-assign yourself :-) That way we can resolve who is working on what in a distributed way :-)

Sorry, the last few weeks have been extremely busy and to make matters worse my machine broke. Now I'm set up again, I've adapted the optimizer, only tests are still missing. I'll be able to finish and open the pull request tomorrow, finally :)
Sorry again!

I'm still fighting import errors of the built addons (_image_ops.so not found), so this might be delayed until tomorrow :(

@PhilJd so that occurs when trying to import tfa (e.g. running a test) using just the repository source code. You'll need to compile the C++ code ahead of time so those .so files can be found. We do this by testing with bazel. Check out the contributing readme to see the recommended way to run tests.

Was this page helpful?
0 / 5 - 0 ratings