Closed ChristophBrandl closed 4 years ago
@pg020196 Maybe you can have a look, if the algorithm is correctly implemented or if there are any differences to the implementation in the c-code.
@ChristophBrandl Maybe this results from the different data types the calculation is performed in. The c-code uses integer division where as the backend util - as far as I know - uses floating point division. I‘ll check out the algorithm tomorrow.
Method get_output_dimensions produced the following dimension information in .h-file output for avgpool2d: const uint16_t LAYER_OUTPUT_WIDTH[5] = {28,14.5,1,1,1}; const uint16_t LAYER_OUTPUT_HEIGHT[5] = {28,14.5,210.25,128,10};
Wrong height 210.25 is a consequence of the false height (14.5) and width (14.5) calculated for the avgpool2d layer. Maybe the algorithm has to floor or round the calculated widths and heights.
Please review the algorithm in method get_output_dimensions in backend_utils.