本书首先简要介绍流行的TensorFlow库,并讲解如何用它训练不同的神经网络。 你将深入了解神经网络的基础知识和它背后的数学原理,以及为什么我们会选择TensorFlow训练神经网络。然后,你将实现一个简单的前馈神经网络。接下来,你将使用TensorFlow掌握神经网络的优化技术和算法,以及一些更复杂的神经网络的实现。最后,你将对如何利用TensorFlow的强大功能来训练各种复杂的神经网络有一个正确的理解。
封面图
目录
- 译者序
- 作者简介
- 审校者简介
- 前言
- 第1 章神经网络的数学原理 ················ 1
- 1.1理解线性代数 ···································· 1
- 1.1.1环境设置 ································ 2
- 1.1.2线性代数的数据结构 ············ 3
- 1.1.3线性代数运算 ························ 4
- 1.1.4求解线性方程 ······················· 9
- 1.1.5奇异值分解 ·························· 11
- 1.1.6特征值分解 ·························· 14
- 1.1.7主成分分析 ·························· 14
- 1.2微积分 ·············································· 15
- 1.2.1梯度 ······································ 16
- 1.2.2Hessian 矩阵 ························ 23
- 1.2.3行列式 ·································· 24
- 1.3最优化 ·············································· 25
- 1.4总结 ·················································· 28
- 第2 章深度前馈神经网络 ·················· 29
- 2.1定义前馈神经网络 ·························· 29
- 2.2理解反向传播 ·································· 30
- 2.3在TensorFlow 中实现前馈神经网络 ····································· 31
- 2.4分析Iris 数据集 ······························· 34
- 2.5使用前馈网络进行图像分类 ·········· 40
- 2.6总结 ·················································· 54
- 第3 章神经网络的优化 ······················· 55
- 3.1什么是优化 ······································ 55
- 3.2优化器的类型 ·································· 56
- 3.3梯度下降 ·········································· 57
- 3.3.1梯度下降的变体 ·················· 58
- 3.3.2优化梯度下降的算法 ·········· 59
- 3.4优化器的选择 ·································· 61
- 3.5总结 ·················································· 64
- 第4 章卷积神经网络 ··························· 65
- 4.1卷积神经网络概述和直观理解 ······ 66
- 4.1.1单个卷积层的计算 ·············· 66
- 4.1.2TensorFlow 中的CNN ········ 70
- 4.2卷积操作 ································· 72
- 4.2.1对图像进行卷积 ·················· 73
- 4.2.2步长 ······························ 75
- 4.3池化 ····································· 76
- 4.3.1最大池化 ······························ 77
- 4.3.2示例代码 ······························ 78
- 4.4使用卷积网络进行图像分类 ·········· 80
- 4.5总结 ································· 102
- 第5 章递归神经网络 ························· 103
- 5.1递归神经网络介绍 ························ 103
- 5.1.1RNN 实现 ·························· 105
- 5.1.2TensorFlow RNN 实现 ······ 110
- 5.2长短期记忆网络简介 ···················· 114
- 5.2.1LSTM 的生命周期 ············ 115
- 5.2.2LSTM 实现 ························ 117
- 5.3情感分析 ································ 122
- 5.3.1词嵌入 ································ 122
- 5.3.2使用RNN 进行情感分析 ························· 128
- 5.4总结 ·································· 134
- 第6 章生成模型 ·································· 135
- 6.1生成模型简介 ································ 135
- 6.1.1判别模型对生成模型 ········ 136
- 6.1.2生成模型的类型 ················ 137
- 6.2GAN ··································· 140
- 6.2.1GAN 示例 ·························· 141
- 6.2.2GAN 的种类 ······················ 150
- 6.3总结 ································· 152
- 第7 章深度信念网络 ························· 153
- 7.1理解深度信念网络 ························ 154
- 7.2训练模型 ································ 161
- 7.3标签预测 ································ 162
- 7.4探索模型的准确度 ························ 162
- 7.5DBN 在MNIST 数据集上的应用 ··· 163
- 7.5.1加载数据集 ························ 163
- 7.5.2具有256 个神经元的RBM层的DBN 的输入参数 ····· 163
- 7.5.3具有256 个神经元的RBM层的DBN 的输出 ············· 165
- 7.6DBN 中RBM 层的神经元数量的影响 ················· 165
- 7.6.1具有512 个神经元的RBM 层 ··················· 165
- 7.6.2具有128 个神经元的RBM 层 ··················· 166
- 7.6.3准确度指标对比 ················ 166
- 7.7具有两个RBM 层的DBN ············ 167
- 7.8用DBN 对NotMNIST 数据集进行分类 ····················· 169
- 7.9总结 ·································· 172
- 第8 章自编码器 ·································· 173
- 8.1自编码算法 ································ 174
- 8.2欠完备自编码器 ···························· 175
- 8.3数据集 ····································· 175
- 8.4基本自编码器 ································ 177
- 8.4.1自编码器的初始化 ············ 177
- 8.4.2AutoEncoder 类 ·················· 178
- 8.4.3应用于MNIST 数据集的基本自编码器 ···················· 180
- 8.4.4基本自编码器的完整代码 ··· 184
- 8.4.5基本自编码器小结 ············ 186
- 8.5加性高斯噪声自编码器 ················ 186
- 8.5.1自编码器类 ························ 187
- 8.5.2应用于MNIST 数据集的加性高斯自编码器 ············ 188
- 8.5.3绘制重建的图像 ················ 191
- 8.5.4加性高斯自编码器的完整代码 ······················· 192
- 8.5.5比较基本自编码器和加性高斯噪声自编码器 ············ 193
- 8.5.6加性高斯噪声自编码器小结 ······················· 194
- 8.6稀疏自编码器 ································ 194
- 8.6.1KL 散度 ······························ 194
- 8.6.2稀疏自编码器的完整代码 ························· 196
- 8.6.3应用于MNIST 数据集的稀疏自编码器 ···················· 198
- 8.6.4比较稀疏自编码器和加性高斯噪声自编码器 ············ 200
- 8.7总结 ···································· 200
- 第9 章神经网络研究 ························· 201
- 9.1神经网络中避免过拟合 ················ 201
- 9.1.1过拟合问题阐述 ················ 201
- 9.1.2过拟合解决方案 ················ 202
- 9.1.3影响效果 ···························· 203
- 9.2使用神经网络进行大规模视频处理 ······················ 204
- 9.2.1分辨率改进方案 ················ 204
- 9.2.2特征直方图基线 ················ 205
- 9.2.3定量结果 ···························· 205
- 9.3使用双分支互向神经网络进行命名实体识别 ································ 206
- 9.3.1命名实体识别的例子 ········ 206
- 9.3.2定义Twinet ························ 207
- 9.3.3结果 ···································· 208
- 9.4双向递归神经网络 ························ 208
- 9.5总结 ···································· 209
- 第10 章开始使用TensorFlow ········ 211
- 10.1环境搭建 ······································ 211
- 10.2比较TensorFlow 和Numpy ········ 212
- 10.3计算图 ·········································· 213
- 10.3.1图 ···································· 213
- 10.3.2会话对象 ························ 214
- 10.3.3变量 ································ 215
- 10.3.4域 ···································· 216
- 10.3.5数据输入 ························ 217
- 10.3.6占位符和输入字典 ········ 217
- 10.4自动微分 ·································· 218
- 10.5TensorBoard ································· 219