linearregression1 03. TensorFlow Linear Regression 의 cost 최소화 구현 03. Minimizing Cost Function in Linear Regression 출처 : 모두를위한 머신러닝 (http://hunkim.github.io/ml/) 이론 간소화 한 Hypothesis¶ W, cost(W) 스캔 해보기¶ In [9]: import tensorflow as tf import matplotlib.pyplot as plt X = [1, 2, 3] Y = [1, 2, 3] # W 는 계속 바뀌므로 place holder 로 W = tf.placeholder(tf.float32) hypothesis = X * W # H(x) = Wx cost = tf.reduce_mean(tf.square(hypothesis - Y)) # cost function sess = tf.Sess.. 2018. 8. 17. 이전 1 다음