Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the downloaded Keras dataset stored? [duplicate]

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!

like image 286
H42 Avatar asked Aug 22 '18 16:08

H42


People also ask

Where is the Mnist dataset stored?

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.

How do I load a keras dataset?

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.

What is keras dataset?

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.


1 Answers

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_subdir datasets, and given the filename fname. The final location of a file example.txt would therefore be ~/.keras/datasets/example.txt.

So look in C:\Users\My_User_Name\.keras\datasets.

like image 109
AKX Avatar answered Nov 15 '22 12:11

AKX