Skip to content

Commit a6e39cf

Browse files
committed
[cost] for TF 11
1 parent 72a1fbd commit a6e39cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorlayer/cost.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def cross_entropy(output, target, name=None):
3434
"""
3535
assert name is not None, "Please give a unique name to tl.cost.cross_entropy"
3636

37-
if tf.__version__ <= "0.12":
37+
if tf.__version__ <= "0.11":
3838
return tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(logits=output, targets=target))
3939
else: # TF 1.0
4040
return tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(labels=target, logits=output, name=name))

0 commit comments

Comments
 (0)