基础理论部分
关于反向传播的英文图文解释
关于神经网络的基础知识回顾
程序员必须掌握的核心算法有哪些?
学习数据准备
首先我们要下载神经网络训练的数据,使用终端下载数据
以下是我的安装显示,我们用网站的方法要注意的问题是在Python导入数据时候,最后的下载路径不能直接用,要改成自己的路径。
mndata = MNIST('/home/warmtree/python-mnist/data')
(base) warmtree@warmtree-HP-Pavilion-Laptop-15-cc5xx:~$ python3
Python 3.7.3 (default, Mar 27 2019, 22:11:17)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mnist import MNIST
>>> mndata = MNIST('/home/warmtree/python-mnist/data')
>>> images, labels = mndata.load_training()
>>> images, labels = mndata.load_training()
(base) warmtree@warmtree-HP-Pavilion-Laptop-15-cc5xx:~$ git clone https://github.com/sorki/python-mnist
正克隆到 'python-mnist'...
remote: Enumerating objects: 217, done.
remote: Total 217 (delta 0), reused 0 (delta 0), pack-reused 217
接收对象中: 100% (217/217), 41.85 KiB | 492.00 KiB/s, 完成.
处理 delta 中: 100% (105/105), 完成.
(base) warmtree@warmtree-HP-Pavilion-Laptop-15-cc5xx:~$ cd python-mnist
(base) warmtree@warmtree-HP-Pavilion-Laptop-15-cc5xx:~/python-mnist$ ./get_data.sh
--2019-11-15 04:03:20-- http://yann.lecun.com/exdb/mnist/
正在解析主机 yann.lecun.com (yann.lecun.com)... 216.165.22.6
正在连接 yann.lecun.com (yann.lecun.com)|216.165.22.6|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度: 29170 (28K) [text/html]
正在保存至: “data/index.html.tmp”
index.html.tmp 100%[===================>] 28.49K --.-KB/s 用时 0.1s
2019-11-15 04:03:20 (282 KB/s) - 已保存 “data/index.html.tmp” [29170/29170])
正在载入 robots.txt;请忽略错误消息。
--2019-11-15 04:03:20-- http://yann.lecun.com/robots.txt
再次使用存在的到 yann.lecun.com:80 的连接。
已发出 HTTP 请求,正在等待回应... 404 Not Found
2019-11-15 04:03:20 错误 404:Not Found。
正在删除 data/index.html.tmp 因为它应该被指定了拒绝下载。
--2019-11-15 04:03:20-- http://yann.lecun.com/
再次使用存在的到 yann.lecun.com:80 的连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度: 38324 (37K) [text/html]
正在保存至: “data/index.html.tmp”
index.html.tmp 100%[===================>] 37.43K --.-KB/s 用时 0.02s
2019-11-15 04:03:20 (1.52 MB/s) - 已保存 “data/index.html.tmp” [38324/38324])
正在删除 data/index.html.tmp 因为它应该被指定了拒绝下载。
--2019-11-15 04:03:20-- http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz
再次使用存在的到 yann.lecun.com:80 的连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度: 9912422 (9.5M) [application/x-gzip]
正在保存至: “data/train-images-idx3-ubyte.gz”
train-images-idx3-u 100%[===================>] 9.45M 3.07MB/s 用时 3.1s
2019-11-15 04:03:24 (3.07 MB/s) - 已保存 “data/train-images-idx3-ubyte.gz” [9912422/9912422])
--2019-11-15 04:03:24-- http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz
再次使用存在的到 yann.lecun.com:80 的连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度: 28881 (28K) [application/x-gzip]
正在保存至: “data/train-labels-idx1-ubyte.gz”
train-labels-idx1-u 100%[====