資源簡(jiǎn)介
云課堂吳恩達(dá)深度學(xué)習(xí)01第二周作業(yè)中所需要的lr_utils.py和test_catvnoncat.h5和train_catvnoncat.h5文件。

代碼片段和文件信息
import?numpy?as?np
import?h5py
????
????
def?load_dataset():
????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
????test_dataset?=?h5py.File(‘datasets/test_catvnoncat.h5‘?“r“)
????test_set_x_orig?=?np.array(test_dataset[“test_set_x“][:])?#?your?test?set?features
????test_set_y_orig?=?np.array(test_dataset[“test_set_y“][:])?#?your?test?set?labels
????classes?=?np.array(test_dataset[“l(fā)ist_classes“][:])?#?the?list?of?classes
????
????train_set_y_orig?=?train_set_y_orig.reshape((1?train_set_y_orig.shape[0]))
????test_set_y_orig?=?test_set_y_orig.reshape((1?test_set_y_orig.shape[0]))
????
????return?train_set_x_orig?train_set_y_orig?test_set_x_orig?test_set_y_orig?classes
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????????880??2018-02-05?11:06??資料\lr_utils.py
?????文件??????616958??2018-02-05?11:06??資料\test_catvnoncat.h5
?????文件?????2572022??2018-02-05?11:06??資料\train_catvnoncat.h5
?????目錄???????????0??2018-03-01?16:01??資料\
評(píng)論
共有 條評(píng)論