We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fc8760 commit 05944f9Copy full SHA for 05944f9
tensorlayer/cost.py
@@ -31,7 +31,7 @@ def cross_entropy(output, target, name=None):
31
- About cross-entropy: `wiki <https://en.wikipedia.org/wiki/Cross_entropy>`_.\n
32
- The code is borrowed from: `here <https://en.wikipedia.org/wiki/Cross_entropy>`_.
33
"""
34
- assert name is not None, print("Please give a unique name to tl.cost.cross_entropy")
+ assert name is not None, "Please give a unique name to tl.cost.cross_entropy"
35
36
if tf.__version__ <= "0.12":
37
return tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(logits=output, targets=target, name=name))
0 commit comments