Skip to content

Instantly share code, notes, and snippets.

@bdsaglam
Created April 21, 2020 17:52
Show Gist options
  • Select an option

  • Save bdsaglam/f4c5b69166fc1cb1e292255ebff53ba5 to your computer and use it in GitHub Desktop.

Select an option

Save bdsaglam/f4c5b69166fc1cb1e292255ebff53ba5 to your computer and use it in GitHub Desktop.
Calculate output size after convolution
def conv_output_size(in_size, kernel, stride=1, padding=0):
return (in_size - kernel + 2*padding) // stride + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment