Hey guys! Even though i’ve finished course 1, but i still curious about how in Course 1 Week 4 Assignment, It can load the dataset. Where did this dataset came? Was it from the package h5py? But i’m confused how to load the dataset from h5py. Can anyone help me? Because i want to build the same Cat Classifier but with my own skills. Any answers would be Appreciated! Thanks Ahead!!
h5py
is used to load the dataset. The files are stored in coursera assignment workspace.
To see the code for load_data
run the following in a new code cell:
load_data??
This is actually combination of h5py and dnn_app_utils_v3.
In “dnn_app_utlis_v3” that you imported, there is a loader to load “catvnocat.h5” as shown below.
def load_data():
train_dataset = h5py.File(‘datasets/train_catvnoncat.h5’, “r”)
train_set_x_orig = np.array(train_dataset[“train_set_x”][:]) # your train set features
train_set_y_orig = np.array(train_dataset[“train_set_y”][:]) # your train set labels
Oh yea, Thanks guys for your help! @balaji.ambresh @anon57530071