reduce_mean 썸네일형 리스트형 Linear Regression Ex1 H(x) = wx + b 의 Linear Regression example code import tensorflow as tf # X and Y data x_train = [1,2,3] y_train = [1,2,3] W = tf.Variable(tf.random_normal([1]), name = 'weight') b = tf.Variable(tf.random_normal([1]), name = 'bias') # Our hypothesis XW + b hypothesis = x_train * W + b # cost/Loss function cost = tf.reduce_mean(tf.square(hypothesis - y_train)) # Minimize optimizer = tf.train.Gradi.. 더보기 이전 1 다음