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 note in transfer_learning.ipynb related to Model.fit #2236

Conversation

kentmchenry
Copy link
Contributor

Typo
Note: These layers are active only during training, when you call Model.fit. They are inactive when the model is used in inference mode in Model.evaluate or Model.fit.

The second reference to Model.fit is not intended or correct and should be changed to Model.call as follows:

Correction
Note: These layers are active only during training, when you call Model.fit. They are inactive when the model is used in inference mode in Model.evaluate or Model.call.

Issue #60907

@kentmchenry kentmchenry requested a review from a team as a code owner June 19, 2023 06:03
@google-cla
Copy link

google-cla bot commented Jun 19, 2023

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.

@github-actions
Copy link

Preview

Preview and run these notebook edits with Google Colab: Rendered notebook diffs available on ReviewNB.com.

Format and style

Use 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/docs

$ python3 -m tensorflow_docs.tools.nbfmt notebook.ipynb
$ python3 -m tensorflow_docs.tools.nblint --arg=repo:tensorflow/docs notebook.ipynb
If commits are added to the pull request, synchronize your local branch: git pull origin bugfix/60907-update-tutorial-transfer-learning

MarkDaoust
MarkDaoust previously approved these changes Jun 20, 2023
@github-actions github-actions bot added the lgtm Community-added approval label Jun 20, 2023
@kentmchenry
Copy link
Contributor Author

@MarkDaoust looks like the Notebook format check bombed out. I followed the instructions included in the failed format check above:

[test] The following notebooks are not formatted:
- site/en/tutorials/images/transfer_learning.ipynb
Please install `nbfmt` and format:
$ python3 -m pip install -U --user git+https://github.com/tensorflow/docs
$ python3 -m tensorflow_docs.tools.nbfmt notebook.ipynb

After running nbfmt against your latest edits, nbfmt is deleting the following line that exists in the copy on master

- "provenance": [],

I'm not sure why and hoping you can provide some insight if that's correct or not and I should commit the deletion by the nbfmt tool? Can you duplicate the nbfmt deletion on your side?

Running the nbfmt tool on commit 9f88b88

python3 -m tensorflow_docs.tools.nbfmt site/en/tutorials/images/transfer_learning.ipynb 
Format notebook: site/en/tutorials/images/transfer_learning.ipynb

Resulting diff showing the deletion by nbfmt

git diff
diff --git a/site/en/tutorials/images/transfer_learning.ipynb b/site/en/tutorials/images/transfer_learning.ipynb
index 3703254ba..7268909c7 100644
--- a/site/en/tutorials/images/transfer_learning.ipynb
+++ b/site/en/tutorials/images/transfer_learning.ipynb
@@ -1077,7 +1077,6 @@
     "colab": {
       "collapsed_sections": [],
       "name": "transfer_learning.ipynb",
-      "provenance": [],
       "toc_visible": true
     },
     "kernelspec": {

@MarkDaoust
Copy link
Member

Yeah, there were some stray ones from previous nbfmt settings. Should be good now. I'll delete all the others.

@MarkDaoust MarkDaoust added the ready to pull Start merge process label Jun 22, 2023
@8bitmp3 8bitmp3 added ready to pull Start merge process and removed ready to pull Start merge process labels Jun 28, 2023
@MarkDaoust
Copy link
Member

Why didn't this merge? 🤔

@MarkDaoust MarkDaoust added ready to pull Start merge process and removed ready to pull Start merge process labels Jul 14, 2023
@copybara-service copybara-service bot merged commit 77b51f8 into tensorflow:master Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Community-added approval ready to pull Start merge process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants