未验证 提交 7907e241 编写于 作者: X XiangGao 提交者: GitHub

add AsExtra in data_norm op (#35420)

* add AsExtra in data_norm op

* pass data_layout from python to data_norm op

* fix data_layout in data_norm op
Co-authored-by: Nroot <root@bjyz-sys-gpu-kongming9.bjyz.baidu.com>
上级 071e8156
...@@ -232,7 +232,8 @@ class DataNormOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -232,7 +232,8 @@ class DataNormOpMaker : public framework::OpProtoAndCheckerMaker {
.SetDefault(false); .SetDefault(false);
AddAttr<bool>("use_mkldnn", AddAttr<bool>("use_mkldnn",
"(bool, default false) Only used in mkldnn kernel") "(bool, default false) Only used in mkldnn kernel")
.SetDefault(false); .SetDefault(false)
.AsExtra();
AddInput("X", "The input tensor"); AddInput("X", "The input tensor");
AddInput("BatchSize", AddInput("BatchSize",
"BatchSize is a 1-dimensional tensor of size C " "BatchSize is a 1-dimensional tensor of size C "
......
...@@ -3398,6 +3398,7 @@ def data_norm(input, ...@@ -3398,6 +3398,7 @@ def data_norm(input,
} }
attrs = { attrs = {
"epsilon": epsilon, "epsilon": epsilon,
"data_layout": data_layout,
"sync_stats": sync_stats, "sync_stats": sync_stats,
"summary_decay_rate": summary_decay_rate, "summary_decay_rate": summary_decay_rate,
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册