diff --git a/paddle/fluid/operators/reverse_op.cc b/paddle/fluid/operators/reverse_op.cc index 64c4c37bb06154b2f4ba6b3e5062ad514248ac46..a20f7d231fa9ea313581ac0629a87fa5f4a88ce5 100644 --- a/paddle/fluid/operators/reverse_op.cc +++ b/paddle/fluid/operators/reverse_op.cc @@ -105,10 +105,3 @@ REGISTER_OP_CPU_KERNEL( ops::ReverseKernel, ops::ReverseKernel, ops::ReverseKernel) -REGISTER_OP_CPU_KERNEL( - reverse_grad, ops::ReverseKernel, - ops::ReverseKernel, - ops::ReverseKernel, - ops::ReverseKernel, - ops::ReverseKernel, - ops::ReverseKernel) diff --git a/paddle/fluid/operators/reverse_op.cu b/paddle/fluid/operators/reverse_op.cu index 7a750c75b5be9b0459bbe0ba74893d8524a58501..635c41529b38f2dd287b00ed2e5659e11f619e78 100644 --- a/paddle/fluid/operators/reverse_op.cu +++ b/paddle/fluid/operators/reverse_op.cu @@ -22,10 +22,3 @@ REGISTER_OP_CUDA_KERNEL( ops::ReverseKernel, ops::ReverseKernel, ops::ReverseKernel) -REGISTER_OP_CUDA_KERNEL( - reverse_grad, ops::ReverseKernel, - ops::ReverseKernel, - ops::ReverseKernel, - ops::ReverseKernel, - ops::ReverseKernel, - ops::ReverseKernel) diff --git a/paddle/fluid/operators/reverse_op.h b/paddle/fluid/operators/reverse_op.h index 2af4268dfacc333b124d812f9d666b6cde2416e8..d3c54b731883fe6352790d1ed36849c7b0e76987 100644 --- a/paddle/fluid/operators/reverse_op.h +++ b/paddle/fluid/operators/reverse_op.h @@ -24,7 +24,9 @@ struct ReverseFunctor { void operator()(const DeviceContext& context, const framework::LoDTensor& in, framework::LoDTensor* out, const std::vector& axis) { Eigen::array reverse_axis; - reverse_axis.fill(false); + for (auto& i : reverse_axis) { + i = false; + } for (int a : axis) { reverse_axis[a] = true; }