From e04c43d5436850ba093e08dfd725410466caa275 Mon Sep 17 00:00:00 2001 From: "Yang Yang(Tony)" Date: Wed, 18 Apr 2018 16:58:51 -0700 Subject: [PATCH] add semicolon to op registry (#10034) * script to add semicolon * fix typo --- paddle/fluid/operators/activation_op.cc | 120 +++++++++--------- .../operators/bilinear_tensor_product_op.cc | 4 +- paddle/fluid/operators/clip_op.cc | 4 +- paddle/fluid/operators/concat_op.cc | 8 +- paddle/fluid/operators/conv_op.cc | 12 +- paddle/fluid/operators/conv_shift_op.cc | 4 +- paddle/fluid/operators/conv_transpose_op.cc | 8 +- paddle/fluid/operators/cos_sim_op.cc | 4 +- paddle/fluid/operators/cross_entropy_op.cc | 4 +- paddle/fluid/operators/cumsum_op.cc | 2 +- paddle/fluid/operators/cumsum_op.cu | 2 +- paddle/fluid/operators/dropout_op.cc | 4 +- paddle/fluid/operators/elementwise_div_op.cc | 4 +- paddle/fluid/operators/elementwise_max_op.cc | 4 +- paddle/fluid/operators/elementwise_min_op.cc | 4 +- paddle/fluid/operators/elementwise_mul_op.cc | 4 +- paddle/fluid/operators/elementwise_sub_op.cc | 4 +- paddle/fluid/operators/expand_op.cc | 4 +- paddle/fluid/operators/fc_op.cc | 4 +- paddle/fluid/operators/gather_op.cc | 4 +- paddle/fluid/operators/gru_op.cc | 4 +- paddle/fluid/operators/gru_unit_op.cc | 4 +- paddle/fluid/operators/hinge_loss_op.cc | 4 +- paddle/fluid/operators/huber_loss_op.cc | 4 +- paddle/fluid/operators/im2sequence_op.cc | 4 +- paddle/fluid/operators/increment_op.cc | 2 +- paddle/fluid/operators/increment_op.cu | 2 +- paddle/fluid/operators/iou_similarity_op.cc | 0 paddle/fluid/operators/iou_similarity_op.cu | 0 paddle/fluid/operators/l1_norm_op.cc | 4 +- paddle/fluid/operators/label_smooth_op.cc | 4 +- paddle/fluid/operators/layer_norm_op.cc | 4 +- paddle/fluid/operators/linear_chain_crf_op.cc | 4 +- paddle/fluid/operators/lod_reset_op.cc | 4 +- paddle/fluid/operators/log_loss_op.cc | 4 +- paddle/fluid/operators/lrn_op.cc | 4 +- paddle/fluid/operators/lstm_op.cc | 4 +- paddle/fluid/operators/lstm_unit_op.cc | 4 +- paddle/fluid/operators/lstmp_op.cc | 4 +- paddle/fluid/operators/margin_rank_loss_op.cc | 4 +- paddle/fluid/operators/matmul_op.cc | 4 +- paddle/fluid/operators/maxout_op.cc | 4 +- .../fluid/operators/modified_huber_loss_op.cc | 4 +- paddle/fluid/operators/mul_op.cc | 4 +- paddle/fluid/operators/nce_op.cc | 4 +- paddle/fluid/operators/norm_op.cc | 4 +- paddle/fluid/operators/pool_op.cc | 10 +- paddle/fluid/operators/pool_with_index_op.cc | 12 +- .../fluid/operators/pool_with_index_op.cu.cc | 4 +- paddle/fluid/operators/prelu_op.cc | 4 +- paddle/fluid/operators/rank_loss_op.cc | 4 +- paddle/fluid/operators/reduce_op.cc | 20 +-- paddle/fluid/operators/reshape_op.cc | 4 +- paddle/fluid/operators/roi_pool_op.cc | 4 +- paddle/fluid/operators/row_conv_op.cc | 4 +- paddle/fluid/operators/scatter_op.cc | 4 +- paddle/fluid/operators/sequence_concat_op.cc | 2 +- paddle/fluid/operators/sequence_conv_op.cc | 4 +- paddle/fluid/operators/sequence_expand_op.cc | 4 +- paddle/fluid/operators/sequence_slice_op.cc | 4 +- paddle/fluid/operators/sequence_slice_op.cu | 0 .../operators/sequence_softmax_cudnn_op.cu.cc | 4 +- paddle/fluid/operators/sequence_softmax_op.cc | 4 +- .../fluid/operators/sequence_softmax_op.cu.cc | 2 +- .../sigmoid_cross_entropy_with_logits_op.cc | 4 +- paddle/fluid/operators/smooth_l1_loss_op.cc | 4 +- paddle/fluid/operators/softmax_op.cc | 4 +- paddle/fluid/operators/spp_op.cc | 4 +- .../fluid/operators/squared_l2_distance_op.cc | 4 +- paddle/fluid/operators/squared_l2_norm_op.cc | 4 +- paddle/fluid/operators/transpose_op.cc | 4 +- paddle/fluid/operators/unpool_op.cc | 4 +- paddle/fluid/operators/warpctc_op.cc | 4 +- 73 files changed, 215 insertions(+), 215 deletions(-) mode change 100755 => 100644 paddle/fluid/operators/iou_similarity_op.cc mode change 100755 => 100644 paddle/fluid/operators/iou_similarity_op.cu mode change 100755 => 100644 paddle/fluid/operators/sequence_slice_op.cu diff --git a/paddle/fluid/operators/activation_op.cc b/paddle/fluid/operators/activation_op.cc index 9db718a550..56451f8f14 100644 --- a/paddle/fluid/operators/activation_op.cc +++ b/paddle/fluid/operators/activation_op.cc @@ -559,125 +559,125 @@ $$out = \frac{x}{1 + e^{- \beta x}}$$ namespace ops = paddle::operators; REGISTER_OPERATOR(sigmoid, ops::ActivationOp, ops::SigmoidOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(sigmoid_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(sigmoid_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(logsigmoid, ops::ActivationOp, ops::LogSigmoidOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(logsigmoid_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(logsigmoid_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(exp, ops::ActivationOp, ops::ExpOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(exp_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(exp_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(relu, ops::ActivationWithMKLDNNOp, ops::ReluOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(relu_grad, ops::ActivationWithMKLDNNOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(relu_grad, ops::ActivationWithMKLDNNOpGrad); REGISTER_OPERATOR(tanh, ops::ActivationWithMKLDNNOp, ops::TanhOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(tanh_grad, ops::ActivationWithMKLDNNOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(tanh_grad, ops::ActivationWithMKLDNNOpGrad); REGISTER_OPERATOR(tanh_shrink, ops::ActivationOp, ops::TanhShrinkOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(tanh_shrink_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(tanh_shrink_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(softshrink, ops::ActivationOp, ops::SoftShrinkOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(softshrink_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(softshrink_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(sqrt, ops::ActivationWithMKLDNNOp, ops::SqrtOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(sqrt_grad, ops::ActivationWithMKLDNNOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(sqrt_grad, ops::ActivationWithMKLDNNOpGrad); REGISTER_OPERATOR(abs, ops::ActivationWithMKLDNNOp, ops::AbsOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(abs_grad, ops::ActivationWithMKLDNNOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(abs_grad, ops::ActivationWithMKLDNNOpGrad); REGISTER_OPERATOR(ceil, ops::ActivationOp, ops::CeilOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(ceil_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(ceil_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(floor, ops::ActivationOp, ops::FloorOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(floor_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(floor_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(cos, ops::ActivationOp, ops::CosOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(cos_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(cos_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(sin, ops::ActivationOp, ops::SinOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(sin_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(sin_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(round, ops::ActivationOp, ops::RoundOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(round_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(round_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(reciprocal, ops::ActivationOp, ops::ReciprocalOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(reciprocal_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(reciprocal_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(log, ops::ActivationOp, ops::LogOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(log_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(log_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(square, ops::ActivationOp, ops::SquareOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(square_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(square_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(softplus, ops::ActivationOp, ops::SoftplusOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(softplus_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(softplus_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(softsign, ops::ActivationOp, ops::SoftsignOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(softsign_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(softsign_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(brelu, ops::ActivationOp, ops::BReluOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(brelu_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(brelu_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(leaky_relu, ops::ActivationOp, ops::LeakyReluOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(leaky_relu_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(leaky_relu_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(soft_relu, ops::ActivationOp, ops::SoftReluOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(soft_relu_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(soft_relu_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(elu, ops::ActivationOp, ops::ELUOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(elu_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(elu_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(relu6, ops::ActivationOp, ops::Relu6OpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(relu6_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(relu6_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(pow, ops::ActivationOp, ops::PowOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(pow_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(pow_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(stanh, ops::ActivationOp, ops::STanhOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(stanh_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(stanh_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(hard_shrink, ops::ActivationOp, ops::HardShrinkOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(hard_shrink_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(hard_shrink_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(thresholded_relu, ops::ActivationOp, ops::ThresholdedReluOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(thresholded_relu_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(thresholded_relu_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(hard_sigmoid, ops::ActivationOp, ops::HardSigmoidOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(hard_sigmoid_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(hard_sigmoid_grad, ops::ActivationOpGrad); REGISTER_OPERATOR(swish, ops::ActivationOp, ops::SwishOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(swish_grad, ops::ActivationOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(swish_grad, ops::ActivationOpGrad); #define REGISTER_ACTIVATION_CPU_KERNEL(act_type, functor, grad_functor) \ REGISTER_OP_CPU_KERNEL( \ diff --git a/paddle/fluid/operators/bilinear_tensor_product_op.cc b/paddle/fluid/operators/bilinear_tensor_product_op.cc index 44e2af8e2e..e910ad92d1 100644 --- a/paddle/fluid/operators/bilinear_tensor_product_op.cc +++ b/paddle/fluid/operators/bilinear_tensor_product_op.cc @@ -155,9 +155,9 @@ class BilinearTensorProductOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(bilinear_tensor_product, ops::BilinearTensorProductOp, ops::BilinearTensorProductOpMaker, - paddle::framework::DefaultGradOpDescMaker) + paddle::framework::DefaultGradOpDescMaker); REGISTER_OPERATOR(bilinear_tensor_product_grad, - ops::BilinearTensorProductOpGrad) + ops::BilinearTensorProductOpGrad); REGISTER_OP_CPU_KERNEL( bilinear_tensor_product, ops::BilinearTensorProductKernel, diff --git a/paddle/fluid/operators/clip_op.cc b/paddle/fluid/operators/clip_op.cc index 3c2d8e8707..c71139fc7c 100644 --- a/paddle/fluid/operators/clip_op.cc +++ b/paddle/fluid/operators/clip_op.cc @@ -82,8 +82,8 @@ class ClipOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(clip, ops::ClipOp, ops::ClipOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(clip_grad, ops::ClipOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(clip_grad, ops::ClipOpGrad); REGISTER_OP_CPU_KERNEL( clip, ops::ClipKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/concat_op.cc b/paddle/fluid/operators/concat_op.cc index 5fbbe4d028..3bb3bd4eb1 100644 --- a/paddle/fluid/operators/concat_op.cc +++ b/paddle/fluid/operators/concat_op.cc @@ -105,10 +105,10 @@ class ConcatOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(concat, ops::ConcatOp, ops::ConcatOpMaker, paddle::framework::DefaultGradOpDescMaker< - false> /* set false to disable empty grad */) -REGISTER_OPERATOR(concat_grad, ops::ConcatOpGrad) + false> /* set false to disable empty grad */); +REGISTER_OPERATOR(concat_grad, ops::ConcatOpGrad); REGISTER_OP_CPU_KERNEL( - concat, ops::ConcatKernel) + concat, ops::ConcatKernel); REGISTER_OP_CPU_KERNEL( concat_grad, - ops::ConcatGradKernel) + ops::ConcatGradKernel); diff --git a/paddle/fluid/operators/conv_op.cc b/paddle/fluid/operators/conv_op.cc index 83e56f80ca..92748993c3 100644 --- a/paddle/fluid/operators/conv_op.cc +++ b/paddle/fluid/operators/conv_op.cc @@ -336,16 +336,16 @@ framework::OpKernelType ConvOpGrad::GetExpectedKernelType( namespace ops = paddle::operators; REGISTER_OPERATOR(conv2d, ops::ConvOp, ops::Conv2DOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(conv2d_grad, ops::ConvOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(conv2d_grad, ops::ConvOpGrad); // depthwise convolution op REGISTER_OPERATOR(depthwise_conv2d, ops::ConvOp, ops::Conv2DOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(depthwise_conv2d_grad, ops::ConvOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(depthwise_conv2d_grad, ops::ConvOpGrad); REGISTER_OPERATOR(conv3d, ops::ConvOp, ops::Conv3DOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(conv3d_grad, ops::ConvOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(conv3d_grad, ops::ConvOpGrad); // depthwise conv kernel // TODO(xingzhaolong): neon kernel for mobile diff --git a/paddle/fluid/operators/conv_shift_op.cc b/paddle/fluid/operators/conv_shift_op.cc index 46a675e936..82fdd30820 100644 --- a/paddle/fluid/operators/conv_shift_op.cc +++ b/paddle/fluid/operators/conv_shift_op.cc @@ -194,8 +194,8 @@ class ConvShiftGradKernel namespace ops = paddle::operators; REGISTER_OPERATOR(conv_shift, ops::ConvShiftOp, ops::ConvShiftOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(conv_shift_grad, ops::ConvShiftGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(conv_shift_grad, ops::ConvShiftGradOp); REGISTER_OP_CPU_KERNEL(conv_shift, ops::ConvShiftKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/conv_transpose_op.cc b/paddle/fluid/operators/conv_transpose_op.cc index c148237f85..d699dcafa4 100644 --- a/paddle/fluid/operators/conv_transpose_op.cc +++ b/paddle/fluid/operators/conv_transpose_op.cc @@ -300,8 +300,8 @@ namespace ops = paddle::operators; REGISTER_OPERATOR(conv2d_transpose, ops::ConvTransposeOp, ops::Conv2DTransposeOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(conv2d_transpose_grad, ops::ConvTransposeOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(conv2d_transpose_grad, ops::ConvTransposeOpGrad); REGISTER_OP_CPU_KERNEL( conv2d_transpose, @@ -315,8 +315,8 @@ REGISTER_OP_CPU_KERNEL( REGISTER_OPERATOR(conv3d_transpose, ops::ConvTransposeOp, ops::Conv3DTransposeOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(conv3d_transpose_grad, ops::ConvTransposeOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(conv3d_transpose_grad, ops::ConvTransposeOpGrad); REGISTER_OP_CPU_KERNEL( conv3d_transpose, diff --git a/paddle/fluid/operators/cos_sim_op.cc b/paddle/fluid/operators/cos_sim_op.cc index 8cde2cb077..04ca878e68 100644 --- a/paddle/fluid/operators/cos_sim_op.cc +++ b/paddle/fluid/operators/cos_sim_op.cc @@ -154,8 +154,8 @@ class CosSimOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(cos_sim, ops::CosSimOp, ops::CosSimOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(cos_sim_grad, ops::CosSimOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(cos_sim_grad, ops::CosSimOpGrad); REGISTER_OP_CPU_KERNEL( cos_sim, ops::CosSimKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/cross_entropy_op.cc b/paddle/fluid/operators/cross_entropy_op.cc index 0ad87e511e..0e0622e290 100644 --- a/paddle/fluid/operators/cross_entropy_op.cc +++ b/paddle/fluid/operators/cross_entropy_op.cc @@ -165,8 +165,8 @@ or not. But the output only shares the LoD information with input X. namespace ops = paddle::operators; REGISTER_OPERATOR(cross_entropy, ops::CrossEntropyOp, ops::CrossEntropyOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(cross_entropy_grad, ops::CrossEntropyGradientOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(cross_entropy_grad, ops::CrossEntropyGradientOp); REGISTER_OP_CPU_KERNEL(cross_entropy, ops::CrossEntropyOpKernel, ops::CrossEntropyOpKernel); REGISTER_OP_CPU_KERNEL(cross_entropy_grad, diff --git a/paddle/fluid/operators/cumsum_op.cc b/paddle/fluid/operators/cumsum_op.cc index 0da6f18852..f7c516a0ba 100644 --- a/paddle/fluid/operators/cumsum_op.cc +++ b/paddle/fluid/operators/cumsum_op.cc @@ -79,4 +79,4 @@ using CPU = paddle::platform::CPUDeviceContext; REGISTER_OPERATOR(cumsum, ops::CumOp, ops::CumsumOpMaker, ops::CumsumGradMaker); REGISTER_OP_CPU_KERNEL(cumsum, ops::CumKernel>, ops::CumKernel>, - ops::CumKernel>) + ops::CumKernel>); diff --git a/paddle/fluid/operators/cumsum_op.cu b/paddle/fluid/operators/cumsum_op.cu index 70e2a1de5e..eb5fd99ccb 100644 --- a/paddle/fluid/operators/cumsum_op.cu +++ b/paddle/fluid/operators/cumsum_op.cu @@ -19,4 +19,4 @@ using CUDA = paddle::platform::CUDADeviceContext; REGISTER_OP_CUDA_KERNEL(cumsum, ops::CumKernel>, ops::CumKernel>, - ops::CumKernel>) + ops::CumKernel>); diff --git a/paddle/fluid/operators/dropout_op.cc b/paddle/fluid/operators/dropout_op.cc index 3b9882ab94..4ed1b54884 100644 --- a/paddle/fluid/operators/dropout_op.cc +++ b/paddle/fluid/operators/dropout_op.cc @@ -102,8 +102,8 @@ class DropoutOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(dropout, ops::DropoutOp, ops::DropoutOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(dropout_grad, ops::DropoutOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(dropout_grad, ops::DropoutOpGrad); REGISTER_OP_CPU_KERNEL( dropout, ops::CPUDropoutKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/elementwise_div_op.cc b/paddle/fluid/operators/elementwise_div_op.cc index f3dabb9133..c7ddafcad1 100644 --- a/paddle/fluid/operators/elementwise_div_op.cc +++ b/paddle/fluid/operators/elementwise_div_op.cc @@ -32,8 +32,8 @@ class ElementwiseDivOpMaker : public ElementwiseOpMaker { namespace ops = paddle::operators; REGISTER_OPERATOR(elementwise_div, ops::ElementwiseOp, ops::ElementwiseDivOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(elementwise_div_grad, ops::ElementwiseOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(elementwise_div_grad, ops::ElementwiseOpGrad); REGISTER_OP_CPU_KERNEL( elementwise_div, ops::ElementwiseDivKernel, diff --git a/paddle/fluid/operators/elementwise_max_op.cc b/paddle/fluid/operators/elementwise_max_op.cc index 385159e8ec..a4fe386bb1 100644 --- a/paddle/fluid/operators/elementwise_max_op.cc +++ b/paddle/fluid/operators/elementwise_max_op.cc @@ -31,8 +31,8 @@ class ElementwiseMaxOpMaker : public ElementwiseOpMaker { namespace ops = paddle::operators; REGISTER_OPERATOR(elementwise_max, ops::ElementwiseOp, ops::ElementwiseMaxOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(elementwise_max_grad, ops::ElementwiseOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(elementwise_max_grad, ops::ElementwiseOpGrad); REGISTER_OP_CPU_KERNEL( elementwise_max, ops::ElementwiseMaxKernel, diff --git a/paddle/fluid/operators/elementwise_min_op.cc b/paddle/fluid/operators/elementwise_min_op.cc index 0b7ea4b1bf..68cd6ddb4a 100644 --- a/paddle/fluid/operators/elementwise_min_op.cc +++ b/paddle/fluid/operators/elementwise_min_op.cc @@ -31,8 +31,8 @@ class ElementwiseMinOpMaker : public ElementwiseOpMaker { namespace ops = paddle::operators; REGISTER_OPERATOR(elementwise_min, ops::ElementwiseOp, ops::ElementwiseMinOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(elementwise_min_grad, ops::ElementwiseOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(elementwise_min_grad, ops::ElementwiseOpGrad); REGISTER_OP_CPU_KERNEL( elementwise_min, ops::ElementwiseMinKernel, diff --git a/paddle/fluid/operators/elementwise_mul_op.cc b/paddle/fluid/operators/elementwise_mul_op.cc index 0e092924d7..2dec27136a 100644 --- a/paddle/fluid/operators/elementwise_mul_op.cc +++ b/paddle/fluid/operators/elementwise_mul_op.cc @@ -33,8 +33,8 @@ class ElementwiseMulOpMaker : public ElementwiseOpMaker { namespace ops = paddle::operators; REGISTER_OPERATOR(elementwise_mul, ops::ElementwiseOp, ops::ElementwiseMulOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(elementwise_mul_grad, ops::ElementwiseOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(elementwise_mul_grad, ops::ElementwiseOpGrad); REGISTER_OP_CPU_KERNEL( elementwise_mul, ops::ElementwiseMulKernel, diff --git a/paddle/fluid/operators/elementwise_sub_op.cc b/paddle/fluid/operators/elementwise_sub_op.cc index 675ff8860b..9d0598fc39 100644 --- a/paddle/fluid/operators/elementwise_sub_op.cc +++ b/paddle/fluid/operators/elementwise_sub_op.cc @@ -31,8 +31,8 @@ class ElementwiseSubOpMaker : public ElementwiseOpMaker { namespace ops = paddle::operators; REGISTER_OPERATOR(elementwise_sub, ops::ElementwiseOp, ops::ElementwiseSubOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(elementwise_sub_grad, ops::ElementwiseOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(elementwise_sub_grad, ops::ElementwiseOpGrad); REGISTER_OP_CPU_KERNEL( elementwise_sub, ops::ElementwiseSubKernel, diff --git a/paddle/fluid/operators/expand_op.cc b/paddle/fluid/operators/expand_op.cc index cf244e37e6..9c71ee6d3b 100644 --- a/paddle/fluid/operators/expand_op.cc +++ b/paddle/fluid/operators/expand_op.cc @@ -132,8 +132,8 @@ class ExpandGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(expand, ops::ExpandOp, ops::ExpandOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(expand_grad, ops::ExpandGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(expand_grad, ops::ExpandGradOp); REGISTER_OP_CPU_KERNEL( expand, ops::ExpandKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/fc_op.cc b/paddle/fluid/operators/fc_op.cc index 5070a4b78d..45e4d5b2b8 100644 --- a/paddle/fluid/operators/fc_op.cc +++ b/paddle/fluid/operators/fc_op.cc @@ -99,5 +99,5 @@ FCOpMaker::FCOpMaker(OpProto* proto, OpAttrChecker* op_checker) } // namespace paddle REGISTER_OPERATOR(fc, paddle::operators::FCOp, paddle::operators::FCOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(fc_grad, paddle::operators::FCOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(fc_grad, paddle::operators::FCOpGrad); diff --git a/paddle/fluid/operators/gather_op.cc b/paddle/fluid/operators/gather_op.cc index 60075d9777..4c82f5c429 100644 --- a/paddle/fluid/operators/gather_op.cc +++ b/paddle/fluid/operators/gather_op.cc @@ -101,7 +101,7 @@ Out = [[3, 4], namespace ops = paddle::operators; REGISTER_OPERATOR(gather, ops::GatherOp, ops::GatherOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(gather_grad, ops::GatherGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(gather_grad, ops::GatherGradOp); REGISTER_OP_CPU_KERNEL(gather, ops::GatherOpKernel); REGISTER_OP_CPU_KERNEL(gather_grad, ops::GatherGradientOpKernel); diff --git a/paddle/fluid/operators/gru_op.cc b/paddle/fluid/operators/gru_op.cc index b717c59091..0a524c914d 100644 --- a/paddle/fluid/operators/gru_op.cc +++ b/paddle/fluid/operators/gru_op.cc @@ -217,8 +217,8 @@ class GRUGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(gru, ops::GRUOp, ops::GRUOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(gru_grad, ops::GRUGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(gru_grad, ops::GRUGradOp); REGISTER_OP_CPU_KERNEL( gru, ops::GRUKernel, ops::GRUKernel); diff --git a/paddle/fluid/operators/gru_unit_op.cc b/paddle/fluid/operators/gru_unit_op.cc index 8f75a67bc7..80496e4c77 100644 --- a/paddle/fluid/operators/gru_unit_op.cc +++ b/paddle/fluid/operators/gru_unit_op.cc @@ -199,8 +199,8 @@ class GRUUnitGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(gru_unit, ops::GRUUnitOp, ops::GRUUnitOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(gru_unit_grad, ops::GRUUnitGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(gru_unit_grad, ops::GRUUnitGradOp); REGISTER_OP_CPU_KERNEL( gru_unit, ops::GRUUnitKernel, ops::GRUUnitKernel); diff --git a/paddle/fluid/operators/hinge_loss_op.cc b/paddle/fluid/operators/hinge_loss_op.cc index d14935e771..086b5a97de 100644 --- a/paddle/fluid/operators/hinge_loss_op.cc +++ b/paddle/fluid/operators/hinge_loss_op.cc @@ -104,8 +104,8 @@ class HingeLossGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(hinge_loss, ops::HingeLossOp, ops::HingeLossOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(hinge_loss_grad, ops::HingeLossGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(hinge_loss_grad, ops::HingeLossGradOp); REGISTER_OP_CPU_KERNEL( hinge_loss, ops::HingeLossKernel); diff --git a/paddle/fluid/operators/huber_loss_op.cc b/paddle/fluid/operators/huber_loss_op.cc index 0789c89bd1..74d8e0e2b7 100644 --- a/paddle/fluid/operators/huber_loss_op.cc +++ b/paddle/fluid/operators/huber_loss_op.cc @@ -122,8 +122,8 @@ class HuberLossGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(huber_loss, ops::HuberLossOp, ops::HuberLossOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(huber_loss_grad, ops::HuberLossGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(huber_loss_grad, ops::HuberLossGradOp); REGISTER_OP_CPU_KERNEL( huber_loss, ops::HuberLossKernel); diff --git a/paddle/fluid/operators/im2sequence_op.cc b/paddle/fluid/operators/im2sequence_op.cc index 593cf60c11..8c120eec86 100644 --- a/paddle/fluid/operators/im2sequence_op.cc +++ b/paddle/fluid/operators/im2sequence_op.cc @@ -149,8 +149,8 @@ class Im2SequenceGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(im2sequence, ops::Im2SequenceOp, ops::Im2SequenceOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(im2sequence_grad, ops::Im2SequenceGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(im2sequence_grad, ops::Im2SequenceGradOp); REGISTER_OP_CPU_KERNEL( im2sequence, ops::Im2SequenceKernel); diff --git a/paddle/fluid/operators/increment_op.cc b/paddle/fluid/operators/increment_op.cc index ec2e641679..5d8710a9b3 100644 --- a/paddle/fluid/operators/increment_op.cc +++ b/paddle/fluid/operators/increment_op.cc @@ -89,4 +89,4 @@ REGISTER_OP_CPU_KERNEL( increment, ops::IncrementKernel, ops::IncrementKernel, ops::IncrementKernel, - ops::IncrementKernel) + ops::IncrementKernel); diff --git a/paddle/fluid/operators/increment_op.cu b/paddle/fluid/operators/increment_op.cu index 7fb6425fe9..228063bf3d 100644 --- a/paddle/fluid/operators/increment_op.cu +++ b/paddle/fluid/operators/increment_op.cu @@ -19,4 +19,4 @@ REGISTER_OP_CUDA_KERNEL( increment, ops::IncrementKernel, ops::IncrementKernel, ops::IncrementKernel, - ops::IncrementKernel) + ops::IncrementKernel); diff --git a/paddle/fluid/operators/iou_similarity_op.cc b/paddle/fluid/operators/iou_similarity_op.cc old mode 100755 new mode 100644 diff --git a/paddle/fluid/operators/iou_similarity_op.cu b/paddle/fluid/operators/iou_similarity_op.cu old mode 100755 new mode 100644 diff --git a/paddle/fluid/operators/l1_norm_op.cc b/paddle/fluid/operators/l1_norm_op.cc index ba7577c510..0c143b7c8a 100644 --- a/paddle/fluid/operators/l1_norm_op.cc +++ b/paddle/fluid/operators/l1_norm_op.cc @@ -68,8 +68,8 @@ $$Out = \sum{|X|}$$ namespace ops = paddle::operators; REGISTER_OPERATOR(l1_norm, ops::L1NormOp, ops::L1NormOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(l1_norm_grad, ops::L1NormGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(l1_norm_grad, ops::L1NormGradOp); REGISTER_OP_CPU_KERNEL( l1_norm, ops::L1NormKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/label_smooth_op.cc b/paddle/fluid/operators/label_smooth_op.cc index 663adc5700..a73c626032 100644 --- a/paddle/fluid/operators/label_smooth_op.cc +++ b/paddle/fluid/operators/label_smooth_op.cc @@ -118,8 +118,8 @@ class LabelSmoothGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(label_smooth, ops::LabelSmoothOp, ops::LabelSmoothOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(label_smooth_grad, ops::LabelSmoothGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(label_smooth_grad, ops::LabelSmoothGradOp); REGISTER_OP_CPU_KERNEL( label_smooth, ops::LabelSmoothKernel, diff --git a/paddle/fluid/operators/layer_norm_op.cc b/paddle/fluid/operators/layer_norm_op.cc index e033da857b..de1056aef7 100644 --- a/paddle/fluid/operators/layer_norm_op.cc +++ b/paddle/fluid/operators/layer_norm_op.cc @@ -163,8 +163,8 @@ class LayerNormGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(layer_norm, ops::LayerNormOp, ops::LayerNormOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(layer_norm_grad, ops::LayerNormGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(layer_norm_grad, ops::LayerNormGradOp); REGISTER_OP_CPU_KERNEL( layer_norm, ops::LayerNormKernel, ops::LayerNormKernel); diff --git a/paddle/fluid/operators/linear_chain_crf_op.cc b/paddle/fluid/operators/linear_chain_crf_op.cc index 24b845528d..2f29e377fd 100644 --- a/paddle/fluid/operators/linear_chain_crf_op.cc +++ b/paddle/fluid/operators/linear_chain_crf_op.cc @@ -258,8 +258,8 @@ class LinearChainCRFGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(linear_chain_crf, ops::LinearChainCRFOp, ops::LinearChainCRFOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(linear_chain_crf_grad, ops::LinearChainCRFGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(linear_chain_crf_grad, ops::LinearChainCRFGradOp); REGISTER_OP_CPU_KERNEL( linear_chain_crf, ops::LinearChainCRFOpKernel, diff --git a/paddle/fluid/operators/lod_reset_op.cc b/paddle/fluid/operators/lod_reset_op.cc index fd1e1ffd46..92ebfc274b 100644 --- a/paddle/fluid/operators/lod_reset_op.cc +++ b/paddle/fluid/operators/lod_reset_op.cc @@ -156,8 +156,8 @@ class LoDResetGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(lod_reset, ops::LoDResetOp, ops::LoDResetOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(lod_reset_grad, ops::LoDResetGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(lod_reset_grad, ops::LoDResetGradOp); REGISTER_OP_CPU_KERNEL( lod_reset, ops::LoDResetKernel, ops::LoDResetKernel, diff --git a/paddle/fluid/operators/log_loss_op.cc b/paddle/fluid/operators/log_loss_op.cc index b1a68d2887..a8258a1afd 100644 --- a/paddle/fluid/operators/log_loss_op.cc +++ b/paddle/fluid/operators/log_loss_op.cc @@ -107,8 +107,8 @@ class LogLossGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(log_loss, ops::LogLossOp, ops::LogLossOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(log_loss_grad, ops::LogLossGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(log_loss_grad, ops::LogLossGradOp); REGISTER_OP_CPU_KERNEL( log_loss, ops::LogLossKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/lrn_op.cc b/paddle/fluid/operators/lrn_op.cc index 6ff9a68ba4..f5c0e47fda 100644 --- a/paddle/fluid/operators/lrn_op.cc +++ b/paddle/fluid/operators/lrn_op.cc @@ -277,8 +277,8 @@ class LRNOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(lrn, ops::LRNOp, ops::LRNOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(lrn_grad, ops::LRNOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(lrn_grad, ops::LRNOpGrad); REGISTER_OP_CPU_KERNEL( lrn, ops::LRNKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/lstm_op.cc b/paddle/fluid/operators/lstm_op.cc index 75b9c65f18..084ee1cfe6 100644 --- a/paddle/fluid/operators/lstm_op.cc +++ b/paddle/fluid/operators/lstm_op.cc @@ -274,8 +274,8 @@ class LSTMGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(lstm, ops::LSTMOp, ops::LSTMOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(lstm_grad, ops::LSTMGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(lstm_grad, ops::LSTMGradOp); REGISTER_OP_CPU_KERNEL( lstm, ops::LSTMKernel, ops::LSTMKernel); diff --git a/paddle/fluid/operators/lstm_unit_op.cc b/paddle/fluid/operators/lstm_unit_op.cc index 16d2dabd1d..e1157ef6c6 100644 --- a/paddle/fluid/operators/lstm_unit_op.cc +++ b/paddle/fluid/operators/lstm_unit_op.cc @@ -98,8 +98,8 @@ class LstmUnitGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(lstm_unit, ops::LstmUnitOp, ops::LstmUnitOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(lstm_unit_grad, ops::LstmUnitGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(lstm_unit_grad, ops::LstmUnitGradOp); REGISTER_OP_CPU_KERNEL(lstm_unit, ops::LstmUnitKernel, ops::LstmUnitKernel); diff --git a/paddle/fluid/operators/lstmp_op.cc b/paddle/fluid/operators/lstmp_op.cc index a575ade472..f9261323f0 100644 --- a/paddle/fluid/operators/lstmp_op.cc +++ b/paddle/fluid/operators/lstmp_op.cc @@ -323,8 +323,8 @@ class LSTMPGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(lstmp, ops::LSTMPOp, ops::LSTMPOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(lstmp_grad, ops::LSTMPGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(lstmp_grad, ops::LSTMPGradOp); REGISTER_OP_CPU_KERNEL( lstmp, ops::LSTMPKernel, ops::LSTMPKernel); diff --git a/paddle/fluid/operators/margin_rank_loss_op.cc b/paddle/fluid/operators/margin_rank_loss_op.cc index b3f6431233..0b41a3e1ff 100644 --- a/paddle/fluid/operators/margin_rank_loss_op.cc +++ b/paddle/fluid/operators/margin_rank_loss_op.cc @@ -113,8 +113,8 @@ namespace ops = paddle::operators; REGISTER_OPERATOR(margin_rank_loss, ops::MarginRankLossOp, ops::MarginRankLossOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(margin_rank_loss_grad, ops::MarginRankLossGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(margin_rank_loss_grad, ops::MarginRankLossGradOp); REGISTER_OP_CPU_KERNEL( margin_rank_loss, ops::MarginRankLossKernel); diff --git a/paddle/fluid/operators/matmul_op.cc b/paddle/fluid/operators/matmul_op.cc index 6a3507fbfc..e5d33fbc36 100644 --- a/paddle/fluid/operators/matmul_op.cc +++ b/paddle/fluid/operators/matmul_op.cc @@ -238,8 +238,8 @@ class MatMulOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(matmul, ops::MatMulOp, ops::MatMulOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(matmul_grad, ops::MatMulOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(matmul_grad, ops::MatMulOpGrad); REGISTER_OP_CPU_KERNEL( matmul, ops::MatMulKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/maxout_op.cc b/paddle/fluid/operators/maxout_op.cc index 9144d1fab9..e2bcba5a5e 100644 --- a/paddle/fluid/operators/maxout_op.cc +++ b/paddle/fluid/operators/maxout_op.cc @@ -102,8 +102,8 @@ class MaxOutOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(maxout, ops::MaxOutOp, ops::MaxOutOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(maxout_grad, ops::MaxOutOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(maxout_grad, ops::MaxOutOpGrad); REGISTER_OP_CPU_KERNEL( maxout, ops::MaxOutKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/modified_huber_loss_op.cc b/paddle/fluid/operators/modified_huber_loss_op.cc index 042a977d2e..3a0fc74584 100644 --- a/paddle/fluid/operators/modified_huber_loss_op.cc +++ b/paddle/fluid/operators/modified_huber_loss_op.cc @@ -110,8 +110,8 @@ class ModifiedHuberLossGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(modified_huber_loss, ops::ModifiedHuberLossOp, ops::ModifiedHuberLossOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(modified_huber_loss_grad, ops::ModifiedHuberLossGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(modified_huber_loss_grad, ops::ModifiedHuberLossGradOp); REGISTER_OP_CPU_KERNEL( modified_huber_loss, diff --git a/paddle/fluid/operators/mul_op.cc b/paddle/fluid/operators/mul_op.cc index 9a99e3878a..bfb20fefba 100644 --- a/paddle/fluid/operators/mul_op.cc +++ b/paddle/fluid/operators/mul_op.cc @@ -161,8 +161,8 @@ class MulGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(mul, ops::MulOp, ops::MulOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(mul_grad, ops::MulGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(mul_grad, ops::MulGradOp); REGISTER_OP_CPU_KERNEL( mul, ops::MulKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/nce_op.cc b/paddle/fluid/operators/nce_op.cc index b471a7e594..192bdf8ea5 100644 --- a/paddle/fluid/operators/nce_op.cc +++ b/paddle/fluid/operators/nce_op.cc @@ -182,8 +182,8 @@ class NCEOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(nce, ops::NCEOp, ops::NCEOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(nce_grad, ops::NCEOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(nce_grad, ops::NCEOpGrad); REGISTER_OP_CPU_KERNEL(nce, ops::NCEKernel, ops::NCEKernel); REGISTER_OP_CPU_KERNEL(nce_grad, diff --git a/paddle/fluid/operators/norm_op.cc b/paddle/fluid/operators/norm_op.cc index ff4d6ec69f..30a991224f 100644 --- a/paddle/fluid/operators/norm_op.cc +++ b/paddle/fluid/operators/norm_op.cc @@ -86,8 +86,8 @@ class NormOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(norm, ops::NormOp, ops::NormOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(norm_grad, ops::NormOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(norm_grad, ops::NormOpGrad); REGISTER_OP_CPU_KERNEL( norm, ops::NormKernel, ops::NormKernel); diff --git a/paddle/fluid/operators/pool_op.cc b/paddle/fluid/operators/pool_op.cc index 371100fd74..f2de075e0d 100644 --- a/paddle/fluid/operators/pool_op.cc +++ b/paddle/fluid/operators/pool_op.cc @@ -334,19 +334,19 @@ Example: namespace ops = paddle::operators; REGISTER_OPERATOR(pool2d, ops::PoolOp, ops::Pool2dOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(pool2d_grad, ops::PoolOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(pool2d_grad, ops::PoolOpGrad); REGISTER_OP_CPU_KERNEL( pool2d, ops::PoolKernel, ops::PoolKernel); REGISTER_OP_CPU_KERNEL( pool2d_grad, ops::PoolGradKernel, - ops::PoolGradKernel) + ops::PoolGradKernel); REGISTER_OPERATOR(pool3d, ops::PoolOp, ops::Pool3dOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(pool3d_grad, ops::PoolOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(pool3d_grad, ops::PoolOpGrad); REGISTER_OP_CPU_KERNEL( pool3d, ops::PoolKernel, diff --git a/paddle/fluid/operators/pool_with_index_op.cc b/paddle/fluid/operators/pool_with_index_op.cc index a633beab3b..848cd61b23 100644 --- a/paddle/fluid/operators/pool_with_index_op.cc +++ b/paddle/fluid/operators/pool_with_index_op.cc @@ -260,8 +260,8 @@ namespace ops = paddle::operators; REGISTER_OPERATOR(max_pool2d_with_index, ops::MaxPoolWithIndexOp, ops::MaxPool2dWithIndexOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(max_pool2d_with_index_grad, ops::MaxPoolWithIndexOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(max_pool2d_with_index_grad, ops::MaxPoolWithIndexOpGrad); REGISTER_OP_CPU_KERNEL( max_pool2d_with_index, @@ -273,12 +273,12 @@ REGISTER_OP_CPU_KERNEL( ops::MaxPoolWithIndexGradKernel, ops::MaxPoolWithIndexGradKernel) + int>); REGISTER_OPERATOR(max_pool3d_with_index, ops::MaxPoolWithIndexOp, ops::MaxPool3dWithIndexOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(max_pool3d_with_index_grad, ops::MaxPoolWithIndexOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(max_pool3d_with_index_grad, ops::MaxPoolWithIndexOpGrad); REGISTER_OP_CPU_KERNEL( max_pool3d_with_index, @@ -290,4 +290,4 @@ REGISTER_OP_CPU_KERNEL( ops::MaxPoolWithIndexGradKernel, ops::MaxPoolWithIndexGradKernel) + int>); diff --git a/paddle/fluid/operators/pool_with_index_op.cu.cc b/paddle/fluid/operators/pool_with_index_op.cu.cc index 5fc418b6fd..5497dcbd9c 100644 --- a/paddle/fluid/operators/pool_with_index_op.cu.cc +++ b/paddle/fluid/operators/pool_with_index_op.cu.cc @@ -27,7 +27,7 @@ REGISTER_OP_CUDA_KERNEL( ops::MaxPoolWithIndexGradKernel, ops::MaxPoolWithIndexGradKernel) + int>); REGISTER_OP_CUDA_KERNEL( max_pool3d_with_index, @@ -40,4 +40,4 @@ REGISTER_OP_CUDA_KERNEL( ops::MaxPoolWithIndexGradKernel, ops::MaxPoolWithIndexGradKernel) + int>); diff --git a/paddle/fluid/operators/prelu_op.cc b/paddle/fluid/operators/prelu_op.cc index ef28114ef7..a066b3e06e 100644 --- a/paddle/fluid/operators/prelu_op.cc +++ b/paddle/fluid/operators/prelu_op.cc @@ -84,8 +84,8 @@ class PReluGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(prelu, ops::PReluOp, ops::PReluOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(prelu_grad, ops::PReluGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(prelu_grad, ops::PReluGradOp); REGISTER_OP_CPU_KERNEL( prelu, ops::PReluKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/rank_loss_op.cc b/paddle/fluid/operators/rank_loss_op.cc index 865f03ec90..eb9ff8de3e 100644 --- a/paddle/fluid/operators/rank_loss_op.cc +++ b/paddle/fluid/operators/rank_loss_op.cc @@ -122,8 +122,8 @@ class RankLossGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(rank_loss, ops::RankLossOp, ops::RankLossOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(rank_loss_grad, ops::RankLossGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(rank_loss_grad, ops::RankLossGradOp); REGISTER_OP_CPU_KERNEL( rank_loss, ops::RankLossKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/reduce_op.cc b/paddle/fluid/operators/reduce_op.cc index 97bbc1dba6..093db96647 100644 --- a/paddle/fluid/operators/reduce_op.cc +++ b/paddle/fluid/operators/reduce_op.cc @@ -191,24 +191,24 @@ class ReduceProdOpMaker : public ReduceOpMaker { namespace ops = paddle::operators; REGISTER_OPERATOR(reduce_sum, ops::ReduceOp, ops::ReduceSumOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(reduce_sum_grad, ops::ReduceGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(reduce_sum_grad, ops::ReduceGradOp); REGISTER_OPERATOR(reduce_mean, ops::ReduceOp, ops::ReduceMeanOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(reduce_mean_grad, ops::ReduceGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(reduce_mean_grad, ops::ReduceGradOp); REGISTER_OPERATOR(reduce_max, ops::ReduceOp, ops::ReduceMaxOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(reduce_max_grad, ops::ReduceGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(reduce_max_grad, ops::ReduceGradOp); REGISTER_OPERATOR(reduce_min, ops::ReduceOp, ops::ReduceMinOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(reduce_min_grad, ops::ReduceGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(reduce_min_grad, ops::ReduceGradOp); REGISTER_OPERATOR(reduce_prod, ops::ReduceOp, ops::ReduceProdOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(reduce_prod_grad, ops::ReduceGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(reduce_prod_grad, ops::ReduceGradOp); #define REGISTER_REDUCE_CPU_KERNEL(reduce_type, functor, grad_functor) \ REGISTER_OP_CPU_KERNEL(reduce_type, \ diff --git a/paddle/fluid/operators/reshape_op.cc b/paddle/fluid/operators/reshape_op.cc index e8ade16bde..5e5ccc3ded 100644 --- a/paddle/fluid/operators/reshape_op.cc +++ b/paddle/fluid/operators/reshape_op.cc @@ -114,8 +114,8 @@ namespace ops = paddle::operators; using CPU = paddle::platform::CPUDeviceContext; REGISTER_OPERATOR(reshape, ops::ReshapeOp, ops::ReshapeOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(reshape_grad, ops::ReshapeGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(reshape_grad, ops::ReshapeGradOp); REGISTER_OP_CPU_KERNEL(reshape, ops::ReshapeKernel, ops::ReshapeKernel, ops::ReshapeKernel, diff --git a/paddle/fluid/operators/roi_pool_op.cc b/paddle/fluid/operators/roi_pool_op.cc index 4b0ea68e0e..224ec93d28 100644 --- a/paddle/fluid/operators/roi_pool_op.cc +++ b/paddle/fluid/operators/roi_pool_op.cc @@ -154,8 +154,8 @@ https://stackoverflow.com/questions/43430056/what-is-roi-layer-in-fast-rcnn namespace ops = paddle::operators; REGISTER_OPERATOR(roi_pool, ops::ROIPoolOp, ops::ROIPoolOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(roi_pool_grad, ops::ROIPoolGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(roi_pool_grad, ops::ROIPoolGradOp); REGISTER_OP_CPU_KERNEL( roi_pool, ops::CPUROIPoolOpKernel, diff --git a/paddle/fluid/operators/row_conv_op.cc b/paddle/fluid/operators/row_conv_op.cc index 7e3d8d7d2f..23f720da0b 100644 --- a/paddle/fluid/operators/row_conv_op.cc +++ b/paddle/fluid/operators/row_conv_op.cc @@ -251,8 +251,8 @@ class RowConvGradKernel namespace ops = paddle::operators; REGISTER_OPERATOR(row_conv, ops::RowConvOp, ops::RowConvOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(row_conv_grad, ops::RowConvGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(row_conv_grad, ops::RowConvGradOp); REGISTER_OP_CPU_KERNEL( row_conv, ops::RowConvKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/scatter_op.cc b/paddle/fluid/operators/scatter_op.cc index 0ad9e2ca2e..95b12455ea 100644 --- a/paddle/fluid/operators/scatter_op.cc +++ b/paddle/fluid/operators/scatter_op.cc @@ -103,7 +103,7 @@ $$ namespace ops = paddle::operators; REGISTER_OPERATOR(scatter, ops::ScatterOp, ops::ScatterOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(scatter_grad, ops::ScatterGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(scatter_grad, ops::ScatterGradOp); REGISTER_OP_CPU_KERNEL(scatter, ops::ScatterOpKernel); REGISTER_OP_CPU_KERNEL(scatter_grad, ops::ScatterGradientOpKernel); diff --git a/paddle/fluid/operators/sequence_concat_op.cc b/paddle/fluid/operators/sequence_concat_op.cc index 55631c2b91..3c21903e3a 100644 --- a/paddle/fluid/operators/sequence_concat_op.cc +++ b/paddle/fluid/operators/sequence_concat_op.cc @@ -127,7 +127,7 @@ namespace ops = paddle::operators; REGISTER_OPERATOR(sequence_concat, ops::SequenceConcatOp, ops::SequenceConcatOpMaker, paddle::framework::DefaultGradOpDescMaker< - false> /* set false to disable empty grad */) + false> /* set false to disable empty grad */); REGISTER_OPERATOR(sequence_concat_grad, ops::SequenceConcatGradOp); REGISTER_OP_CPU_KERNEL( sequence_concat, diff --git a/paddle/fluid/operators/sequence_conv_op.cc b/paddle/fluid/operators/sequence_conv_op.cc index 57a1febcc4..94f4b49b00 100644 --- a/paddle/fluid/operators/sequence_conv_op.cc +++ b/paddle/fluid/operators/sequence_conv_op.cc @@ -177,8 +177,8 @@ context_length, context_stride and context_start. namespace ops = paddle::operators; REGISTER_OPERATOR(sequence_conv, ops::SequenceConvOp, ops::SequenceConvOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(sequence_conv_grad, ops::SequenceConvGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(sequence_conv_grad, ops::SequenceConvGradOp); REGISTER_OP_CPU_KERNEL( sequence_conv, diff --git a/paddle/fluid/operators/sequence_expand_op.cc b/paddle/fluid/operators/sequence_expand_op.cc index ae05f94577..84a35d7172 100644 --- a/paddle/fluid/operators/sequence_expand_op.cc +++ b/paddle/fluid/operators/sequence_expand_op.cc @@ -202,8 +202,8 @@ class SequenceExpandOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(sequence_expand, ops::SequenceExpandOp, ops::SequenceExpandOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(sequence_expand_grad, ops::SequenceExpandOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(sequence_expand_grad, ops::SequenceExpandOpGrad); REGISTER_OP_CPU_KERNEL( sequence_expand, ops::SequenceExpandKernel, diff --git a/paddle/fluid/operators/sequence_slice_op.cc b/paddle/fluid/operators/sequence_slice_op.cc index df88121e6f..7cd620af07 100644 --- a/paddle/fluid/operators/sequence_slice_op.cc +++ b/paddle/fluid/operators/sequence_slice_op.cc @@ -122,8 +122,8 @@ NOTE: The first dimension size of input, the size of offset and Length, should b namespace ops = paddle::operators; REGISTER_OPERATOR(sequence_slice, ops::SequenceSliceOp, ops::SequenceSliceOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(sequence_slice_grad, ops::SequenceSliceGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(sequence_slice_grad, ops::SequenceSliceGradOp); REGISTER_OP_CPU_KERNEL( sequence_slice, ops::SequenceSliceOpKernel); diff --git a/paddle/fluid/operators/sequence_slice_op.cu b/paddle/fluid/operators/sequence_slice_op.cu old mode 100755 new mode 100644 diff --git a/paddle/fluid/operators/sequence_softmax_cudnn_op.cu.cc b/paddle/fluid/operators/sequence_softmax_cudnn_op.cu.cc index 5661f4b42f..0ddacb5710 100644 --- a/paddle/fluid/operators/sequence_softmax_cudnn_op.cu.cc +++ b/paddle/fluid/operators/sequence_softmax_cudnn_op.cu.cc @@ -99,7 +99,7 @@ class SequenceSoftmaxGradCUDNNKernel : public framework::OpKernel { namespace ops = paddle::operators; REGISTER_OP_KERNEL(sequence_softmax, CUDNN, ::paddle::platform::CUDAPlace, ops::SequenceSoftmaxCUDNNKernel, - ops::SequenceSoftmaxCUDNNKernel) + ops::SequenceSoftmaxCUDNNKernel); REGISTER_OP_KERNEL(sequence_softmax_grad, CUDNN, ::paddle::platform::CUDAPlace, ops::SequenceSoftmaxGradCUDNNKernel, - ops::SequenceSoftmaxGradCUDNNKernel) + ops::SequenceSoftmaxGradCUDNNKernel); diff --git a/paddle/fluid/operators/sequence_softmax_op.cc b/paddle/fluid/operators/sequence_softmax_op.cc index 47ba9a7445..a0d47c12ba 100644 --- a/paddle/fluid/operators/sequence_softmax_op.cc +++ b/paddle/fluid/operators/sequence_softmax_op.cc @@ -157,8 +157,8 @@ class SequenceSoftmaxGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(sequence_softmax, ops::SequenceSoftmaxOp, ops::SequenceSoftmaxOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(sequence_softmax_grad, ops::SequenceSoftmaxGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(sequence_softmax_grad, ops::SequenceSoftmaxGradOp); REGISTER_OP_CPU_KERNEL( sequence_softmax, ops::SequenceSoftmaxKernel, diff --git a/paddle/fluid/operators/sequence_softmax_op.cu.cc b/paddle/fluid/operators/sequence_softmax_op.cu.cc index 57adea3a1b..397df75415 100644 --- a/paddle/fluid/operators/sequence_softmax_op.cu.cc +++ b/paddle/fluid/operators/sequence_softmax_op.cu.cc @@ -18,7 +18,7 @@ namespace ops = paddle::operators; REGISTER_OP_CUDA_KERNEL( sequence_softmax, ops::SequenceSoftmaxKernel, - ops::SequenceSoftmaxKernel) + ops::SequenceSoftmaxKernel); REGISTER_OP_CUDA_KERNEL( sequence_softmax_grad, ops::SequenceSoftmaxGradKernel, diff --git a/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.cc b/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.cc index 442e1fef4c..5db77d0493 100644 --- a/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.cc +++ b/paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.cc @@ -138,9 +138,9 @@ namespace ops = paddle::operators; REGISTER_OPERATOR(sigmoid_cross_entropy_with_logits, ops::SigmoidCrossEntropyWithLogitsOp, ops::SigmoidCrossEntropyWithLogitsOpMaker, - paddle::framework::DefaultGradOpDescMaker) + paddle::framework::DefaultGradOpDescMaker); REGISTER_OPERATOR(sigmoid_cross_entropy_with_logits_grad, - ops::SigmoidCrossEntropyWithLogitsGradOp) + ops::SigmoidCrossEntropyWithLogitsGradOp); REGISTER_OP_CPU_KERNEL(sigmoid_cross_entropy_with_logits, ops::SigmoidCrossEntropyWithLogitsKernel< paddle::platform::CPUDeviceContext, float>); diff --git a/paddle/fluid/operators/smooth_l1_loss_op.cc b/paddle/fluid/operators/smooth_l1_loss_op.cc index 3c15f0542b..322581fdef 100644 --- a/paddle/fluid/operators/smooth_l1_loss_op.cc +++ b/paddle/fluid/operators/smooth_l1_loss_op.cc @@ -133,8 +133,8 @@ class SmoothL1LossGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(smooth_l1_loss, ops::SmoothL1LossOp, ops::SmoothL1LossOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(smooth_l1_loss_grad, ops::SmoothL1LossGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(smooth_l1_loss_grad, ops::SmoothL1LossGradOp); REGISTER_OP_CPU_KERNEL( smooth_l1_loss, ops::SmoothL1LossKernel); diff --git a/paddle/fluid/operators/softmax_op.cc b/paddle/fluid/operators/softmax_op.cc index 7c75a45fee..2741ba95bc 100644 --- a/paddle/fluid/operators/softmax_op.cc +++ b/paddle/fluid/operators/softmax_op.cc @@ -161,8 +161,8 @@ class SoftmaxOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(softmax, ops::SoftmaxOp, ops::SoftmaxOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(softmax_grad, ops::SoftmaxOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(softmax_grad, ops::SoftmaxOpGrad); REGISTER_OP_CPU_KERNEL( softmax, ops::SoftmaxKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/spp_op.cc b/paddle/fluid/operators/spp_op.cc index f286807159..1cada95501 100644 --- a/paddle/fluid/operators/spp_op.cc +++ b/paddle/fluid/operators/spp_op.cc @@ -93,8 +93,8 @@ class SppOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(spp, ops::SppOp, ops::SppOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(spp_grad, ops::SppOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(spp_grad, ops::SppOpGrad); REGISTER_OP_CPU_KERNEL( spp, ops::SppKernel, ops::SppKernel); diff --git a/paddle/fluid/operators/squared_l2_distance_op.cc b/paddle/fluid/operators/squared_l2_distance_op.cc index 11e5faac39..c32f575b54 100644 --- a/paddle/fluid/operators/squared_l2_distance_op.cc +++ b/paddle/fluid/operators/squared_l2_distance_op.cc @@ -111,8 +111,8 @@ class SquaredL2DistanceGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(squared_l2_distance, ops::SquaredL2DistanceOp, ops::SquaredL2DistanceOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(squared_l2_distance_grad, ops::SquaredL2DistanceGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(squared_l2_distance_grad, ops::SquaredL2DistanceGradOp); REGISTER_OP_CPU_KERNEL( squared_l2_distance, ops::SquaredL2DistanceKernel); diff --git a/paddle/fluid/operators/squared_l2_norm_op.cc b/paddle/fluid/operators/squared_l2_norm_op.cc index a60c100948..4ce51259da 100644 --- a/paddle/fluid/operators/squared_l2_norm_op.cc +++ b/paddle/fluid/operators/squared_l2_norm_op.cc @@ -69,8 +69,8 @@ $$Out = \sum_{i} X_{i}^2$$ namespace ops = paddle::operators; REGISTER_OPERATOR(squared_l2_norm, ops::SquaredL2NormOp, ops::SquaredL2NormOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(squared_l2_norm_grad, ops::SquaredL2NormGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(squared_l2_norm_grad, ops::SquaredL2NormGradOp); REGISTER_OP_CPU_KERNEL( squared_l2_norm, ops::SquaredL2NormKernel); diff --git a/paddle/fluid/operators/transpose_op.cc b/paddle/fluid/operators/transpose_op.cc index 0f60dbf289..3555cb68ca 100644 --- a/paddle/fluid/operators/transpose_op.cc +++ b/paddle/fluid/operators/transpose_op.cc @@ -119,8 +119,8 @@ class TransposeOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(transpose, ops::TransposeOp, ops::TransposeOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(transpose_grad, ops::TransposeOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(transpose_grad, ops::TransposeOpGrad); REGISTER_OP_CPU_KERNEL( transpose, ops::TransposeKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/unpool_op.cc b/paddle/fluid/operators/unpool_op.cc index 92a79269c2..b3cd87efa2 100644 --- a/paddle/fluid/operators/unpool_op.cc +++ b/paddle/fluid/operators/unpool_op.cc @@ -133,8 +133,8 @@ class UnpoolOpGrad : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(unpool, ops::UnpoolOp, ops::Unpool2dOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(unpool_grad, ops::UnpoolOpGrad) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(unpool_grad, ops::UnpoolOpGrad); REGISTER_OP_CPU_KERNEL( unpool, ops::UnpoolKernel, ops::UnpoolKernel); diff --git a/paddle/fluid/operators/warpctc_op.cc b/paddle/fluid/operators/warpctc_op.cc index ed81b5d266..6835a5dd62 100644 --- a/paddle/fluid/operators/warpctc_op.cc +++ b/paddle/fluid/operators/warpctc_op.cc @@ -133,8 +133,8 @@ class WarpCTCGradOp : public framework::OperatorWithKernel { namespace ops = paddle::operators; REGISTER_OPERATOR(warpctc, ops::WarpCTCOp, ops::WarpCTCOpMaker, - paddle::framework::DefaultGradOpDescMaker) -REGISTER_OPERATOR(warpctc_grad, ops::WarpCTCGradOp) + paddle::framework::DefaultGradOpDescMaker); +REGISTER_OPERATOR(warpctc_grad, ops::WarpCTCGradOp); REGISTER_OP_CPU_KERNEL( warpctc, ops::WarpCTCKernel); REGISTER_OP_CPU_KERNEL( -- GitLab