MNN/source
gdh1995 1eaa7a632b fix Reduce may crash if it follows Reshape
When converting a caffe model, `ReductionTransform` thinks
there're always 4 dims in the input of a `Reduction` layer.

However, when forwarding `OpCommonUtils::computeReduceDims`
had an assumption that dim numbers wouldn't exceed
`inputs[0]->dimensions()`.

So, MNN would write unexpected addresses and then crash,
if a Reduction op follows a Reshape / InnerProduct op,
since both ops may output a tensor of 2 dimensions.

_Comment_: I know `TransformInnerProduct` often converts caffe's
InnerProduct into 1x1 Convolution, but Reshape can also cause a
tensor has only 2 dimensions, so this still deserves a fix.
2020-12-19 02:42:07 +08:00
..
backend Synchronize internal master to Github 2020-12-15 14:12:35 +08:00
core fix Reduce may crash if it follows Reshape 2020-12-19 02:42:07 +08:00
cv Github release 1.1.0 2020-11-05 16:49:17 +08:00
geometry Synchronize internal master to Github 2020-12-15 14:12:35 +08:00
math Synchronize internal master to Github 2020-12-15 14:12:35 +08:00
plugin Synchronize internal master to Github 2020-12-15 14:12:35 +08:00
shape Synchronize internal master to Github 2020-12-15 14:12:35 +08:00
utils Synchronize internal master to Github 2020-12-15 14:12:35 +08:00