Skip to content

Commit ee1340a

Browse files
bkRyusimhunkim
authored andcommitted
Update lab-03-2-minimizing_cost_gradient_update.py (hunkim#70)
Changed tf.reduce_sum to tf.reduce_mean. About issue hunkim#69
1 parent a6142b6 commit ee1340a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lab-03-2-minimizing_cost_gradient_update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
hypothesis = X * W
1818

1919
# cost/loss function
20-
cost = tf.reduce_sum(tf.square(hypothesis - Y))
20+
cost = tf.reduce_mean(tf.square(hypothesis - Y))
2121

2222
# Minimize: Gradient Descent using derivative: W -= learning_rate * derivative
2323
learning_rate = 0.1

0 commit comments

Comments
 (0)