官术网_书友最值得收藏!

Updating the network

Now the deltas have been computed, it’s time to update the network’s parameters. In most cases, we use a type of gradient descent. Let  represent the learning rate, the parameter update formula is:

This is written in TensorFlow code as follows:

eta = tf.constant(0.01)
step = [
tf.assign(w_1,
tf.subtract(w_1, tf.multiply(eta, d_w_1))),
tf.assign(b_1,
tf.subtract(b_1, tf.multiply(eta,
tf.reduce_mean(d_b_1, axis=[0])))),
tf.assign(w_2,
tf.subtract(w_2, tf.multiply(eta, d_w_2))),
tf.assign(b_2,
tf.subtract(b_2, tf.multiply(eta,
tf.reduce_mean(d_b_2, axis=[0]))))
]
主站蜘蛛池模板: 唐山市| 南京市| 修文县| 乌拉特中旗| 汉源县| 梁平县| 德昌县| 鹿邑县| 固镇县| 香格里拉县| 游戏| 澎湖县| 阳东县| 沅江市| 古田县| 密山市| 中宁县| 湛江市| 南城县| 新源县| 竹溪县| 崇明县| 招远市| 牡丹江市| 积石山| 正镶白旗| 确山县| 平武县| 城步| 上杭县| 勃利县| 河源市| 广南县| 错那县| 桃园县| 白河县| 萨嘎县| 瓮安县| 金秀| 靖边县| 体育|