I'm working with a fork of the ACL library and I'm currently looking into adding space-to-depth support for a use-case that I have. Whilst looking into what was already there, I noticed a bug in the output shape calculation.
Issue
There appears to be a bug in the calculation of the output shape:
cf. Tensorflow docs here. In short, the space-to-depth transformation should result in a reduction in the height and weight and an increase in the number of channels -- the opposite of what the code above says.
Problem description
I'm working with a fork of the ACL library and I'm currently looking into adding space-to-depth support for a use-case that I have. Whilst looking into what was already there, I noticed a bug in the output shape calculation.
Issue
There appears to be a bug in the calculation of the output shape:
https://github.com/ARM-software/ComputeLibrary/blob/aabef6c0584f06f4c0f4b61fb787d80374240619/arm_compute/core/utils/misc/ShapeCalculator.h#L1162-L1176
cf. Tensorflow docs here. In short, the space-to-depth transformation should result in a reduction in the height and weight and an increase in the number of channels -- the opposite of what the code above says.
Solution
I believe lines 1171-1173 should be changed to: