The attached neural was created with the following parameters:
model.add(keras.layers.AveragePooling2D(pool_size=(2,1), strides=(2,1),padding='valid', input_shape = (5,3,1)))
When translating this neural network it seems like the dimensions get mixed up. The following table shows the actual values compared to the values I expected:
Variable in .h-file
Expected
Actual
POOL_HEIGHT
{2}
{1}
POOL_WIDTH
{1}
{2}
VERTICAL_STRIDE
{2}
{1}
HORIZONTAL_STRIDE
{1}
{2}
LAYER_OUTPUT_WIDTH
{3,3}
{3,3}
LAYER_OUTPUT_HEIGHT
{5,2}
{5,2}
As far as I understand the values of POOL_HEIGHT and POOLWIDTH are somehow swapped by the backend. Same thing goes for VERTICAL and HORIZONAL_STRIDE.
The attached neural was created with the following parameters:
model.add(keras.layers.AveragePooling2D(pool_size=(2,1), strides=(2,1),padding='valid', input_shape = (5,3,1)))
When translating this neural network it seems like the dimensions get mixed up. The following table shows the actual values compared to the values I expected:
As far as I understand the values of POOL_HEIGHT and POOLWIDTH are somehow swapped by the backend. Same thing goes for VERTICAL and HORIZONAL_STRIDE.