diff --git a/paddle/gserver/layers/CudnnConvLayer.cpp b/paddle/gserver/layers/CudnnConvLayer.cpp index cce82c16287615dcdbe017ca469300727532b925..ed5eb2cb5ba75dfe5f36c04e680cae643381c3f7 100644 --- a/paddle/gserver/layers/CudnnConvLayer.cpp +++ b/paddle/gserver/layers/CudnnConvLayer.cpp @@ -12,12 +12,35 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -#include "CudnnConvLayer.h" -#include "paddle/utils/Logging.h" -#include "paddle/utils/Stat.h" +#include "CudnnConvBaseLayer.h" namespace paddle { +/** + * @brief A 2-dimension conv layer implemented by cuDNN. It only + * supports GPU mode. We automatic select CudnnConvLayer for GPU + * mode and ExpandConvLayer for CPU mode if you set type of "conv". + * User also can specfiy type of "exconv" or "cudnn_conv" for + * particular type. + * + * The config file api is img_conv_layer. + */ +class CudnnConvLayer : public CudnnConvBaseLayer { +public: + explicit CudnnConvLayer(const LayerConfig& config) + : CudnnConvBaseLayer(config) {} + + ~CudnnConvLayer() {} +}; REGISTER_LAYER(cudnn_conv, CudnnConvLayer); +class CudnnConvTransLayer : public CudnnConvBaseLayer { +public: + explicit CudnnConvTransLayer(const LayerConfig& config) + : CudnnConvBaseLayer(config) {} + + ~CudnnConvTransLayer() {} +}; + +REGISTER_LAYER(cudnn_convt, CudnnConvTransLayer); } // namespace paddle diff --git a/paddle/gserver/layers/CudnnConvLayer.h b/paddle/gserver/layers/CudnnConvLayer.h deleted file mode 100644 index b43ea7bffa1099e0b6b3b783e9cc332cdf11e8cb..0000000000000000000000000000000000000000 --- a/paddle/gserver/layers/CudnnConvLayer.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. */ - -#pragma once - -#include -#include "CudnnConvBaseLayer.h" -#include "Projection.h" -#include "paddle/math/Matrix.h" - -namespace paddle { - -/** - * @brief A 2-dimension conv layer implemented by cuDNN. It only - * supports GPU mode. We automatic select CudnnConvLayer for GPU - * mode and ExpandConvLayer for CPU mode if you set type of "conv". - * User also can specfiy type of "exconv" or "cudnn_conv" for - * particular type. - * - * The config file api is img_conv_layer. - */ -class CudnnConvLayer : public CudnnConvBaseLayer { -public: - explicit CudnnConvLayer(const LayerConfig& config) - : CudnnConvBaseLayer(config) {} - - ~CudnnConvLayer() {} -}; - -} // namespace paddle diff --git a/paddle/gserver/layers/CudnnConvTransLayer.cpp b/paddle/gserver/layers/CudnnConvTransLayer.cpp deleted file mode 100644 index 9cecb871e1182763ff378f2dab682fb7ff60f307..0000000000000000000000000000000000000000 --- a/paddle/gserver/layers/CudnnConvTransLayer.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. */ - -#include "CudnnConvTransLayer.h" -#include "paddle/utils/Logging.h" -#include "paddle/utils/Stat.h" - -namespace paddle { - -REGISTER_LAYER(cudnn_convt, CudnnConvTransLayer); - -} // namespace paddle diff --git a/paddle/gserver/layers/CudnnConvTransLayer.h b/paddle/gserver/layers/CudnnConvTransLayer.h deleted file mode 100644 index c69dd9a344f4f439a0ce65d5effdabe73cb4cf40..0000000000000000000000000000000000000000 --- a/paddle/gserver/layers/CudnnConvTransLayer.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. */ - -#pragma once - -#include -#include "CudnnConvBaseLayer.h" -#include "Projection.h" -#include "paddle/math/Matrix.h" - -namespace paddle { - -/** - * @brief A 2-dimension conv layer implemented by cuDNN. It only - * supports GPU mode. We automatic select CudnnConvLayer for GPU - * mode and ExpandConvLayer for CPU mode if you set type of "conv". - * User also can specfiy type of "exconv" or "cudnn_conv" for - * particular type. - * - * The config file api is img_conv_layer. - */ -class CudnnConvTransLayer : public CudnnConvBaseLayer { -public: - explicit CudnnConvTransLayer(const LayerConfig& config) - : CudnnConvBaseLayer(config) {} - - ~CudnnConvTransLayer() {} -}; - -} // namespace paddle