-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Fix: use add_weight instead of tf.Variable in training loop guide #2388
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
base: master
Are you sure you want to change the base?
Fix: use add_weight instead of tf.Variable in training loop guide #2388
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
PreviewPreview and run these notebook edits with Google Colab: Rendered notebook diffs available on ReviewNB.com.Format and styleUse the TensorFlow docs notebook tools to format for consistent source diffs and lint for style:$ python3 -m pip install -U --user git+https://github.com/tensorflow/docsIf commits are added to the pull request, synchronize your local branch: git pull origin fix-trainable-warning-doc
|
@googlebot I signed it! |
Hi, thanks for creating the PR, but this doesn't work in Colab, please fix. |
PreviewPreview and run these notebook edits with Google Colab: Rendered notebook diffs available on ReviewNB.com.Format and styleUse the TensorFlow docs notebook tools to format for consistent source diffs and lint for style:$ python3 -m pip install -U --user git+https://github.com/tensorflow/docsIf commits are added to the pull request, synchronize your local branch: git pull origin fix-trainable-warning-doc
|
Hello there Mark, I checked it on Colab and it seems to work fine for me.
I have attached screenshots of the code working fine for me, if any error
please let me know. Thankyou
…On Mon, Jul 28, 2025 at 9:30 PM Mark Daoust ***@***.***> wrote:
*MarkDaoust* left a comment (tensorflow/docs#2388)
<#2388 (comment)>
Hi, thanks for creating the PR, but this doesn't work in Colab, please fix.
—
Reply to this email directly, view it on GitHub
<#2388 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BOXUPB75CEQQ5ICANUU7QQD3KZCJZAVCNFSM6AAAAACCNNWMASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCMRXHEZDANBTG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I have made changes please check |
Fixes [tensorflow/tensorflow#97599]

(tensorflow/tensorflow#97599).
Replaced tf.Variable(...) with add_weight(...) in the custom model to avoid training warning and ensure proper Keras weight tracking.