Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
cf70d5b3
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
cf70d5b3
编写于
10月 14, 2020
作者:
T
tangwei12
提交者:
GitHub
10月 14, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix paddle error informations (#27889)
上级
95aa5342
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
19 deletion
+29
-19
paddle/fluid/operators/distributed_ops/lookup_sparse_table_fuse_adam_op.cc
...ators/distributed_ops/lookup_sparse_table_fuse_adam_op.cc
+13
-8
paddle/fluid/operators/distributed_ops/lookup_sparse_table_fuse_sgd_op.cc
...rators/distributed_ops/lookup_sparse_table_fuse_sgd_op.cc
+13
-8
paddle/fluid/operators/distributed_ops/split_byref_op.cc
paddle/fluid/operators/distributed_ops/split_byref_op.cc
+3
-3
未找到文件。
paddle/fluid/operators/distributed_ops/lookup_sparse_table_fuse_adam_op.cc
浏览文件 @
cf70d5b3
...
...
@@ -23,22 +23,27 @@ class LargeScaleFuseAdamOp : public framework::OperatorWithKernel {
using
framework
::
OperatorWithKernel
::
OperatorWithKernel
;
void
InferShape
(
framework
::
InferShapeContext
*
ctx
)
const
override
{
PADDLE_ENFORCE
(
ctx
->
HasInput
(
"Grad"
),
"Input(Grad) of LargeScaleFuseAdamOp should not be null."
);
PADDLE_ENFORCE
(
ctx
->
HasInput
(
"Grad"
),
platform
::
errors
::
InvalidArgument
(
"Input(Grad) of LargeScaleFuseAdamOp should not be null."
));
PADDLE_ENFORCE
(
ctx
->
HasInput
(
"LearningRate"
),
"Input(LearningRate) of LargeScaleFuseAdamOp should not be null."
);
platform
::
errors
::
InvalidArgument
(
"Input(LearningRate) of LargeScaleFuseAdamOp should not be null."
));
auto
lr_dims
=
ctx
->
GetInputDim
(
"LearningRate"
);
PADDLE_ENFORCE_NE
(
framework
::
product
(
lr_dims
),
0
,
"Maybe the Input variable LearningRate has not "
"been initialized. You may need to confirm "
"if you put exe.run(startup_program) "
"after optimizer.minimize function."
);
platform
::
errors
::
InvalidArgument
(
"Maybe the Input variable LearningRate has not "
"been initialized. You may need to confirm "
"if you put exe.run(startup_program) "
"after optimizer.minimize function."
));
PADDLE_ENFORCE_EQ
(
framework
::
product
(
lr_dims
),
1
,
"Learning rate should have 1 element"
);
platform
::
errors
::
InvalidArgument
(
"Learning rate should have 1 element"
));
}
protected:
...
...
paddle/fluid/operators/distributed_ops/lookup_sparse_table_fuse_sgd_op.cc
浏览文件 @
cf70d5b3
...
...
@@ -23,22 +23,27 @@ class LargeScaleFuseSGDOp : public framework::OperatorWithKernel {
using
framework
::
OperatorWithKernel
::
OperatorWithKernel
;
void
InferShape
(
framework
::
InferShapeContext
*
ctx
)
const
override
{
PADDLE_ENFORCE
(
ctx
->
HasInput
(
"Grad"
),
"Input(Grad) of LargeScaleFuseSGDOp should not be null."
);
PADDLE_ENFORCE
(
ctx
->
HasInput
(
"Grad"
),
platform
::
errors
::
InvalidArgument
(
"Input(Grad) of LargeScaleFuseSGDOp should not be null."
));
PADDLE_ENFORCE
(
ctx
->
HasInput
(
"LearningRate"
),
"Input(LearningRate) of LargeScaleFuseSGDOp should not be null."
);
platform
::
errors
::
InvalidArgument
(
"Input(LearningRate) of LargeScaleFuseSGDOp should not be null."
));
auto
lr_dims
=
ctx
->
GetInputDim
(
"LearningRate"
);
PADDLE_ENFORCE_NE
(
framework
::
product
(
lr_dims
),
0
,
"Maybe the Input variable LearningRate has not "
"been initialized. You may need to confirm "
"if you put exe.run(startup_program) "
"after optimizer.minimize function."
);
platform
::
errors
::
InvalidArgument
(
"Maybe the Input variable LearningRate has not "
"been initialized. You may need to confirm "
"if you put exe.run(startup_program) "
"after optimizer.minimize function."
));
PADDLE_ENFORCE_EQ
(
framework
::
product
(
lr_dims
),
1
,
"Learning rate should have 1 element"
);
platform
::
errors
::
InvalidArgument
(
"Learning rate should have 1 element"
));
}
protected:
...
...
paddle/fluid/operators/distributed_ops/split_byref_op.cc
浏览文件 @
cf70d5b3
...
...
@@ -40,9 +40,9 @@ class SplitByrefOp : public framework::OperatorWithKernel {
if
(
ctx
->
IsRuntime
())
{
in_axis_dim
=
in_dims
[
0
];
}
PADDLE_ENFORCE_EQ
(
in_axis_dim
%
num
,
0
,
"tensor split does not result"
" in an equal division"
);
PADDLE_ENFORCE_EQ
(
in_axis_dim
%
num
,
0
,
platform
::
errors
::
InvalidArgument
(
"tensor split does not result"
" in an equal division"
)
);
size_t
out_axis_dim
=
in_axis_dim
/
num
;
for
(
size_t
i
=
0
;
i
<
outs_number
;
++
i
)
{
auto
dim
=
in_dims
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录