docs icon indicating copy to clipboard operation
docs copied to clipboard

Fix dataset path construction in transfer_learning.ipynb tutorial

Open athulya-anil opened this issue 3 months ago • 1 comments

This PR fixes the incorrect dataset path in the Cats vs Dogs transfer learning tutorial. Previously the tutorial used:

PATH = os.path.join(os.path.dirname(path_to_zip), 'cats_and_dogs_filtered')

which caused a NotFoundError in Colab / TF 2.19.

This PR updates it to:

PATH = os.path.join(path_to_zip, 'cats_and_dogs_filtered')

Tested locally on Colab with TF 2.19 and it resolves the issue.

This PR fixes #101115 - https://github.com/tensorflow/tensorflow/issues/101115

athulya-anil avatar Sep 27 '25 21:09 athulya-anil

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 fix-cats-dogs-path

github-actions[bot] avatar Sep 27 '25 21:09 github-actions[bot]