Skip to content

Commit 86a663a

Browse files
committed
[readme] cross_entropy with name for TF1.0
1 parent 8dc3c04 commit 86a663a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ network = tl.layers.DenseLayer(network, n_units=10, act = tf.identity, name='out
8383

8484
# Define cost function and metric.
8585
y = network.outputs
86-
cost = tl.cost.cross_entropy(y, y_)
86+
cost = tl.cost.cross_entropy(y, y_, 'cost')
8787
correct_prediction = tf.equal(tf.argmax(y, 1), y_)
8888
acc = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
8989
y_op = tf.argmax(tf.nn.softmax(y), 1)

0 commit comments

Comments
 (0)