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

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]))))
]
主站蜘蛛池模板: 新密市| 当涂县| 侯马市| 昂仁县| 衡水市| 土默特左旗| 旬邑县| 大埔县| 阿合奇县| 清水河县| 屯昌县| 巩义市| 集安市| 平舆县| 衡阳县| 文登市| 安庆市| 灌南县| 呼玛县| 潞城市| 乐山市| 沾化县| 吉木乃县| 通渭县| 凤庆县| 嘉善县| 乐安县| 和静县| 牡丹江市| 简阳市| 康乐县| 军事| 许昌县| 威信县| 洛川县| 博野县| 唐山市| 科尔| 太白县| 太谷县| 福海县|