卷积神经网络的mnist手写数字识别

上传者: baidu_39629638 | 上传时间: 2021-09-22 20:58:09 | 文件大小: 35KB | 文件类型: ZIP
手写数字识别的Tensorflow完整代码,### 1. MNIST机器学习入门

**1.1.1 简介**

下载MNIST数据集,并打印一些基本信息:
```
python download.py
```

**1.1.2 实验:将MNIST数据集保存为图片**

```
python save_pic.py
```

**1.1.3 图像标签的独热表示**

打印MNIST数据集中图片的标签:
```
python label.py
```

**1.2.1 Softmax 回归**

```
python softmax_regression.py
```

**1.2.2 两层卷积网络分类**
```
python convolutional.py
```

#### 可能出现的错误

下载数据集时可能出现网络问题,可以用下面两种方法中的一种解决:1. 使用合适的代理 2.在MNIST的官方网站上下载文件train-images-idx3-ubyte.gz、train-labels-idx1-ubyte.gz、t10k-images-idx3-ubyte.gz、t10k-labels-idx1-ubyte.gz,并将它们存储在MNIST_data/文件夹中。


#### 拓展阅读

- 本章介绍的MNIST 数据集经常被用来检验机器学习模型的性能,在它的官网(地址:http://yann.lecun.com/exdb/mnist/ )中,可以找到多达68 种模型在该数据集上的准确率数据,包括相应的论文出处。这些模型包括线性分类器、K 近邻方法、普通的神经网络、卷积神经网络等。
- 本章的两个MNIST 程序实际上来自于TensorFlow 官方的两个新手教程,地址为https://www.tensorflow.org/get_started/mnist/beginners 和 https://www.tensorflow.org/get_started/mnist/pros 。读者可以将本书的内容和官方的教程对照起来进行阅读。这两个新手教程的中文版地址为http://www.tensorfly.cn/tfdoc/tutorials/mnist_beginners.html 和http://www.tensorfly.cn/tfdoc/tutorials/mnist_pros.html。
- 本章简要介绍了TensorFlow 的tf.Tensor 类。tf.Tensor 类是TensorFlow的核心类,常用的占位符(tf.placeholder)、变量(tf.Variable)都可以看作特殊的Tensor。读者可以参阅https://www.tensorflow.org/programmers_guide/tensors 来更深入地学习它的原理。
- 常用tf.Variable 类来存储模型的参数, 读者可以参阅[https://www.tensorflow.org/programmers_guide/variables](https://www.tensorflow.org/programmers_guide/variables) 详细了解它的运行机制, 文档的中文版地址为http://www.tensorfly.cn/tfdoc/how_tos/ variables.html。
- 只有通过会话(Session)才能计算出tf.Tensor 的值。强烈建议读者 在学习完tf.Tensor 和tf.Variable 后,阅读https://www.tensorflow.org/programmers_guide/graphs 中的内容,该文档描述了TensorFlow 中 计算图和会话的基本运行原理,对理解TensorFlow 的底层原理有很 大帮助。

文件下载

资源详情

[{"title":"( 43 个子文件 35KB ) 卷积神经网络的mnist手写数字识别","children":[{"title":"mnist","children":[{"title":"save_pic.py <span style='color:#111;'> 1.09KB </span>","children":null,"spread":false},{"title":"download.py <span style='color:#111;'> 871B </span>","children":null,"spread":false},{"title":"label.py <span style='color:#111;'> 576B </span>","children":null,"spread":false},{"title":"convolutional.py <span style='color:#111;'> 3.21KB </span>","children":null,"spread":false},{"title":"softmax_regression.py <span style='color:#111;'> 2.48KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 2.49KB </span>","children":null,"spread":false},{"title":".git","children":[{"title":"logs","children":[{"title":"HEAD <span style='color:#111;'> 390B </span>","children":null,"spread":false},{"title":"refs","children":[{"title":"heads","children":[{"title":"master <span style='color:#111;'> 390B </span>","children":null,"spread":false}],"spread":true},{"title":"remotes","children":[{"title":"origin","children":[{"title":"HEAD <span style='color:#111;'> 219B </span>","children":null,"spread":false},{"title":"master <span style='color:#111;'> 166B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"packed-refs <span style='color:#111;'> 114B </span>","children":null,"spread":false},{"title":"info","children":[{"title":"exclude <span style='color:#111;'> 240B </span>","children":null,"spread":false}],"spread":true},{"title":"index <span style='color:#111;'> 537B </span>","children":null,"spread":false},{"title":"COMMIT_EDITMSG <span style='color:#111;'> 12B </span>","children":null,"spread":false},{"title":"objects","children":[{"title":"pack","children":null,"spread":false},{"title":"info","children":null,"spread":false},{"title":"4c","children":[{"title":"10b5ef56b4b5c176f4bb7e842b2d6e0a35d025 <span style='color:#111;'> 451B </span>","children":null,"spread":false}],"spread":false},{"title":"f7","children":[{"title":"361f7f7dc7c0fdccee29d1b776e901764b3485 <span style='color:#111;'> 172B </span>","children":null,"spread":false}],"spread":false},{"title":"d3","children":[{"title":"31d89e6843528ed47a0f754e9129d131267f2f <span style='color:#111;'> 1.44KB </span>","children":null,"spread":false}],"spread":false},{"title":"80","children":[{"title":"3f35c1fd049e4cd8c8e968f0299258bf5d8bab <span style='color:#111;'> 1.53KB </span>","children":null,"spread":false}],"spread":false},{"title":"4a","children":[{"title":"bb7ab7fd1fbabc8846c2e051ee5a2740770d34 <span style='color:#111;'> 22B </span>","children":null,"spread":false}],"spread":false},{"title":"07","children":[{"title":"ce3a4ef17df4fb4dfac171d39a144169552c34 <span style='color:#111;'> 535B </span>","children":null,"spread":false}],"spread":false},{"title":"9e","children":[{"title":"faf205fabd19d1da6c1646656a1be2dd5916b6 <span style='color:#111;'> 1.33KB </span>","children":null,"spread":false}],"spread":false},{"title":"f1","children":[{"title":"007ab2e89e81c60f70142d52ad83b34d7997cb <span style='color:#111;'> 484B </span>","children":null,"spread":false}],"spread":false},{"title":"42","children":[{"title":"24e743457ca5c2d4c0327dce6f5e02cc753df8 <span style='color:#111;'> 232B </span>","children":null,"spread":false}],"spread":false},{"title":"1a","children":[{"title":"84c39f05cdd3b84fb15ae42702c4c4c449a6e1 <span style='color:#111;'> 54B </span>","children":null,"spread":false}],"spread":false},{"title":"d2","children":[{"title":"90dd4c41ac2d37abac0d54162a28e00f819508 <span style='color:#111;'> 725B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"HEAD <span style='color:#111;'> 23B </span>","children":null,"spread":false},{"title":"config <span style='color:#111;'> 318B </span>","children":null,"spread":false},{"title":"refs","children":[{"title":"heads","children":[{"title":"master <span style='color:#111;'> 41B </span>","children":null,"spread":false}],"spread":false},{"title":"tags","children":null,"spread":false},{"title":"remotes","children":[{"title":"origin","children":[{"title":"HEAD <span style='color:#111;'> 32B </span>","children":null,"spread":false},{"title":"master <span style='color:#111;'> 41B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"hooks","children":[{"title":"pre-applypatch.sample <span style='color:#111;'> 424B </span>","children":null,"spread":false},{"title":"pre-push.sample <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false},{"title":"commit-msg.sample <span style='color:#111;'> 896B </span>","children":null,"spread":false},{"title":"pre-merge-commit.sample <span style='color:#111;'> 416B </span>","children":null,"spread":false},{"title":"pre-commit.sample <span style='color:#111;'> 1.60KB </span>","children":null,"spread":false},{"title":"applypatch-msg.sample <span style='color:#111;'> 478B </span>","children":null,"spread":false},{"title":"prepare-commit-msg.sample <span style='color:#111;'> 1.46KB </span>","children":null,"spread":false},{"title":"update.sample <span style='color:#111;'> 3.53KB </span>","children":null,"spread":false},{"title":"fsmonitor-watchman.sample <span style='color:#111;'> 3.01KB </span>","children":null,"spread":false},{"title":"post-update.sample <span style='color:#111;'> 189B </span>","children":null,"spread":false},{"title":"pre-rebase.sample <span style='color:#111;'> 4.78KB </span>","children":null,"spread":false},{"title":"pre-receive.sample <span style='color:#111;'> 544B </span>","children":null,"spread":false}],"spread":false},{"title":"description <span style='color:#111;'> 73B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明