How to handle even and odd convolutional filter sizes and images
How to handle even and odd convolutional filter sizes and images
Loading saved threads...
Soubriquet · External communityPost link
External question — Cross Validated Stack Exchange
Author: Soubriquet
Original post: https://stats.stackexchange.com/questions/271580
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Is there a rule of thumb for determining the size of a convolutional filter given the shape of the input? Specifically, if you want to do a 1D convolution over an even-length vector, does the kernel need to be a divisor of the vector length? Does the kernel need to be even? I understand that when using an odd-length kernel,
you align the center element with the stride position on the input vector
, but with even-length kernels there is no center position. For example, if I have a vector
[a,b,c,d]
and a kernel
[0,1]
, should the kernel start by aligning
1
with
a
or should
0
align with
a
?
Also is there any theory on why and how much padding and stride you should use when convolving and trade-offs between these two parameters?
Quote
Report
liangjy · External communityPost link
External answer — Cross Validated Stack Exchange
Author: liangjy
Original post: https://stats.stackexchange.com/a/271594
License: CC BY-SA 3.0 — https://creativecommons.org/licenses/by-sa/3.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
It's usual to use stride 1 and pad the input layers such that the output layers so that they are the same size as the input layers. Using stride lengths of 1 separates the processes of feature extraction (the job of the convolutional layers) and making the model invariant to spatial translation (the job of the pooling layers). Padding the input layers ensures that the model doesn't slowly lose information about edge elements.
Quote
Report
Joseph Santarcangelo · External communityPost link
External answer — Cross Validated Stack Exchange
Author: Joseph Santarcangelo
Original post: https://stats.stackexchange.com/a/345393
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
The size of your convolutional filter depends on your application. For convolutional networks, the size , padding and stride should be treated like regular hyperparameters. In some applications, the size of your convolutional filter is important. For example, you may want a Linear Phase filter so you will need an odd length filter but this is more important for signal and image processing.
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External question — Cross Validated Stack Exchange Author: Soubriquet Source score (net votes, not local likes): 3 Original post: https://stats.stackexchange.com/questions/271580 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Is there a rule of thumb for determining the size of a convolutional filter given the shape of the input? Specifically, if you want to do a 1D convolution over an even-length vector, does the kernel need to be a divisor of the vector length? Does the kernel need to be even? I understand that when using an odd-length kernel, you align the center element with the stride position on the input vector , but with even-length kernels there is no center position. For example, if I have a vector [a,b,c,d] and a kernel [0,1] , should the kernel start by aligning 1 with a or should 0 align with a ? Also is there any theory on why and how much padding and stride you should use when convolving and trade-offs between these two parameters?
Checking account access…