TensorFlow中简单的梯度下降应用
import tensorflow as tf
import numpy as np
coefficients = np.array([[1.], [-10.], [25.]])
w = tf.Variable(0, dtype=tf.float32)
x = tf.placeholder(tf.float32, [3, 1])
cost = x[0][0]*w**2 + x[1][0]*w ...
原创
2018-07-11 09:37:59 ·
201 阅读 ·
0 评论