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

Update legacy API usage in get_started.ipynb #6932

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

james47
Copy link
Contributor

@james47 james47 commented Oct 27, 2024

Motivation for features / changes

As title. Current code no longer runs in the newer TF version (2.17.0 on Colab) with the following error / warning:

AttributeError                            Traceback (most recent call last)
[<ipython-input-19-f1056f2ad84b>](https://localhost:8080/#) in <cell line: 5>()
     24 
     25   # Reset metrics every epoch
---> 26   train_loss.reset_states()
     27   test_loss.reset_states()
     28   train_accuracy.reset_states()

AttributeError: 'Mean' object has no attribute 'reset_states'
/usr/local/lib/python3.10/dist-packages/keras/src/layers/reshaping/flatten.py:37: UserWarning: Do not pass an `input_shape`/`input_dim` argument to a layer. When using Sequential models, prefer using an `Input(shape)` object as the first layer in the model instead.
  super().__init__(**kwargs)

Technical description of changes

N/A

Screenshots of UI changes (or N/A)

N/A

Detailed steps to verify changes work correctly (as executed by you)

Run on Colab

Alternate designs / implementations considered (or N/A)

N/A

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@arcra arcra merged commit 14820d1 into tensorflow:master Nov 11, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants