提交 2f494325 编写于 作者: W weixing02

adjust

上级 34d92ead
...@@ -3028,9 +3028,9 @@ def hsigmoid(input, label, num_classes=2, param_attr=None, bias_attr=None): ...@@ -3028,9 +3028,9 @@ def hsigmoid(input, label, num_classes=2, param_attr=None, bias_attr=None):
pre_out = helper.create_tmp_variable(dtype) pre_out = helper.create_tmp_variable(dtype)
dim = input.shape[1] dim = input.shape[1]
if num_classes < 2: if num_classes < 2:
raise valueError("num_classes must be lager or equal than 2.") raise ValueError("num_classes must be lager or equal than 2.")
if x.shape[0] != y.shape[1]: if input.shape[0] != label.shape[1]:
raise valueError( raise ValueError(
"input's 1-st dimension and label's 2-nd dimension must be equal they both equal to batch size." "input's 1-st dimension and label's 2-nd dimension must be equal they both equal to batch size."
) )
weights = helper.create_parameter( weights = helper.create_parameter(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册