-
大小: 1.95MB文件類型: .rar金幣: 2下載: 1 次發布日期: 2023-09-02
- 語言: 其他
- 標簽: DeepLearning??
資源簡介
這是第一課第二周課程作業所需文件(不包括作業?。。?,如果需要作業的話,請移步到我的博客查看。

代碼片段和文件信息
import?numpy?as?np
import?h5py
def?load_dataset():
????train_dataset?=?h5py.File(‘train_catvnoncat.h5‘?“r“)
????train_set_x_orig?=?np.array(train_dataset[“train_set_x“][:])??#?your?train?set?features
????print(train_set_x_orig.shape)
????train_set_y_orig?=?np.array(train_dataset[“train_set_y“][:])??#?your?train?set?labels
????print(train_set_y_orig.shape)
????test_dataset?=?h5py.File(‘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[“list_classes“][:])??#?the?list?of?classes
????train_set_y_orig?=?train_set_y_orig.reshape((1?train_set_y_orig.shape[0]))
????print(train_set_y_orig.shape)
????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
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????974??2017-10-27?21:14??lr_utils.py
?????文件?????616958??2017-10-26?21:24??test_catvnoncat.h5
?????文件????2572022??2017-10-26?21:24??train_catvnoncat.h5
-----------?---------??----------?-----??----
??????????????3189954????????????????????3
評論
共有 條評論