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

  • Deep Learning Essentials
  • Wei Di Anurag Bhardwaj Jianing Wei
  • 75字
  • 2021-06-30 19:17:54

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]))))
]
主站蜘蛛池模板: 运城市| 响水县| 宜兴市| 富锦市| 河南省| 宝鸡市| 久治县| 北京市| 诸暨市| 卢氏县| 金乡县| 同心县| 门源| 永昌县| 大方县| 台东市| 祁连县| 二连浩特市| 邵东县| 大邑县| 苍山县| 马边| 建宁县| 忻州市| 海丰县| 铜陵市| 彭水| 长垣县| 石柱| 商城县| 翁牛特旗| 大悟县| 桃源县| 塔城市| 齐齐哈尔市| 永寿县| 临城县| 阜宁县| 汉川市| 文化| 常山县|