Skip to content

Commit 843dc02

Browse files
committed
1 lesson
0 parents  commit 843dc02

File tree

74 files changed

+26177
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+26177
-0
lines changed

1 Neural Networks and Deep Learning/Week 2/Logistic Regression as a Neural Network/.ipynb_checkpoints/Logistic+Regression+with+a+Neural+Network+mindset+v5-checkpoint.ipynb

+1,102
Large diffs are not rendered by default.

1 Neural Networks and Deep Learning/Week 2/Logistic Regression as a Neural Network/Logistic+Regression+with+a+Neural+Network+mindset+v4+-+Stanford.ipynb

+1,143
Large diffs are not rendered by default.

1 Neural Networks and Deep Learning/Week 2/Logistic Regression as a Neural Network/Logistic+Regression+with+a+Neural+Network+mindset+v4.ipynb

+1,143
Large diffs are not rendered by default.

1 Neural Networks and Deep Learning/Week 2/Logistic Regression as a Neural Network/Logistic+Regression+with+a+Neural+Network+mindset+v5.ipynb

+1,424
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import numpy as np
2+
import h5py
3+
4+
5+
def load_dataset():
6+
train_dataset = h5py.File('datasets/train_catvnoncat.h5', "r")
7+
train_set_x_orig = np.array(train_dataset["train_set_x"][:]) # your train set features
8+
train_set_y_orig = np.array(train_dataset["train_set_y"][:]) # your train set labels
9+
10+
test_dataset = h5py.File('datasets/test_catvnoncat.h5', "r")
11+
test_set_x_orig = np.array(test_dataset["test_set_x"][:]) # your test set features
12+
test_set_y_orig = np.array(test_dataset["test_set_y"][:]) # your test set labels
13+
14+
classes = np.array(test_dataset["list_classes"][:]) # the list of classes
15+
16+
train_set_y_orig = train_set_y_orig.reshape((1, train_set_y_orig.shape[0]))
17+
test_set_y_orig = test_set_y_orig.reshape((1, test_set_y_orig.shape[0]))
18+
19+
return train_set_x_orig, train_set_y_orig, test_set_x_orig, test_set_y_orig, classes
20+

0 commit comments

Comments
 (0)