From 99d1446a8ba3bddf899026a030ed6ab2f44a6531 Mon Sep 17 00:00:00 2001 From: JiabinYang Date: Wed, 14 Nov 2018 05:49:51 +0000 Subject: [PATCH] test=develop --- python/paddle/fluid/layers/nn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 835ec4506a9..4472f20409f 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -4412,7 +4412,7 @@ def hsigmoid(input, out = helper.create_variable_for_type_inference(dtype) pre_out = helper.create_variable_for_type_inference(dtype) dim = input.shape[1] - if ((num_classes < 2) or (num_classes is None)) and (not is_costum): + if ((num_classes is None) or (num_classes < 2)) and (not is_costum): raise ValueError( "num_classes must not be less than 2 with default tree") -- GitLab