kleka
kleka

Reputation: 384

How is kernel size in keras convolution layers defined?

According to the documentation website (https://keras.io/layers/convolutional/) the kernel size of a keras convolution layer is defined as height x width:

kernel_size: An integer or tuple/list of 2 integers, specifying the height and width of the 2D convolution window. Can be a single integer to specify the same value for all spatial dimensions.

In the code documentation however it is defined as the exact opposite:

kernel_size: An integer or tuple/list of 2 integers, specifying the width and height of the 2D convolution window. Can be a single integer to specify the same value for all spatial dimensions.

Which one is true? As far as I figured out, the definition of the website should be the right one, am i right?

Upvotes: 2

Views: 5533

Answers (1)

Manoj Mohan
Manoj Mohan

Reputation: 6044

Yes, the definition in the website is correct (height x width). The code documentation was fixed in version 2.2.0 as per this commit.

https://github.com/keras-team/keras/commit/027d37961afff8a7963836ca87ccdbbf65a78811#diff-d462a3275abee3aa77ba2b341e45cf20L366

Upvotes: 1

Related Questions