Skip to content

Instantly share code, notes, and snippets.

View lmyslinski's full-sized avatar

Łukasz Myśliński lmyslinski

View GitHub Profile
with tf.Session() as sess:
# Set up all the tensors, variables, and operations.
input = tf.constant(x_with_bias)
target = tf.constant(np.transpose([y]).astype(np.float32))
weights = tf.Variable(tf.random_normal([2, 1], 0, 0.1))
tf.initialize_all_variables().run()
yhat = tf.matmul(input, weights)
yerror = tf.sub(yhat, target)