Skip to content

Commit 3493f5b

Browse files
author
wangyang59
committed
consolidate CudnnConv and CudnnConvTrans files into one file
1 parent ff127eb commit 3493f5b

File tree

4 files changed

+26
-108
lines changed

4 files changed

+26
-108
lines changed

paddle/gserver/layers/CudnnConvLayer.cpp

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,35 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

15-
#include "CudnnConvLayer.h"
16-
#include "paddle/utils/Logging.h"
17-
#include "paddle/utils/Stat.h"
15+
#include "CudnnConvBaseLayer.h"
1816

1917
namespace paddle {
18+
/**
19+
* @brief A 2-dimension conv layer implemented by cuDNN. It only
20+
* supports GPU mode. We automatic select CudnnConvLayer for GPU
21+
* mode and ExpandConvLayer for CPU mode if you set type of "conv".
22+
* User also can specfiy type of "exconv" or "cudnn_conv" for
23+
* particular type.
24+
*
25+
* The config file api is img_conv_layer.
26+
*/
27+
class CudnnConvLayer : public CudnnConvBaseLayer {
28+
public:
29+
explicit CudnnConvLayer(const LayerConfig& config)
30+
: CudnnConvBaseLayer(config) {}
31+
32+
~CudnnConvLayer() {}
33+
};
2034

2135
REGISTER_LAYER(cudnn_conv, CudnnConvLayer);
2236

37+
class CudnnConvTransLayer : public CudnnConvBaseLayer {
38+
public:
39+
explicit CudnnConvTransLayer(const LayerConfig& config)
40+
: CudnnConvBaseLayer(config) {}
41+
42+
~CudnnConvTransLayer() {}
43+
};
44+
45+
REGISTER_LAYER(cudnn_convt, CudnnConvTransLayer);
2346
} // namespace paddle

paddle/gserver/layers/CudnnConvLayer.h

Lines changed: 0 additions & 41 deletions
This file was deleted.

paddle/gserver/layers/CudnnConvTransLayer.cpp

Lines changed: 0 additions & 23 deletions
This file was deleted.

paddle/gserver/layers/CudnnConvTransLayer.h

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)