Is that the two additions of stride - 1 in both height and width of img just to prevent "index out of bound" error? I've tried some examples without it and haven't encountered any error, so I'm curious about at which case that error would happen. And I also found that col2im is not the inverse function of im2col when H + 2*pad - FH is divisible by stride.
Dear author/team, I'm your reader, I need help to confirm about some logic of the algorithm used in col2im, line 92 as follow
https://github.com/oreilly-japan/deep-learning-from-scratch/blob/ea91786b9f27df440000b6d46e534831fb780b80/common/util.py#L92
Is that the two additions of
stride - 1
in both height and width ofimg
just to prevent "index out of bound" error? I've tried some examples without it and haven't encountered any error, so I'm curious about at which case that error would happen. And I also found that col2im is not the inverse function of im2col whenH + 2*pad - FH
is divisible bystride
.Thank you!