I run from keras.datasets import mnist
and mnist.load_data()
to downloaded the MNIST data. But I want to know where they are stored. I am using Windows 10 and Anaconda, and I looked into here:-
C:\Users\My_User_Name\Anaconda3\Lib\site-packages\keras\datasets
I can find the text file mnist.py
, but I can't find the downloaded data. Where should I find them? Many thanks!
The format of the test set is identical to that of the training set. The primary repository for the MNIST files is currently located at yann.lecun.com/exdb/mnist. The training pixel data is stored in file train-images-idx3-ubyte. gz and the training label data is stored in file train-labels-idx1-ubyte.
To load images from a local directory, use image_dataset_from_directory() method to convert the directory to a valid dataset to be used by a deep learning model. image_size and batch_size parameters specify the size of an image and the number of dataset batches respectively.
keras. datasets module provide a few toy datasets (already-vectorized, in Numpy format) that can be used for debugging a model or creating simple code examples. If you are looking for larger & more useful ready-to-use datasets, take a look at TensorFlow Datasets.
Looking at the source for that function, we see it uses get_file()
, which says:
By default the file at the url
origin
is downloaded to the cache_dir~/.keras
, placed in the cache_subdirdatasets
, and given the filenamefname
. The final location of a fileexample.txt
would therefore be~/.keras/datasets/example.txt
.
So look in C:\Users\My_User_Name\.keras\datasets
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With