From 06c083fe9ed26417a0c895088330b866e76f0c3e Mon Sep 17 00:00:00 2001 From: SigureMo Date: Mon, 19 Sep 2022 17:11:52 +0800 Subject: [PATCH 1/2] [CodeStyle] remove tabs in cpp files --- paddle/fluid/operators/dequeue_op.cc | 2 +- paddle/fluid/operators/enqueue_op.cc | 2 +- paddle/fluid/operators/pixel_shuffle_op.cc | 18 +++++++++--------- paddle/fluid/operators/pixel_unshuffle_op.cc | 16 ++++++++-------- .../operators/reader/create_ctr_reader_op.cc | 2 +- paddle/fluid/operators/shuffle_channel_op.cc | 18 +++++++++--------- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/paddle/fluid/operators/dequeue_op.cc b/paddle/fluid/operators/dequeue_op.cc index a23b408d0b798..8467bd58cea22 100644 --- a/paddle/fluid/operators/dequeue_op.cc +++ b/paddle/fluid/operators/dequeue_op.cc @@ -90,7 +90,7 @@ class DequeueOpMaker : public framework::OpProtoAndCheckerMaker { AddOutput("Out", "A list of `lod_tensor` to dequeue and assigned.") .AsDuplicable(); AddComment(R"DOC( - Dequeue operator. + Dequeue operator. )DOC"); } }; diff --git a/paddle/fluid/operators/enqueue_op.cc b/paddle/fluid/operators/enqueue_op.cc index b118852870ed8..e8c2a4d5db662 100644 --- a/paddle/fluid/operators/enqueue_op.cc +++ b/paddle/fluid/operators/enqueue_op.cc @@ -78,7 +78,7 @@ class EnqueueOpMaker : public framework::OpProtoAndCheckerMaker { AddAttr("queue_name", "Name of the `LoDTensorBlockingQueueHolder` variable"); AddComment(R"DOC( - Enqueue operator. + Enqueue operator. )DOC"); } }; diff --git a/paddle/fluid/operators/pixel_shuffle_op.cc b/paddle/fluid/operators/pixel_shuffle_op.cc index 64e73217068b3..2f955a744326a 100644 --- a/paddle/fluid/operators/pixel_shuffle_op.cc +++ b/paddle/fluid/operators/pixel_shuffle_op.cc @@ -52,17 +52,17 @@ class PixelShuffleOpMaker : public framework::OpProtoAndCheckerMaker { .SetDefault("NCHW"); AddComment(R"DOC( - Pixel Shuffle operator - This operator rearranges elements in a tensor of shape :math:`(*, C \times r^2, H, W)` - to a tensor of shape :math:`(C, H \times r, W \times r)`. + Pixel Shuffle operator + This operator rearranges elements in a tensor of shape :math:`(*, C \times r^2, H, W)` + to a tensor of shape :math:`(C, H \times r, W \times r)`. - This is useful for implementing efficient sub-pixel convolution - with a stride of :math:`1/r`. + This is useful for implementing efficient sub-pixel convolution + with a stride of :math:`1/r`. - Please refer to the paper: - `Real-Time Single Image and Video Super-Resolution Using an Efficient - Sub-Pixel Convolutional Neural Network `_ - by Shi et. al (2016) for more details. + Please refer to the paper: + `Real-Time Single Image and Video Super-Resolution Using an Efficient + Sub-Pixel Convolutional Neural Network `_ + by Shi et. al (2016) for more details. )DOC"); } diff --git a/paddle/fluid/operators/pixel_unshuffle_op.cc b/paddle/fluid/operators/pixel_unshuffle_op.cc index e0ac5283ab86b..c2bb68aff6677 100644 --- a/paddle/fluid/operators/pixel_unshuffle_op.cc +++ b/paddle/fluid/operators/pixel_unshuffle_op.cc @@ -48,16 +48,16 @@ class PixelUnshuffleOpMaker : public framework::OpProtoAndCheckerMaker { .SetDefault("NCHW"); AddComment(R"DOC( - Pixel Unshuffle operator - This operator rearranges elements in a tensor of shape :math:`(*, C, H, W)` - to a tensor of shape :math:`(*, C\times r^2, H / r, W / r)`. + Pixel Unshuffle operator + This operator rearranges elements in a tensor of shape :math:`(*, C, H, W)` + to a tensor of shape :math:`(*, C\times r^2, H / r, W / r)`. - This operation is the reversion of PixelShuffle operation. + This operation is the reversion of PixelShuffle operation. - Please refer to the paper: - `Real-Time Single Image and Video Super-Resolution Using an Efficient - Sub-Pixel Convolutional Neural Network `_ - by Shi et. al (2016) for more details. + Please refer to the paper: + `Real-Time Single Image and Video Super-Resolution Using an Efficient + Sub-Pixel Convolutional Neural Network `_ + by Shi et. al (2016) for more details. )DOC"); } diff --git a/paddle/fluid/operators/reader/create_ctr_reader_op.cc b/paddle/fluid/operators/reader/create_ctr_reader_op.cc index 6af29bfa5affe..8c38aaf528da0 100644 --- a/paddle/fluid/operators/reader/create_ctr_reader_op.cc +++ b/paddle/fluid/operators/reader/create_ctr_reader_op.cc @@ -87,7 +87,7 @@ class CreateCTRReaderOpMaker : public FileReaderMakerBase { "format is svm"); AddComment(R"DOC( - Create CTRReader to support read ctr data with cpp. + Create CTRReader to support read ctr data with cpp. )DOC"); } }; diff --git a/paddle/fluid/operators/shuffle_channel_op.cc b/paddle/fluid/operators/shuffle_channel_op.cc index 9fc7c6488f460..7c8337e978f59 100644 --- a/paddle/fluid/operators/shuffle_channel_op.cc +++ b/paddle/fluid/operators/shuffle_channel_op.cc @@ -70,15 +70,15 @@ class ShuffleChannelOpMaker : public framework::OpProtoAndCheckerMaker { "group should be larger than 0.")); }); AddComment(R"DOC( - Shuffle Channel operator - This opearator shuffles the channels of input x. - It divide the input channels in each group into several subgroups, - and obtain a new order by selecting element from every subgroup one by one. - - Shuffle channel operation makes it possible to build more powerful structures - with multiple group convolutional layers. - please get more information from the following paper: - https://arxiv.org/pdf/1707.01083.pdf + Shuffle Channel operator + This opearator shuffles the channels of input x. + It divide the input channels in each group into several subgroups, + and obtain a new order by selecting element from every subgroup one by one. + + Shuffle channel operation makes it possible to build more powerful structures + with multiple group convolutional layers. + please get more information from the following paper: + https://arxiv.org/pdf/1707.01083.pdf )DOC"); } }; From a2d4f5bd7aaa045f5aab91eda65a4b927927f233 Mon Sep 17 00:00:00 2001 From: SigureMo Date: Tue, 20 Sep 2022 15:26:46 +0800 Subject: [PATCH 2/2] update comment format --- paddle/fluid/operators/pixel_shuffle_op.cc | 13 ++++++------- paddle/fluid/operators/pixel_unshuffle_op.cc | 11 +++++------ paddle/fluid/operators/shuffle_channel_op.cc | 2 +- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/paddle/fluid/operators/pixel_shuffle_op.cc b/paddle/fluid/operators/pixel_shuffle_op.cc index 2f955a744326a..098395d885062 100644 --- a/paddle/fluid/operators/pixel_shuffle_op.cc +++ b/paddle/fluid/operators/pixel_shuffle_op.cc @@ -54,17 +54,16 @@ class PixelShuffleOpMaker : public framework::OpProtoAndCheckerMaker { AddComment(R"DOC( Pixel Shuffle operator This operator rearranges elements in a tensor of shape :math:`(*, C \times r^2, H, W)` - to a tensor of shape :math:`(C, H \times r, W \times r)`. + to a tensor of shape :math:`(C, H \times r, W \times r)`. This is useful for implementing efficient sub-pixel convolution - with a stride of :math:`1/r`. + with a stride of :math:`1/r`. Please refer to the paper: - `Real-Time Single Image and Video Super-Resolution Using an Efficient - Sub-Pixel Convolutional Neural Network `_ - by Shi et. al (2016) for more details. - - )DOC"); + `Real-Time Single Image and Video Super-Resolution Using an Efficient + Sub-Pixel Convolutional Neural Network `_ + by Shi et. al (2016) for more details. + )DOC"); } }; diff --git a/paddle/fluid/operators/pixel_unshuffle_op.cc b/paddle/fluid/operators/pixel_unshuffle_op.cc index c2bb68aff6677..52b7452d7a8cc 100644 --- a/paddle/fluid/operators/pixel_unshuffle_op.cc +++ b/paddle/fluid/operators/pixel_unshuffle_op.cc @@ -50,16 +50,15 @@ class PixelUnshuffleOpMaker : public framework::OpProtoAndCheckerMaker { AddComment(R"DOC( Pixel Unshuffle operator This operator rearranges elements in a tensor of shape :math:`(*, C, H, W)` - to a tensor of shape :math:`(*, C\times r^2, H / r, W / r)`. + to a tensor of shape :math:`(*, C\times r^2, H / r, W / r)`. This operation is the reversion of PixelShuffle operation. Please refer to the paper: - `Real-Time Single Image and Video Super-Resolution Using an Efficient - Sub-Pixel Convolutional Neural Network `_ - by Shi et. al (2016) for more details. - - )DOC"); + `Real-Time Single Image and Video Super-Resolution Using an Efficient + Sub-Pixel Convolutional Neural Network `_ + by Shi et. al (2016) for more details. + )DOC"); } }; diff --git a/paddle/fluid/operators/shuffle_channel_op.cc b/paddle/fluid/operators/shuffle_channel_op.cc index 7c8337e978f59..ba96e92d3030b 100644 --- a/paddle/fluid/operators/shuffle_channel_op.cc +++ b/paddle/fluid/operators/shuffle_channel_op.cc @@ -79,7 +79,7 @@ class ShuffleChannelOpMaker : public framework::OpProtoAndCheckerMaker { with multiple group convolutional layers. please get more information from the following paper: https://arxiv.org/pdf/1707.01083.pdf - )DOC"); + )DOC"); } };