Skip to content

Instantly share code, notes, and snippets.

@dsantiago
Last active April 20, 2021 18:26
Show Gist options
  • Save dsantiago/a09448da3a0b244fc92adfc39944823f to your computer and use it in GitHub Desktop.
Save dsantiago/a09448da3a0b244fc92adfc39944823f to your computer and use it in GitHub Desktop.
Convolution Formula

Conv:

o = output
p = padding
k = kernel_size
s = stride
d = dilation

o = [i + 2*p - k - (k-1)*(d-1)]/s + 1

ConvTranspose:

o = (i -1)*s - 2*p + k + output_padding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment