資源簡介
本資料為基于python的卷積神經網絡(CNN)實現
layer文件夾中包括卷積層、池化層、全連接層、relu層等基礎層
沒有調用tensorflow, pytorch等深度學習框架,手動實現了各層的反向傳播BP算法
代碼片段和文件信息
import?numpy?as?np
def?get_im2col_indices(x_shape?field_height?field_width?padding=1?stride=1):
??#?First?figure?out?what?the?size?of?the?output?should?be
??N?C?H?W?=?x_shape
??#(NCHW)
??#print(field_height)
??#print(field_width)
??assert?(H?+?2?*?padding?-?field_height)?%?stride?==?0
??assert?(W?+?2?*?padding?-?field_height)?%?stride?==?0
??out_height?=?(H?+?2?*?padding?-?field_height)?/?stride?+?1
??out_width?=?(W?+?2?*?padding?-?field_width)?/?stride?+?1
??out_height?=?int(out_height)
??out_width?=?int(out_width)
??#print(out_width)
??#print(out_height)
??i0?=?np.repeat(np.arange(field_height)?field_width)
??i0?=?np.tile(i0?C)
??i1?=?stride?*?np.repeat(np.arange(out_height)?out_width)
??j0?=?np.tile(np.arange(field_width)?field_height?*?C)
??j1?=?stride?*?np.tile(np.ar
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????10244??2018-11-06?23:47??code\.DS_Store
?????文件???????5548??2018-11-06?17:46??code\.ipynb_checkpoints\homework_3-checkpoint.ipynb
?????文件???????6148??2018-11-05?00:11??code\criterion\.DS_Store
?????文件???????1386??2018-11-06?16:42??code\criterion\euclidean_loss.py
?????文件???????1605??2018-11-24?06:07??code\criterion\softmax_cross_entropy.py
?????文件?????????99??2018-11-05?00:11??code\criterion\__init__.py
?????文件???????1063??2018-11-04?15:48??code\criterion\__pycache__\euclidean_loss.cpython-36.pyc
?????文件???????1372??2018-11-24?06:07??code\criterion\__pycache__\softmax_cross_entropy.cpython-36.pyc
?????文件????????246??2018-11-19?15:38??code\criterion\__pycache__\__init__.cpython-36.pyc
?????文件?????134258??2018-11-26?10:12??code\homework_3.ipynb
?????文件???????2188??2018-11-24?05:58??code\im2col.py
?????文件???????6148??2018-11-05?00:11??code\la
?????文件???????3857??2018-11-24?05:45??code\la
?????文件???????2253??2018-11-24?05:44??code\la
?????文件???????2090??2016-01-23?10:31??code\la
?????文件???????2988??2018-11-26?15:33??code\la
?????文件????????969??2018-11-06?18:44??code\la
?????文件????????679??2018-11-23?00:57??code\la
?????文件????????912??2018-11-06?16:32??code\la
?????文件????????243??2018-11-05?00:11??code\la
?????文件???????3172??2018-11-24?05:46??code\la
?????文件???????1832??2018-11-24?05:46??code\la
?????文件???????2277??2018-11-26?03:50??code\la
?????文件????????883??2018-11-22?05:38??code\la
?????文件???????1049??2018-11-23?01:01??code\la
?????文件????????975??2018-11-04?15:38??code\la
?????文件???????1108??2018-09-05?20:30??code\la
?????文件????????425??2018-11-22?05:38??code\la
?????文件????????487??2018-10-22?20:10??code\network.py
?????文件???????1096??2018-11-24?05:44??code\optimizer.py
............此處省略17個文件信息
- 上一篇:計算時間序列變化率
- 下一篇:Fisher線性分類器Python及matalb實現
評論
共有 條評論