fix SwitchOrderLayer forward

enforce_failed
chengduoZH 8 years ago
parent bc9f4c5590
commit e76eb8534d

@ -83,8 +83,7 @@ void SwitchOrderLayer::forward(PassType passType) {
setOutDims(); setOutDims();
resetOutput(outDims_[0], outDims_[1] * outDims_[2] * outDims_[3]); resetOutput(outDims_[0], outDims_[1] * outDims_[2] * outDims_[3]);
if (heightAxis_.size() > 0) { if (heightAxis_.size() > 0) {
getOutputValue()->reshape(reshapeHeight_, reshapeWidth_); resetOutput(reshapeHeight_, reshapeWidth_);
getOutputGrad()->reshape(reshapeHeight_, reshapeWidth_);
} }
// switch NCHW to NHWC // switch NCHW to NHWC

Loading…
Cancel
Save