Skip to content

Commit 020630b

Browse files
authored
Merge pull request #7395 from tensor-tang/fixds2
fix ds2 issue
2 parents af96cd5 + a7e847b commit 020630b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

paddle/gserver/layers/MKLDNNLayer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ void MKLDNNLayer::reshapeInput(int& batchsize,
132132
if (w != 0) {
133133
width = w;
134134
}
135+
height = height != 0 ? height : 1;
136+
width = width != 0 ? width : 1;
135137
}
136138

137139
void MKLDNNLayer::reshapeOutput(size_t height, size_t width) {

paddle/gserver/layers/MKLDNNLayer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ class MKLDNNLayer : public Layer {
9898
public:
9999
explicit MKLDNNLayer(const LayerConfig& config)
100100
: Layer(config),
101+
ih_(0),
102+
iw_(0),
101103
condition_(0),
102104
needResetBwd_(true),
103105
outputOnlyMKLDNN_(false),

0 commit comments

Comments
 (0)