Fix SwitchOrderLayer grad bugs by reshape output.grad

Adaptive_data_structure_for_SwitchOrderLayer
wanghaoshuang 8 years ago
parent a6c53fc2fc
commit baae8447ac

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

Loading…
Cancel
Save