Skip to content

Update optimizers_cyclicallearningrate.ipynb #2538

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

Merged
merged 1 commit into from
Sep 15, 2021

Conversation

jvishnuvardhan
Copy link
Contributor

@jvishnuvardhan jvishnuvardhan commented Aug 3, 2021

Based on TF doc, layers.Input is recommended to be used with Keras Functional models where as layers.InputLayer is recommended to be used with Sequential models. As this tutorial is using Sequential model, i replaced layers.Input with layers.InputLayer.

This change avoids the following warning also
WARNING:tensorflow:Please add keras.layers.InputLayerinstead ofkeras.Inputto Sequential model.keras.Input is intended to be used by Functional model.

Description

Brief Description of the PR:

Fixes # (issue)

Type of change

Checklist:

  • I've properly formatted my code according to the guidelines
    • By running Black + Flake8
    • By running pre-commit hooks
  • This PR addresses an already submitted issue for TensorFlow Addons
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • This PR contains modifications to C++ custom-ops

How Has This Been Tested?

If you're adding a bugfix or new feature please describe the tests that you ran to verify your changes:
*

Based on [TF doc](https://www.tensorflow.org/api_docs/python/tf/keras/layers/InputLayer), `layers.Input` is recommended to be used with Keras Functional models where as `layers.InputLayer` is recommended to be used with Sequential models. As this tutorial is using Sequential model, i replaced `layers.Input`  with `layers.InputLayer`.

This change avoids the following warning also
`WARNING:tensorflow:Please add `keras.layers.InputLayer` instead of `keras.Input` to Sequential model. `keras.Input` is intended to be used by Functional model.`
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@google-cla google-cla bot added the cla: yes label Aug 3, 2021
@bhack bhack merged commit 1a5a2bf into tensorflow:master Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants