Guest User

Untitled

a guest
Jul 15th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. hidden_layer_1 = 1
  2. weights1 = tf.Variable(tf.random_normal((X_train.shape[1],hidden_layer_1),stddev=0.01,dtype='float32'))
  3. b1 = tf.Variable(tf.zeros((1,hidden_layer_1),dtype='float32'))
  4. input_X = tf.placeholder('float32',(None,X_train.shape[1]))
  5. input_y = tf.placeholder('float32',(None,1))
  6. predicted_out = tf.add(tf.matmul(input_X,weights1),tf.reduce_sum(b1*weights1))
  7.  
  8. loss = tf.reduce_sum(tf.square(predicted_out-input_y))
  9. optimizer = tf.train.AdamOptimizer(learning_rate=0.00001).minimize(loss)
Add Comment
Please, Sign In to add comment