Sunday, October 2, 2022

AI/ML How to find size of output tensor after convolutions

Generally, in a Convolutional Neural Network, the input image undergoes multiple convolution operations, where each convolution operation might change the size of the input image. 

If mxn is the size of the input image tensor, kxk is the size of the convolution filter and s is the value of stride taken, then, the size of the resulting tensor, X x Y (after a series of convolution operation) can be found out using the following formula:


(X, Y) = (( m - k) / s ) + 1, (( n - k) / s ) + 1

references:

https://www.theclickreader.com/stride-and-calculation-of-output-size/ 

No comments:

Post a Comment