Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hidden_layer_1 = 1
- weights1 = tf.Variable(tf.random_normal((X_train.shape[1],hidden_layer_1),stddev=0.01,dtype='float32'))
- b1 = tf.Variable(tf.zeros((1,hidden_layer_1),dtype='float32'))
- input_X = tf.placeholder('float32',(None,X_train.shape[1]))
- input_y = tf.placeholder('float32',(None,1))
- predicted_out = tf.add(tf.matmul(input_X,weights1),tf.reduce_sum(b1*weights1))
- loss = tf.reduce_sum(tf.square(predicted_out-input_y))
- optimizer = tf.train.AdamOptimizer(learning_rate=0.00001).minimize(loss)
Add Comment
Please, Sign In to add comment