albanD:

It does the backward pass wrt the input.


What did you exactly mean by this sentence above ?
Could you pinpoint the exact line of code ?
Besides, what is the purpose of following lines of code 1 ?
int uppool_Ho = (Hi + Kh - 1);
int uppool_Wo = (Wi + Kw - 1);
And how do I interpret int transpose_uppool_blocks = (N * Co * Ho * Wo + transpose_uppool_threads -1) / transpose_uppool_threads; 1 ?