Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
d7985052
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看板
未验证
提交
d7985052
编写于
9月 10, 2021
作者:
C
ceci3
提交者:
GitHub
9月 10, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bn/in/squeeze/syncbn extra (#35502)
* fix bn/in/squeeze/syncbn extra * update bn * update * update
上级
3896bdbd
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
8 deletion
+16
-8
paddle/fluid/operators/batch_norm_op.cc
paddle/fluid/operators/batch_norm_op.cc
+6
-3
paddle/fluid/operators/instance_norm_op.cc
paddle/fluid/operators/instance_norm_op.cc
+4
-2
paddle/fluid/operators/mkldnn/batch_norm_mkldnn_op.cc
paddle/fluid/operators/mkldnn/batch_norm_mkldnn_op.cc
+3
-1
paddle/fluid/operators/squeeze_op.cc
paddle/fluid/operators/squeeze_op.cc
+3
-2
未找到文件。
paddle/fluid/operators/batch_norm_op.cc
浏览文件 @
d7985052
...
...
@@ -257,13 +257,16 @@ void BatchNormOpMaker::Make() {
AddOutput
(
"ReserveSpace"
,
"Reserve GPU space for triggering the new semi-persistent "
"NHWC kernel"
)
.
AsDispensable
();
.
AsDispensable
()
.
AsExtra
();
AddAttr
<
bool
>
(
"use_mkldnn"
,
"(bool, default false) Only used in mkldnn kernel"
)
.
SetDefault
(
false
);
.
SetDefault
(
false
)
.
AsExtra
();
AddAttr
<
bool
>
(
"fuse_with_relu"
,
"(bool, default false) Only used in mkldnn kernel"
)
.
SetDefault
(
false
);
.
SetDefault
(
false
)
.
AsExtra
();
AddAttr
<
bool
>
(
"use_global_stats"
,
"(bool, default false) Whether to use global mean and "
"variance. In inference or test mode, set use_global_stats "
...
...
paddle/fluid/operators/instance_norm_op.cc
浏览文件 @
d7985052
...
...
@@ -149,11 +149,13 @@ void InstanceNormOpMaker::Make() {
AddOutput
(
"SavedMean"
,
"Mean of the current mini batch, "
"will apply to output when training"
)
.
AsIntermediate
();
.
AsIntermediate
()
.
AsExtra
();
AddOutput
(
"SavedVariance"
,
"Variance of the current mini batch, "
"will apply to output when training"
)
.
AsIntermediate
();
.
AsIntermediate
()
.
AsExtra
();
AddComment
(
R"DOC(
Instance Normalization.
...
...
paddle/fluid/operators/mkldnn/batch_norm_mkldnn_op.cc
浏览文件 @
d7985052
...
...
@@ -47,7 +47,9 @@ class BatchNormMKLDNNHandler : public platform::MKLDNNHandlerNoCachingT<
mkldnn
::
batch_normalization_backward
>
(
mkldnn_engine
,
ctx
.
GetPlace
())
{
const
float
epsilon
=
ctx
.
Attr
<
float
>
(
"epsilon"
);
const
bool
fuse_with_relu
=
ctx
.
Attr
<
bool
>
(
"fuse_with_relu"
);
const
bool
fuse_with_relu
=
ctx
.
HasAttr
(
"fuse_with_relu"
)
?
ctx
.
Attr
<
bool
>
(
"fuse_with_relu"
)
:
false
;
std
::
vector
<
std
::
string
>
DataLayout_error_msg
=
{
"kNHWC"
,
"kNCHW"
,
"kAnyLayout"
,
"kMKLDNN"
};
...
...
paddle/fluid/operators/squeeze_op.cc
浏览文件 @
d7985052
...
...
@@ -225,7 +225,7 @@ class Squeeze2Op : public framework::OperatorWithKernel {
ctx
->
ShareLoD
(
"X"
,
"Out"
);
}
OP_INOUT_CHECK
(
ctx
->
HasOutput
(
"XShape"
),
"Output"
,
"XShape"
,
"Squeeze2"
)
;
if
(
!
ctx
->
HasOutput
(
"XShape"
))
return
;
std
::
vector
<
int64_t
>
xshape_dims
(
x_dims
.
size
()
+
1
);
xshape_dims
[
0
]
=
0
;
...
...
@@ -323,7 +323,8 @@ class Squeeze2OpMaker : public SqueezeOpMaker {
AddOutput
(
"XShape"
,
"XShape is just used to store the shape and lod of X, which will "
"be used in SqueezeGradOp."
)
.
AsIntermediate
();
.
AsIntermediate
()
.
AsExtra
();
}
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录