2.2神經網絡優化之學習率

學習率learn_rate:每次參數更新的幅度 參數的更新聽從下面的公式 python #設損失函數loss=(w+1)^2,令w的初值爲5.反向傳播求最優w,即最小loss對應的w import tensorflow as tf #定義初始w爲5 w = tf.Variable(tf.constant(5,dtype=tf.float32)) #定義損失函數爲loss # b = tf.cons
相關文章
相關標籤/搜索