diff --git a/paddle/function/ImageExpandOp.cpp b/paddle/function/ImageExpandOp.cpp index 00a2571936b399d62b5cea90874a034f6771e310..a89b6bba45843d81264819cad6ba053f28314f6b 100644 --- a/paddle/function/ImageExpandOp.cpp +++ b/paddle/function/ImageExpandOp.cpp @@ -32,7 +32,7 @@ namespace paddle { * \param inputs[0] Sequence data of NST format. * \param outputs[0] Image data of NCHW format. */ -class ImageExpandFunction : public FunctionBase { +class BlockExpandFunction : public FunctionBase { public: void init(const FuncConfig& config) override { // function arguments @@ -100,10 +100,10 @@ protected: }; template -class ImageExpandForward : public ImageExpandFunction { +class BlockExpandForward : public BlockExpandFunction { public: void init(const FuncConfig& config) override { - ImageExpandFunction::init(config); + BlockExpandFunction::init(config); } void check(const BufferArgs& inputs, const BufferArgs& outputs) override { @@ -148,10 +148,10 @@ public: }; template -class ImageExpandBackward : public ImageExpandFunction { +class BlockExpandBackward : public BlockExpandFunction { public: void init(const FuncConfig& config) override { - ImageExpandFunction::init(config); + BlockExpandFunction::init(config); } void check(const BufferArgs& inputs, const BufferArgs& outputs) override { @@ -192,11 +192,11 @@ public: } }; -REGISTER_TYPED_FUNC(ImageExpand, CPU, ImageExpandForward); -REGISTER_TYPED_FUNC(ImageExpandGrad, CPU, ImageExpandBackward); +REGISTER_TYPED_FUNC(BlockExpand, CPU, BlockExpandForward); +REGISTER_TYPED_FUNC(BlockExpandGrad, CPU, BlockExpandBackward); #ifndef PADDLE_ONLY_CPU -REGISTER_TYPED_FUNC(ImageExpand, GPU, ImageExpandForward); -REGISTER_TYPED_FUNC(ImageExpandGrad, GPU, ImageExpandBackward); +REGISTER_TYPED_FUNC(BlockExpand, GPU, BlockExpandForward); +REGISTER_TYPED_FUNC(BlockExpandGrad, GPU, BlockExpandBackward); #endif } // namespace paddle diff --git a/paddle/function/ImageExpandOpTest.cpp b/paddle/function/ImageExpandOpTest.cpp index fb312549dc758ee6edb0df34332a9c1d8d0035a7..5e4897e72ba9fab2dd9e25d90313dc1b4d38e2d4 100644 --- a/paddle/function/ImageExpandOpTest.cpp +++ b/paddle/function/ImageExpandOpTest.cpp @@ -17,7 +17,7 @@ limitations under the License. */ namespace paddle { -TEST(ImageExpandForward, real) { +TEST(BlockExpandForward, real) { for (size_t batchSize : {5, 32}) { for (size_t channels : {1, 5, 32}) { for (size_t inputHeight : {5, 33, 100}) { @@ -29,7 +29,7 @@ TEST(ImageExpandForward, real) { std::vector strides = {stride, stride}; std::vector paddings = {padding, padding}; std::vector blocks = {block, block}; - CpuGpuFuncCompare test("ImageExpand", + CpuGpuFuncCompare test("BlockExpand", FuncConfig() .set("strides", strides) .set("paddings", paddings) @@ -60,7 +60,7 @@ TEST(ImageExpandForward, real) { } } -TEST(ImageExpandBackward, real) { +TEST(BlockExpandBackward, real) { for (size_t batchSize : {5, 32}) { for (size_t channels : {1, 5, 32}) { for (size_t inputHeight : {5, 33, 100}) { @@ -72,7 +72,7 @@ TEST(ImageExpandBackward, real) { std::vector strides = {stride, stride}; std::vector paddings = {padding, padding}; std::vector blocks = {block, block}; - CpuGpuFuncCompare test("ImageExpandGrad", + CpuGpuFuncCompare test("BlockExpandGrad", FuncConfig() .set("strides", strides) .set("paddings", paddings) diff --git a/paddle/gserver/layers/BlockExpandLayer.cpp b/paddle/gserver/layers/BlockExpandLayer.cpp index adc9a814ffbb1bdc6837945442116ec48e63f9dc..3b1f34635917290c6e4a9230b546892cc5cb7bfa 100644 --- a/paddle/gserver/layers/BlockExpandLayer.cpp +++ b/paddle/gserver/layers/BlockExpandLayer.cpp @@ -41,13 +41,13 @@ bool BlockExpandLayer::init(const LayerMap& layerMap, std::vector paddings = {(size_t)paddingH_, (size_t)paddingW_}; std::vector blocks = {(size_t)blockH_, (size_t)blockW_}; createFunction(forward_, - "ImageExpand", + "BlockExpand", FuncConfig() .set("strides", strides) .set("paddings", paddings) .set("blocks", blocks)); createFunction(backward_, - "ImageExpandGrad", + "BlockExpandGrad", FuncConfig() .set("strides", strides) .set("paddings", paddings)