From 159f10e355c5242abbe2cd4146ced073c1aa0a12 Mon Sep 17 00:00:00 2001 From: zyfncg Date: Mon, 26 Sep 2022 11:28:15 +0800 Subject: [PATCH] clear extra atts of sequence_softmax in opmaker (#46457) --- .../fluid/operators/sequence_ops/sequence_softmax_op.cc | 8 -------- paddle/phi/api/yaml/op_compat.yaml | 5 +++++ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/paddle/fluid/operators/sequence_ops/sequence_softmax_op.cc b/paddle/fluid/operators/sequence_ops/sequence_softmax_op.cc index 5417c20f3d4..5a6d2ab0820 100644 --- a/paddle/fluid/operators/sequence_ops/sequence_softmax_op.cc +++ b/paddle/fluid/operators/sequence_ops/sequence_softmax_op.cc @@ -73,14 +73,6 @@ class SequenceSoftmaxOpMaker : public framework::OpProtoAndCheckerMaker { "(bool, default false) Only used in cudnn kernel, need install cudnn") .SetDefault(false) .AsExtra(); - AddAttr( - "data_format", - "(string, default NCHW) Only used in " - "An optional string from: \"NHWC\", \"NCHW\". " - "Defaults to \"NHWC\". Specify the data format of the output data, " - "the input will be transformed automatically. ") - .SetDefault("AnyLayout") - .AsExtra(); AddComment(R"DOC( Sequence Softmax Operator. diff --git a/paddle/phi/api/yaml/op_compat.yaml b/paddle/phi/api/yaml/op_compat.yaml index a75c38b951a..613f2d38aee 100644 --- a/paddle/phi/api/yaml/op_compat.yaml +++ b/paddle/phi/api/yaml/op_compat.yaml @@ -632,6 +632,11 @@ extra : attrs : [bool deterministic = false, str rng_name = "", bool force_cpu = false] +- op : sequence_softmax + backward : sequence_softmax_grad + extra : + attrs : [str data_format = "AnyLayout"] + - op : shape extra : attrs : [bool use_mkldnn = false, str mkldnn_data_type = "float32"] -- GitLab