@ -31,7 +31,6 @@ from ...fluid.layers import log_loss #DEFINE_ALIAS
from . . . fluid . layers import npair_loss #DEFINE_ALIAS
from . . . fluid . layers import npair_loss #DEFINE_ALIAS
from . . . fluid . layers import rank_loss #DEFINE_ALIAS
from . . . fluid . layers import rank_loss #DEFINE_ALIAS
from . . . fluid . layers import reshape
from . . . fluid . layers import reshape
from . . . fluid . layers import sigmoid_cross_entropy_with_logits #DEFINE_ALIAS
from . . . fluid . layers import smooth_l1 #DEFINE_ALIAS
from . . . fluid . layers import smooth_l1 #DEFINE_ALIAS
from . . . fluid . layers import softmax_with_cross_entropy #DEFINE_ALIAS
from . . . fluid . layers import softmax_with_cross_entropy #DEFINE_ALIAS
from . . . fluid . layers import square_error_cost #DEFINE_ALIAS
from . . . fluid . layers import square_error_cost #DEFINE_ALIAS
@ -66,7 +65,6 @@ __all__ = [
' npair_loss ' ,
' npair_loss ' ,
' rank_loss ' ,
' rank_loss ' ,
' sampled_softmax_with_cross_entropy ' ,
' sampled_softmax_with_cross_entropy ' ,
' sigmoid_cross_entropy_with_logits ' ,
' sigmoid_focal_loss ' ,
' sigmoid_focal_loss ' ,
' smooth_l1 ' ,
' smooth_l1 ' ,
' smooth_l1_loss ' ,
' smooth_l1_loss ' ,
@ -316,7 +314,7 @@ def binary_cross_entropy_with_logits(logit,
if reduction == ' none ' and pos_weight is None and weight is None :
if reduction == ' none ' and pos_weight is None and weight is None :
sigmoid_name = name
sigmoid_name = name
out = paddle . nn. functional . sigmoid_cross_entropy_with_logits (
out = paddle . fluid. layers . sigmoid_cross_entropy_with_logits (
logit , label , name = sigmoid_name )
logit , label , name = sigmoid_name )
one = paddle . fill_constant ( shape = [ 1 ] , value = 1.0 , dtype = logit . dtype )
one = paddle . fill_constant ( shape = [ 1 ] , value = 1.0 , dtype = logit . dtype )