A typical training procedure for a neural network is as follows:

(神经网络的典型训练过程如下:)

  • Define the neural network that has some learnable parameters (or weights)

    (定义具有一些可学习参数(或权重)的神经网络)

  • Iterate over a dataset of inputs

    (遍历输入数据集)

  • Process input through the network

    (通过网络处理输入)

  • Compute the loss (how far is the output from being correct)

    (计算损失(输出与正确目标的距离))

  • Propagate gradients back into the network’s parameters

    (将梯度传播回网络参数)

  • Update the weights of the network, typically using a simple update rule: weight = weight - learning_rate * gradient

    (更新网络的权重,通常使用一个简单的更新规则:weight = weight - learning_rate * gradient