From where should we import training data in deeplearning

From where should we import training data in deeplearning

One way is to use preloaded datasets

from tensorflow.keras.datasets import mnist
(mnist_train_images, mnist_train_labels), (mnist_test_images, mnist_test_labels) = mnist.load_data()

There are many othweways which involves reading data from numpy arrays, pandas dataframes,labelled images etc

2 Likes

Here is the documentation for loading a pandas dataframe as a tensorflow dataset
https://www.tensorflow.org/tutorials/load_data/pandas_dataframe

1 Like

How do we import data from labelled images?

Hi @rupasri_achanta
Please elaborate your query more clearly. From where you want to download the images? What did you try to do? How are those images labeled? things like these.
Thanks!

Hi @manish_kc_06. .This is my query can you help me in it?

I had a data with labelled images of cat and not cat .I wanna load that data and predict an unknown image whether it is a cat or not and as I’m a beginner in deeplearning I was predicting it not by using tensorflow and I’m using numpy and all that activation functions and I was told that by importing following modules I can do that project:

import numpy as np
import matplotlib.pyplot as plt
import h5py
import scipy
from PIL import image from Scipy import ndimage
from lr_utils import load_dataset
%matplotlib inline

And I didn’t understand what lr_utils module will do I searched for it in google but I didn’t get it what it will do and I decided to find an alternative to that module so that I can run that project.

AND lr_utils IS USED TO LOAD DATASET AND THIS PROJECT IS IN COURSERA AND THE NEXT STEP IS

To load dataset :

train_set_x_orig,train_set_y,test_set_x_orig, test_set_y,classes=load_dataset()

We can plot the pictures of cat by
index=5
plt.imshow(train_set_x_orig[index])
print(“y=”+str(train_set_y[:,index])+",it’s a "+classes[np.squeeze(train_set_y[:,index])].decode(“utf-8”)+“picture”