|
|
|
@ -141,7 +141,7 @@ class BCEWithLogitsLoss(fluid.dygraph.Layer):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CrossEntropyLoss(fluid.dygraph.Layer):
|
|
|
|
class CrossEntropyLoss(fluid.dygraph.Layer):
|
|
|
|
"""
|
|
|
|
r"""
|
|
|
|
This operator implements the cross entropy loss function with softmax. This function
|
|
|
|
This operator implements the cross entropy loss function with softmax. This function
|
|
|
|
combines the calculation of the softmax operation and the cross entropy loss function
|
|
|
|
combines the calculation of the softmax operation and the cross entropy loss function
|
|
|
|
to provide a more numerically stable gradient.
|
|
|
|
to provide a more numerically stable gradient.
|
|
|
|
@ -623,7 +623,7 @@ class BCELoss(fluid.dygraph.Layer):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class NLLLoss(fluid.dygraph.Layer):
|
|
|
|
class NLLLoss(fluid.dygraph.Layer):
|
|
|
|
"""
|
|
|
|
r"""
|
|
|
|
:alias_main: paddle.nn.NLLLoss
|
|
|
|
:alias_main: paddle.nn.NLLLoss
|
|
|
|
:alias: paddle.nn.NLLLoss,paddle.nn.layer.NLLLoss,paddle.nn.layer.loss.NLLLoss
|
|
|
|
:alias: paddle.nn.NLLLoss,paddle.nn.layer.NLLLoss,paddle.nn.layer.loss.NLLLoss
|
|
|
|
|
|
|
|
|
|
|
|
|