Skip to content

Commit 7d685b4

Browse files
Soo Sungcopybara-github
authored andcommitted
Fixing datafile download command
PiperOrigin-RevId: 519851539
1 parent 257ac75 commit 7d685b4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

site/en/tutorials/images/transfer_learning_with_hub.ipynb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,15 @@
321321
},
322322
"outputs": [],
323323
"source": [
324-
"data_root = tf.keras.utils.get_file(\n",
325-
" 'flower_photos',\n",
324+
"import pathlib\n",
325+
"\n",
326+
"data_file = tf.keras.utils.get_file(\n",
327+
" 'flower_photos.tgz',\n",
326328
" 'https://storage.googleapis.com/download.tensorflow.org/example_images/flower_photos.tgz',\n",
327-
" extract=True)"
329+
" cache_dir='.',\n",
330+
" extract=True)\n",
331+
"\n",
332+
"data_root = pathlib.Path(data_file).with_suffix('')"
328333
]
329334
},
330335
{
@@ -919,6 +924,7 @@
919924
"W_tvPdyfA-BL"
920925
],
921926
"name": "transfer_learning_with_hub.ipynb",
927+
"provenance": [],
922928
"toc_visible": true
923929
},
924930
"kernelspec": {

0 commit comments

Comments
 (0)