Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
aymericdamien committed Jan 8, 2016
1 parent 844bbfc commit 742675d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/2 - Basic Classifiers/logistic_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
activation = tf.nn.softmax(tf.matmul(x, W) + b) # Softmax

# Minimize error using cross entropy
cost = -tf.reduce_sum(y*tf.log(activation)) # Cross entropy
cost = tf.reduce_mean(-tf.reduce_sum(y*tf.log(activation), reduction_indices=1)) # Cross entropy
optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(cost) # Gradient Descent

# Initializing the variables
Expand Down

0 comments on commit 742675d

Please sign in to comment.