Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new API type: Keras Callback #61

Closed
seanpmorgan opened this issue Mar 2, 2019 · 4 comments · Fixed by #313
Closed

Add new API type: Keras Callback #61

seanpmorgan opened this issue Mar 2, 2019 · 4 comments · Fixed by #313
Labels
callbacks help wanted Needs help as a contribution

Comments

@seanpmorgan
Copy link
Member

Per #58 and our monthly discussion in March, Keras Callbacks seem like they are within scope for TF Addons. This new addition will require:

  • Adding a new directory in tensorflow_addons which will hold keras callbacks
  • Some initial contribution guidelines for adding new callbacks
    • e.g. sub-class the abstract base class
  • Addition to the projects central BUILD file
  • Updating the README/CONTRIBUTINg docs

This will ideally include a new callback as an example, but not necessarily.

@seanpmorgan seanpmorgan added the help wanted Needs help as a contribution label Mar 2, 2019
@Gokkulnath
Copy link
Contributor

Gokkulnath commented Apr 3, 2019

@seanpmorgan I would like work on this.. I am creating a branch in my fork to work on it.. do you want the single PR or multiple incremental ones ? Is there any Callback feature you are looking for ? i am thinking of implementing OneCycleLR Policy as an example. Thanks in advance

P.S : My Understanding is to set up the folder structure with corresponding BUILD and README file for callbacks and then port a sample callback from tf.contrib using the latest tf2 keras api.. Is my understanding correct ?

@Squadrick
Copy link
Member

@Gokkulnath Any update on this?

@Gokkulnath
Copy link
Contributor

Gokkulnath commented Jun 13, 2019

@Squadrick Thanks for reminding me. I am new to opensource contribution so was not sure how to proceed further. I have the folder structure ready. I need help on how the callbacks need to be implemented? Should i inherit from tf.keras.callbacks.Callback and create custom callback ?

P.S: Shall i proceed with OneCycleLR or do you have an simpler Callback in mind ?
Can we add more details to contributor's Guide so that it will be easy for newcomers ? Especially explaining the project folder structure and writing tests?
I am not sure how tests can be written for a callback.
Thanks in advance

@Squadrick
Copy link
Member

@Gokkulnath Took a look at your folder structure, it's just what we need. One small nit, you need to set your name and email for your commits by using git config like this.

As for the implementation, you'll need to inherit from tf.keras.callbacks.Callback. Check out LearningRateScheduler for a working example of how a callback in implemented. Here is how that callback is tested.

You can proceed with OneCycleLR since you've gotten started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
callbacks help wanted Needs help as a contribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants