Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
fc1b140a
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
fc1b140a
编写于
4月 14, 2020
作者:
B
Bai Yifan
提交者:
GitHub
4月 14, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refine error message, test=develop (#23823)
* refine error message, test=develop
上级
ddd60444
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
101 addition
and
67 deletion
+101
-67
paddle/fluid/operators/deformable_conv_op.cc
paddle/fluid/operators/deformable_conv_op.cc
+40
-22
paddle/fluid/operators/deformable_conv_v1_op.cc
paddle/fluid/operators/deformable_conv_v1_op.cc
+39
-25
paddle/fluid/operators/detection/polygon_box_transform_op.cc
paddle/fluid/operators/detection/polygon_box_transform_op.cc
+1
-1
paddle/fluid/operators/teacher_student_sigmoid_loss_op.cc
paddle/fluid/operators/teacher_student_sigmoid_loss_op.cc
+21
-19
未找到文件。
paddle/fluid/operators/deformable_conv_op.cc
浏览文件 @
fc1b140a
...
@@ -138,40 +138,46 @@ class DeformableConvOp : public framework::OperatorWithKernel {
...
@@ -138,40 +138,46 @@ class DeformableConvOp : public framework::OperatorWithKernel {
PADDLE_ENFORCE_EQ
(
in_dims
.
size
(),
filter_dims
.
size
(),
PADDLE_ENFORCE_EQ
(
in_dims
.
size
(),
filter_dims
.
size
(),
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"Conv input dimension and filter dimension should be "
"Conv input dimension and filter dimension should be "
"the same. The diff
is [%d] vs
[%d]"
,
"the same. The diff
erence is [%d]:
[%d]"
,
in_dims
.
size
(),
filter_dims
.
size
()));
in_dims
.
size
(),
filter_dims
.
size
()));
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
in_dims
.
size
()
-
strides
.
size
(),
2U
,
in_dims
.
size
()
-
strides
.
size
(),
2U
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"Conv input dimension and strides "
"Conv input dimension and strides "
"dimension should be consistent."
));
"dimension should be consistent. But received input "
"dimension:[%d], strides dimension:[%d]"
,
in_dims
.
size
(),
strides
.
size
()));
PADDLE_ENFORCE_EQ
(
paddings
.
size
(),
strides
.
size
(),
PADDLE_ENFORCE_EQ
(
paddings
.
size
(),
strides
.
size
(),
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"Conv paddings dimension and Conv strides dimension "
"Conv paddings dimension and Conv strides dimension "
"should be the same. The diff
is [%d] vs
[%d]"
,
"should be the same. The diff
erence is [%d]:
[%d]"
,
paddings
.
size
(),
strides
.
size
()));
paddings
.
size
(),
strides
.
size
()));
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
in_dims
[
1
],
filter_dims
[
1
]
*
groups
,
in_dims
[
1
],
filter_dims
[
1
]
*
groups
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"The number of input channels should be equal to filter "
"The number of input channels should be equal to filter "
"channels * groups. The diff
is [%d] vs
[%d]"
,
"channels * groups. The diff
erence is [%d]:
[%d]"
,
in_dims
[
1
],
filter_dims
[
1
]
*
groups
));
in_dims
[
1
],
filter_dims
[
1
]
*
groups
));
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
filter_dims
[
0
]
%
groups
,
0
,
filter_dims
[
0
]
%
groups
,
0
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"The number of output channels should be divided by groups."
));
"The number of output channels should be divided by groups. But "
"received output channels:[%d], groups:[%d]"
,
filter_dims
[
0
],
groups
));
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
filter_dims
[
0
]
%
deformable_groups
,
0
,
filter_dims
[
0
]
%
deformable_groups
,
0
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"The number of output channels should be "
"The number of output channels should be "
"divided by deformable groups. The diff
is [%d] vs
[%d]"
,
"divided by deformable groups. The diff
erence is [%d]:
[%d]"
,
filter_dims
[
0
]
%
groups
,
0
));
filter_dims
[
0
]
%
groups
,
0
));
if
(
in_dims
[
0
]
>
im2col_step
)
{
if
(
in_dims
[
0
]
>
im2col_step
)
{
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
in_dims
[
0
]
%
im2col_step
,
0U
,
in_dims
[
0
]
%
im2col_step
,
0U
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"Input batchsize must be smaller than or divide im2col_step"
));
"Input batchsize must be smaller than or divide im2col_step. But "
"received Input batchsize:[%d], im2col_step:[%d]"
,
in_dims
[
0
],
im2col_step
));
}
}
for
(
size_t
i
=
0
;
i
<
strides
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
strides
.
size
();
++
i
)
{
...
@@ -198,46 +204,58 @@ class DeformableConvOp : public framework::OperatorWithKernel {
...
@@ -198,46 +204,58 @@ class DeformableConvOp : public framework::OperatorWithKernel {
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
output_shape
[
1
]
%
deformable_groups
,
0U
,
output_shape
[
1
]
%
deformable_groups
,
0U
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"output num_filter must divide deformable group size."
));
"output num_filter must divide deformable group size. But received "
"output num_filter:[%d], deformable group size:[%d]"
,
output_shape
[
1
],
deformable_groups
));
if
(
ctx
->
IsRuntime
())
{
if
(
ctx
->
IsRuntime
())
{
PADDLE_ENFORCE_EQ
(
output_shape
[
2
],
offset_dims
[
2
],
PADDLE_ENFORCE_EQ
(
output_shape
[
2
],
offset_dims
[
2
],
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"output height must equal to offset map height. "
"output height must equal to offset map height. "
"The diff
is [%d] vs
[%d]"
,
"The diff
erence is [%d]:
[%d]"
,
output_shape
[
2
],
offset_dims
[
2
]));
output_shape
[
2
],
offset_dims
[
2
]));
PADDLE_ENFORCE_EQ
(
output_shape
[
3
],
offset_dims
[
3
],
PADDLE_ENFORCE_EQ
(
output_shape
[
3
],
offset_dims
[
3
],
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"output width must equal to offset map width. The "
"output width must equal to offset map width. The "
"diff
is [%d] vs
[%d]"
,
"diff
erence is [%d]:
[%d]"
,
output_shape
[
3
],
offset_dims
[
3
]));
output_shape
[
3
],
offset_dims
[
3
]));
PADDLE_ENFORCE_EQ
(
offset_dims
[
1
]
%
(
filter_dims
[
2
]
*
filter_dims
[
3
]),
0U
,
PADDLE_ENFORCE_EQ
(
offset_dims
[
1
]
%
(
filter_dims
[
2
]
*
filter_dims
[
3
]),
0U
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"offset filter must divide deformable group size."
));
"offset filter must divide deformable group size. "
"But received [%d]: [%d]"
,
offset_dims
[
1
],
filter_dims
[
2
]
*
filter_dims
[
3
]));
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
offset_dims
[
1
]
/
(
2
*
filter_dims
[
2
]
*
filter_dims
[
3
]),
offset_dims
[
1
]
/
(
2
*
filter_dims
[
2
]
*
filter_dims
[
3
]),
deformable_groups
,
deformable_groups
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"offset filter must divide deformable group size."
));
"offset filter must divide deformable group size. But received "
"[%d]: [%d]"
,
offset_dims
[
1
]
/
(
2
*
filter_dims
[
2
]
*
filter_dims
[
3
]),
deformable_groups
));
PADDLE_ENFORCE_EQ
(
output_shape
[
2
],
mask_dims
[
2
],
PADDLE_ENFORCE_EQ
(
output_shape
[
2
],
mask_dims
[
2
],
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"output height must equal to mask map height. The "
"output height must equal to mask map height. The "
"diff is [%d] vs [%d]"
,
"diff
erence
is [%d] vs [%d]"
,
output_shape
[
2
],
mask_dims
[
2
]));
output_shape
[
2
],
mask_dims
[
2
]));
PADDLE_ENFORCE_EQ
(
output_shape
[
3
],
mask_dims
[
3
],
PADDLE_ENFORCE_EQ
(
output_shape
[
3
],
mask_dims
[
3
],
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"output width must equal to mask map width. The "
"output width must equal to mask map width. The "
"diff is [%d] vs [%d]"
,
"diff
erence
is [%d] vs [%d]"
,
output_shape
[
3
],
mask_dims
[
3
]));
output_shape
[
3
],
mask_dims
[
3
]));
PADDLE_ENFORCE_EQ
(
mask_dims
[
1
]
%
(
filter_dims
[
2
]
*
filter_dims
[
3
]),
0U
,
PADDLE_ENFORCE_EQ
(
mask_dims
[
1
]
%
(
filter_dims
[
2
]
*
filter_dims
[
3
]),
0U
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"mask filter must divide deformable group size."
));
"mask filter must divide deformable group size. "
"But received [%d]: [%d]"
,
mask_dims
[
1
],
filter_dims
[
2
]
*
filter_dims
[
3
]));
PADDLE_ENFORCE_EQ
(
mask_dims
[
1
]
/
(
filter_dims
[
2
]
*
filter_dims
[
3
]),
PADDLE_ENFORCE_EQ
(
mask_dims
[
1
]
/
(
filter_dims
[
2
]
*
filter_dims
[
3
]),
deformable_groups
,
deformable_groups
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"mask filter must divide deformable group size."
));
"mask filter must divide deformable group size. "
"But received [%d]: [%d]"
,
mask_dims
[
1
]
/
(
filter_dims
[
2
]
*
filter_dims
[
3
]),
deformable_groups
));
}
}
ctx
->
SetOutputDim
(
"Output"
,
framework
::
make_ddim
(
output_shape
));
ctx
->
SetOutputDim
(
"Output"
,
framework
::
make_ddim
(
output_shape
));
...
...
paddle/fluid/operators/deformable_conv_v1_op.cc
浏览文件 @
fc1b140a
...
@@ -142,36 +142,45 @@ class DeformableConvV1Op : public framework::OperatorWithKernel {
...
@@ -142,36 +142,45 @@ class DeformableConvV1Op : public framework::OperatorWithKernel {
PADDLE_ENFORCE_EQ
(
in_dims
.
size
(),
filter_dims
.
size
(),
PADDLE_ENFORCE_EQ
(
in_dims
.
size
(),
filter_dims
.
size
(),
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"Conv input dimension and filter dimension should be "
"Conv input dimension and filter dimension should be "
"the same. the diff is [%d] vs [%d]"
,
"the same. the diff
erence
is [%d] vs [%d]"
,
in_dims
.
size
(),
filter_dims
.
size
()));
in_dims
.
size
(),
filter_dims
.
size
()));
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
in_dims
.
size
()
-
strides
.
size
(),
2U
,
in_dims
.
size
()
-
strides
.
size
(),
2U
,
platform
::
errors
::
InvalidArgument
(
"Conv input dimension and strides "
platform
::
errors
::
InvalidArgument
(
"dimension should be consistent."
));
"Conv input dimension and strides "
"dimension should be consistent., But received [%d]: [%d]"
,
in_dims
.
size
(),
strides
.
size
()));
PADDLE_ENFORCE_EQ
(
paddings
.
size
(),
strides
.
size
(),
PADDLE_ENFORCE_EQ
(
paddings
.
size
(),
strides
.
size
(),
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"Conv paddings dimension and Conv strides dimension "
"Conv paddings dimension and Conv strides dimension "
"should be the same. The diff is [%d] vs [%d]"
,
"should be the same. The diff
erence
is [%d] vs [%d]"
,
paddings
.
size
(),
strides
.
size
()));
paddings
.
size
(),
strides
.
size
()));
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
in_dims
[
1
],
filter_dims
[
1
]
*
groups
,
in_dims
[
1
],
filter_dims
[
1
]
*
groups
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"The number of input channels should be equal to filter "
"The number of input channels should be equal to filter "
"channels * groups."
));
"channels * groups. The difference is [%d]: [%d]"
,
in_dims
[
1
],
filter_dims
[
1
]
*
groups
));
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
filter_dims
[
0
]
%
groups
,
0
,
filter_dims
[
0
]
%
groups
,
0
,
"The number of output channels should be divided by groups."
);
platform
::
errors
::
InvalidArgument
(
PADDLE_ENFORCE_EQ
(
filter_dims
[
0
]
%
deformable_groups
,
0
,
"The number of output channels should be divided by groups. But"
platform
::
errors
::
InvalidArgument
(
"received output channels: [%d], groups: [%d]"
,
"The number of output channels should be "
filter_dims
[
0
],
groups
));
"divided by deformable groups."
));
PADDLE_ENFORCE_EQ
(
filter_dims
[
0
]
%
deformable_groups
,
0
,
platform
::
errors
::
InvalidArgument
(
"The number of output channels should be "
"divided by deformable groups. But received [%d]: [%d]"
,
filter_dims
[
0
],
deformable_groups
));
if
(
in_dims
[
0
]
>
im2col_step
)
{
if
(
in_dims
[
0
]
>
im2col_step
)
{
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
in_dims
[
0
]
%
im2col_step
,
0U
,
in_dims
[
0
]
%
im2col_step
,
0U
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"Input batchsize must be smaller than or divide "
"Input batchsize must be smaller than or divide im2col_step"
));
"im2col_step, But received [%d]: [%d]"
,
in_dims
[
0
],
im2col_step
));
}
}
for
(
size_t
i
=
0
;
i
<
strides
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
strides
.
size
();
++
i
)
{
...
@@ -195,29 +204,34 @@ class DeformableConvV1Op : public framework::OperatorWithKernel {
...
@@ -195,29 +204,34 @@ class DeformableConvV1Op : public framework::OperatorWithKernel {
}
}
}
}
if
(
ctx
->
IsRuntime
())
{
if
(
ctx
->
IsRuntime
())
{
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
output_shape
[
1
]
%
deformable_groups
,
0U
,
output_shape
[
1
]
%
deformable_groups
,
0U
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"output num_filter must divide deformable group "
"output num_filter must divide deformable group size."
));
"size. But received [%d]: [%d]"
,
output_shape
[
1
],
deformable_groups
));
PADDLE_ENFORCE_EQ
(
output_shape
[
2
],
offset_dims
[
2
],
PADDLE_ENFORCE_EQ
(
output_shape
[
2
],
offset_dims
[
2
],
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"output height must equal to offset map height. "
"output height must equal to offset map height. "
"The diff
is [%d] vs
[%d]"
,
"The diff
erence is [%d]:
[%d]"
,
output_shape
[
2
],
offset_dims
[
2
]));
output_shape
[
2
],
offset_dims
[
2
]));
PADDLE_ENFORCE_EQ
(
output_shape
[
3
],
offset_dims
[
3
],
PADDLE_ENFORCE_EQ
(
output_shape
[
3
],
offset_dims
[
3
],
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"output width must equal to offset map width. The "
"output width must equal to offset map width. The "
"diff
is [%d] vs
[%d]"
,
"diff
erence is [%d]:
[%d]"
,
output_shape
[
3
],
offset_dims
[
3
]));
output_shape
[
3
],
offset_dims
[
3
]));
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
offset_dims
[
1
]
%
(
filter_dims
[
2
]
*
filter_dims
[
3
]),
0U
,
offset_dims
[
1
]
%
(
filter_dims
[
2
]
*
filter_dims
[
3
]),
0U
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"offset filter must divide deformable group size. "
"offset filter must divide deformable group size."
));
"But received [%d]: [%d]"
,
offset_dims
[
1
],
filter_dims
[
2
]
*
filter_dims
[
3
]));
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
offset_dims
[
1
]
/
(
2
*
filter_dims
[
2
]
*
filter_dims
[
3
]),
offset_dims
[
1
]
/
(
2
*
filter_dims
[
2
]
*
filter_dims
[
3
]),
deformable_groups
,
deformable_groups
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"offset filter must divide deformable group size."
));
"offset filter must divide deformable group size. But received "
"[%d]: [%d]"
,
offset_dims
[
1
]
/
(
2
*
filter_dims
[
2
]
*
filter_dims
[
3
]),
deformable_groups
));
}
}
ctx
->
SetOutputDim
(
"Output"
,
framework
::
make_ddim
(
output_shape
));
ctx
->
SetOutputDim
(
"Output"
,
framework
::
make_ddim
(
output_shape
));
}
}
...
...
paddle/fluid/operators/detection/polygon_box_transform_op.cc
浏览文件 @
fc1b140a
...
@@ -72,7 +72,7 @@ class PolygonBoxTransformOp : public framework::OperatorWithKernel {
...
@@ -72,7 +72,7 @@ class PolygonBoxTransformOp : public framework::OperatorWithKernel {
PADDLE_ENFORCE_EQ
(
in_dim
[
1
]
%
2
,
0
,
PADDLE_ENFORCE_EQ
(
in_dim
[
1
]
%
2
,
0
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"input's second dimension must be even. But "
"input's second dimension must be even. But "
"received: Input 2nd dim is [%d]"
,
"received: Input 2nd dim
ension
is [%d]"
,
in_dim
[
1
]));
in_dim
[
1
]));
ctx
->
SetOutputDim
(
"Output"
,
in_dim
);
ctx
->
SetOutputDim
(
"Output"
,
in_dim
);
...
...
paddle/fluid/operators/teacher_student_sigmoid_loss_op.cc
浏览文件 @
fc1b140a
...
@@ -37,22 +37,22 @@ class TeacherStudentSigmoidLossOp : public framework::OperatorWithKernel {
...
@@ -37,22 +37,22 @@ class TeacherStudentSigmoidLossOp : public framework::OperatorWithKernel {
auto
x_dims
=
ctx
->
GetInputDim
(
"X"
);
auto
x_dims
=
ctx
->
GetInputDim
(
"X"
);
auto
label_dims
=
ctx
->
GetInputDim
(
"Label"
);
auto
label_dims
=
ctx
->
GetInputDim
(
"Label"
);
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
x_dims
.
size
(),
2UL
,
x_dims
.
size
(),
2UL
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
NotFound
(
"Input(X)'s rank should be 2. But received: "
"Input(X)'s rank should be 2. But received: "
"Input(X)'s rank is [%d]"
,
"Input(X)'s rank is [%d]"
,
x_dims
.
size
()));
x_dims
.
size
()));
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
label_dims
.
size
(),
2UL
,
label_dims
.
size
(),
2UL
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
NotFound
(
"Input(Label)'s rank should be 2. But "
"Input(Label)'s rank should be 2. But "
"received Input(Label)'s rank is [%d]"
,
"received Input(Label)'s rank is [%d]"
,
label_dims
.
size
()));
label_dims
.
size
()));
if
(
ctx
->
IsRuntime
())
{
if
(
ctx
->
IsRuntime
())
{
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
x_dims
[
0
],
label_dims
[
0
],
x_dims
[
0
],
label_dims
[
0
],
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"The 1st dimension of Input(X) and Input(Label) should "
"The 1st dimension of Input(X) and Input(Label) should "
"be equal. The diff
is [%d] vs
[%d]"
,
"be equal. The diff
erence is [%d]:
[%d]"
,
x_dims
[
0
],
label_dims
[
0
]));
x_dims
[
0
],
label_dims
[
0
]));
PADDLE_ENFORCE_EQ
(
label_dims
[
1
],
1UL
,
PADDLE_ENFORCE_EQ
(
label_dims
[
1
],
1UL
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
...
@@ -135,24 +135,26 @@ class TeacherStudentSigmoidLossGradientOp
...
@@ -135,24 +135,26 @@ class TeacherStudentSigmoidLossGradientOp
x_dims
[
0
],
label_dims
[
0
],
x_dims
[
0
],
label_dims
[
0
],
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"The 1st dimension of Input(X) and Input(Label) should "
"The 1st dimension of Input(X) and Input(Label) should "
"be equal. The diff
is [%d] vs
[%d]"
,
"be equal. The diff
erence is [%d]:
[%d]"
,
x_dims
[
0
],
label_dims
[
0
]));
x_dims
[
0
],
label_dims
[
0
]));
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
x_dims
[
0
],
dy_dims
[
0
],
x_dims
[
0
],
dy_dims
[
0
],
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"The 1st dimension of Input(X) and Input(Y@Grad) should "
"The 1st dimension of Input(X) and Input(Y@Grad) should "
"be equal. The diff
is [%d] vs
[%d]"
,
"be equal. The diff
erence is [%d]:
[%d]"
,
x_dims
[
0
],
dy_dims
[
0
]));
x_dims
[
0
],
dy_dims
[
0
]));
PADDLE_ENFORCE_EQ
(
dy_dims
[
1
],
1
,
PADDLE_ENFORCE_EQ
(
platform
::
errors
::
InvalidArgument
(
dy_dims
[
1
],
1
,
"The 2nd dimension of Input(Y@Grad) should be 1. "
platform
::
errors
::
InvalidArgument
(
"But received Input(Y@Grad)'s 2nd dim is [%d]"
,
"The 2nd dimension of Input(Y@Grad) should be 1. "
dy_dims
[
1
]));
"But received Input(Y@Grad)'s 2nd dimension is [%d]"
,
dy_dims
[
1
]));
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
label_dims
[
1
],
1
,
label_dims
[
1
],
1
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"When Attr(soft_label) == false, the 2nd dimension of "
"When Attr(soft_label) == false, the 2nd dimension of "
"Input(Label) should be 1. But received Input(Label)'s 2nd dim "
"Input(Label) should be 1. But received Input(Label)'s 2nd "
"dimemsion "
"is [%d]"
,
"is [%d]"
,
label_dims
[
1
]));
label_dims
[
1
]));
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录