Data Science Asked on April 28, 2021
Should kernel size always be a prime number? E.g. (3,3) (5,5) (7,7).
While tinkering with sklearn.preprocessing.KernelCenterer()
, I noticed that I could only get it to work on a 3,3 array not 2,3 not 6,1.
Then I realized that in a square that is prime-by-prime, there is always a center – hence Centerer
.
[ ][ ][ ]
[ ][X][ ]
[ ][ ][ ]
[ ][ ][ ][ ][ ]
[ ][ ][ ][ ][ ]
[ ][ ][X][ ][ ]
[ ][ ][ ][ ][ ]
[ ][ ][ ][ ][ ]
Odd numbers, usually, but not necessarily. This can depend on the problem at hand. The odd length of the side of the kernel is used in order to emphasize the center of the kernel. For a more detailed discussion of the geometry of kernels and convnets have a look at this thesis.
Answered by Alex on April 28, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP