From 2f49432538fd0d2d95e897ab37e7609acb145fe1 Mon Sep 17 00:00:00 2001 From: weixing02 Date: Thu, 31 May 2018 14:07:26 +0800 Subject: [PATCH] adjust --- python/paddle/fluid/layers/nn.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index f41a1f11955..bc3a7708363 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -3028,9 +3028,9 @@ def hsigmoid(input, label, num_classes=2, param_attr=None, bias_attr=None): pre_out = helper.create_tmp_variable(dtype) dim = input.shape[1] if num_classes < 2: - raise valueError("num_classes must be lager or equal than 2.") - if x.shape[0] != y.shape[1]: - raise valueError( + raise ValueError("num_classes must be lager or equal than 2.") + if input.shape[0] != label.shape[1]: + raise ValueError( "input's 1-st dimension and label's 2-nd dimension must be equal they both equal to batch size." ) weights = helper.create_parameter( -- GitLab