use test_util.get_cache and change unzip to extract when downloading flowers dataset.

PiperOrigin-RevId: 350494214
Change-Id: I007cd69d5df2e501a680aa8b1c32f947186b71b1
This commit is contained in:
Yuqi Li 2021-01-06 22:52:58 -08:00 committed by TensorFlower Gardener
parent 514f050de0
commit 50ebcdcae4

View File

@ -324,9 +324,10 @@
],
"source": [
"image_path = tf.keras.utils.get_file(\n",
" 'flower_photos',\n",
" 'flower_photos.tgz',\n",
" 'https://storage.googleapis.com/download.tensorflow.org/example_images/flower_photos.tgz',\n",
" untar=True)"
" extract=True)\n",
"image_path = os.path.join(os.path.dirname(image_path), 'flower_photos')"
]
},
{
@ -526,9 +527,10 @@
"outputs": [],
"source": [
"image_path = tf.keras.utils.get_file(\n",
" 'flower_photos',\n",
" 'flower_photos.tgz',\n",
" 'https://storage.googleapis.com/download.tensorflow.org/example_images/flower_photos.tgz',\n",
" untar=True)"
" extract=True)\n",
"image_path = os.path.join(os.path.dirname(image_path), 'flower_photos')"
]
},
{