Command to import mnist datasets from local directory into tensorflow

Hi greetings everyone,

Please which command should I use to import mnist datasets from my local directory into tensorflow. I have downloaded the file already, it is currently in my computer under ‘download’ file.

Please someone should help me out…

Provide the correct path to tf.keras.datasets.mnist.load_data for loading local data.

I would suggest creating a project structure similar to what’s used in the online exercises. Something like:

project_directory_name
|___ data

i.e. create a directory called “project_directory_name” and a sub-directory called “data”. I would place your notebook in the root directory “project_directory_name” and then copy or move your dataset from your download directory to the sub-directory “data”. You can then reference the file by providing the relative path e.g. "data/my_datafile.dat’ or whatever it’s called. I hope this helps.

2 Likes