TensorFlow - Linear Regression Test - python
import tensorflow as tf xData = [1, 2, 3, 4, 5, 6, 7] yData = [25000, 55000, 75000, 110000, 128000, 155000, 180000] W = tf.Variable(tf.random_uniform([1], -100, 100)) b = tf.Variable(tf.random_uniform([1], -100, 100)) X = tf.placeholder(tf.float32) Y = tf.placeholder(tf.float32) H = W * X + b cost = tf.reduce_mean(tf.square(H-Y)) a = tf.Variable(0.01) optimizer = tf.train.GradientDescentOptimize..
더보기