diff --git a/paddle/phi/api/yaml/backward.yaml b/paddle/phi/api/yaml/backward.yaml index 18738c1af8beb07975b6383d5a3f629b80ffc9c0..1c38f5ba51c696dde610038412b7a46950b315cf 100644 --- a/paddle/phi/api/yaml/backward.yaml +++ b/paddle/phi/api/yaml/backward.yaml @@ -2173,14 +2173,3 @@ kernel: func: unpool3d_grad data_type: x - -- backward_op: unpool_grad - forward: unpool (Tensor x, Tensor indices, int[] ksize, int[] strides = {1,1}, int[] paddings ={0,0} ,IntArray output_size = {0,0}, str data_format="NCHW") -> Tensor(out) - args: (Tensor x, Tensor indices, Tensor out, Tensor out_grad, int[] ksize, int[] strides, int[] paddings, IntArray output_size, str data_format) - output: Tensor(x_grad) - infer_meta: - func: UnchangedInferMeta - param : [x] - kernel: - func: unpool_grad - data_type: x diff --git a/paddle/phi/api/yaml/legacy_backward.yaml b/paddle/phi/api/yaml/legacy_backward.yaml index 87ed42986d45c1399f21c87db4f5ca6f2da69ca8..3b39db07136ed0a79f4eca8e98058e621a1268a3 100755 --- a/paddle/phi/api/yaml/legacy_backward.yaml +++ b/paddle/phi/api/yaml/legacy_backward.yaml @@ -1019,3 +1019,14 @@ param : [out_grad] kernel : func : triu_grad + +- backward_op: unpool_grad + forward: unpool (Tensor x, Tensor indices, int[] ksize, int[] strides, int[] padding, IntArray output_size, str data_format) -> Tensor(out) + args: (Tensor x, Tensor indices, Tensor out, Tensor out_grad, int[] ksize, int[] strides, int[] padding, IntArray output_size, str data_format) + output: Tensor(x_grad) + infer_meta: + func: UnchangedInferMeta + param : [x] + kernel: + func: unpool_grad + data_type: x diff --git a/paddle/phi/api/yaml/legacy_ops.yaml b/paddle/phi/api/yaml/legacy_ops.yaml index 7c113a65dcb43e8af5442f4f3e2f4d4ab6d5e4ac..0dff2ba6c24e31fd8535d2b62f8c978cedc3112f 100755 --- a/paddle/phi/api/yaml/legacy_ops.yaml +++ b/paddle/phi/api/yaml/legacy_ops.yaml @@ -1177,6 +1177,16 @@ func : unique data_type : x +- op : unpool + args: (Tensor x, Tensor indices, int[] ksize, int[] strides, int[] padding, IntArray output_size, str data_format) + output: Tensor(out) + infer_meta: + func: UnpoolInferMeta + kernel: + func: unpool + data_type: x + backward: unpool_grad + - op : zeros args : (IntArray shape, DataType dtype=DataType::FLOAT32, Place place=CPUPlace()) output : Tensor(out) diff --git a/paddle/phi/api/yaml/ops.yaml b/paddle/phi/api/yaml/ops.yaml index b7b2521a6a394b4074af21436bdb5d8baa76a7c1..39799238364c2d8bedc6d2360f997a61bf9465c3 100644 --- a/paddle/phi/api/yaml/ops.yaml +++ b/paddle/phi/api/yaml/ops.yaml @@ -2213,16 +2213,6 @@ data_type : x optional : index, counts -- op : unpool - args: (Tensor x, Tensor indices, int[] ksize, int[] strides = {1,1}, int[] paddings ={0,0} ,IntArray output_size = {0,0}, str data_format="NCHW") - output: Tensor(out) - infer_meta: - func: UnpoolInferMeta - kernel: - func: unpool - data_type: x - backward: unpool_grad - - op : unpool3d args: (Tensor x, Tensor indices, int[] ksize, int[] strides={1,1,1}, int[] paddings={0,0,0}, int[] output_size={0,0,0}, str data_format="NCDHW") output: Tensor(out) diff --git a/paddle/phi/api/yaml/static_backward.yaml b/paddle/phi/api/yaml/static_backward.yaml index 5d48977ebabf9d7fd5427eab6b2f09bec0b63d13..3ca5260a0366380c6eb3cc9cdd86020c39f6d354 100755 --- a/paddle/phi/api/yaml/static_backward.yaml +++ b/paddle/phi/api/yaml/static_backward.yaml @@ -64,3 +64,14 @@ kernel : func : softmax_grad composite : softmax_grad(out, out_grad, axis, x_grad) + +- backward_op: unpool_grad + forward: unpool (Tensor x, Tensor indices, int[] ksize, str unpooling_type, int[] strides = {1,1}, int[] paddings ={0,0} ,IntArray output_size = {0,0}, str data_format="NCHW") -> Tensor(out) + args: (Tensor x, Tensor indices, Tensor out, Tensor out_grad, int[] ksize, int[] strides, int[] paddings, IntArray output_size, str data_format) + output: Tensor(x_grad) + infer_meta: + func: UnchangedInferMeta + param : [x] + kernel: + func: unpool_grad + data_type: x diff --git a/paddle/phi/api/yaml/static_ops.yaml b/paddle/phi/api/yaml/static_ops.yaml index f481cedbc1c7848fc7fc7dd4d17ad8c9a2f00d99..4576633c24866a22a725f37a50264915f7b498e3 100755 --- a/paddle/phi/api/yaml/static_ops.yaml +++ b/paddle/phi/api/yaml/static_ops.yaml @@ -398,3 +398,15 @@ kernel : func : unique data_type : x + +- op : unpool + args: (Tensor x, Tensor indices, int[] ksize, str unpooling_type, int[] strides = {1,1}, int[] paddings ={0,0} ,IntArray output_size = {0,0}, str data_format="NCHW") + output: Tensor(out) + infer_meta: + func: UnpoolInferMeta + param : [x, indices, ksize, strides, paddings,output_size, data_format] + kernel: + func: unpool + data_type: x + param : [x, indices, ksize, strides, paddings,output_size, data_format] + backward: unpool_grad