w = tf.Variable(0.0, name='weights')
y_model = model(X, w)
cost = tf.square(Y - y_model)
train_op = tf.train.GradientDescentOptimizer(0.01).minimize(cost)
How to Use Linear Regression Model with My Own Data on Tensorflow