【读书1】【2017】MATLAB与深度学习——小批量处理(1)
在“单层神经网络训练:增量规则”部分中已经简要介绍了一些关于“时代”的内容。
The epoch is briefly introduced in the“Training of a Single-Layer Neural Network: Delta Rule” section.
作为概括,“时代”是所有训练数据完成训练周期循环的数量。
As a recap, the epoch is the number ofcompleted training cycles for all of the training data.
在批处理方法中,神经网络训练周期的次数就是一个时代,如图2-18所示。
In the batch method, the number of trainingcycles of the neural network equals an epoch, as shown in Figure 2-18.
图2-18神经网络训练周期的次数就是一个时代The number oftraining cycles of the neural network equals an epoch
这是非常明显的,因为批处理方法利用所有的数据只完成了一次训练过程。
This makes perfect sense because the batchmethod utilizes all of the data for one training process.
相反,在小批量处理中,一个时代的训练次数与每次批量处理的数据点数是相关的,因此也是随之变化的。
In contrast, in the mini batch, the numberof training processes for one epoch varies depending on the number of datapoints in each batch.
增量规则举例(Example : delta rule)
现在你可以准备撰写代码来实现增量规则了。
You are now ready to implement the deltarule as a code.
考虑一个由三个输入节点和一个输出节点组成的神经网络,如图2-19所示。
Consider a neural network that consists ofthree input nodes and one output node, as shown in Figure 2-19.
图2-19 由三个输入节点和一个输出节点组成的神经网络Neural networkthat consists of three input nodes and one output node
输出节点的**函数为sigmoid函数。
The sigmoid function is used for theactivation function of the output node.
这里我们一共有4个训练数据点,如下表中所示。
We have four training data points, as shownin the following table.
当这些数据被用于有监督学习时,每个数据点由输入、正确输出对组成。
As they are used for supervised learning,each data point consists of an input-correct output pair.
表格中最后一个加粗表示的数据为正确输出数据。
The last bold number of each dataset is thecorrect output.
让我们用这组数据训练神经网络。
Let’s train the neural network with thisdata.
根据方程2.5给出的sigmoid函数的增量规则,作为神经网络的学习规则。
The delta rule for the sigmoid function,which is given by Equation 2.5, is the learning rule.
方程2.5可以被重新设计为分步骤的详细过程,如下所示:
Equation 2.5 can be rearranged as astep-by-step process, as follows:
我们将使用SGD和批处理方法来实现神经网络的增量规则。
We will implement the delta rule using theSGD and batch methods for the example neural network.
——本文译自Phil Kim所著的《Matlab Deep Learning》
更多精彩文章请关注微信号: