未验证 提交 85b2f05a 编写于 作者: C ceci3 提交者: GitHub

register ModifyAttr for instance_norm, test=op_version (#30065)

* register instance norm, test=op_version
上级 ddcff254
......@@ -392,7 +392,7 @@ REGISTER_PASS_CAPABILITY(tensorrt_subgraph_pass)
.EQ("shuffle_channel", 0)
.EQ("swish", 0)
.EQ("split", 0)
.EQ("instance_norm", 0)
.LE("instance_norm", 1)
.EQ("gelu", 0)
.EQ("layer_norm", 0)
.EQ("scale", 0)
......
......@@ -17,6 +17,7 @@ limitations under the License. */
#include <string>
#include <unordered_map>
#include "paddle/fluid/framework/data_layout.h"
#include "paddle/fluid/framework/op_version_registry.h"
#include "paddle/fluid/operators/math/math_function.h"
namespace paddle {
......@@ -701,3 +702,20 @@ REGISTER_OP_CPU_KERNEL(
float>,
ops::InstanceNormDoubleGradKernel<paddle::platform::CPUDeviceContext,
double>);
REGISTER_OP_VERSION(instance_norm)
.AddCheckpoint(
R"ROC(
Change dispensable of attribute from False to True in instance_norm.
)ROC",
paddle::framework::compatible::OpVersionDesc()
.ModifyAttr(
"Bias",
"The arg 'dispensable' of Input 'Bias' is changed: from "
"'False' to 'True'.",
true)
.ModifyAttr(
"Scale",
"The arg 'dispensable' of Input 'Scale' is changed: from "
"'False' to 'True'.",
true));
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册