Skip to content

Instantly share code, notes, and snippets.

@rileymjohnson
Created June 11, 2019 21:54
Show Gist options
  • Save rileymjohnson/a9765e581db8a03e8ccbeccf0186c5cb to your computer and use it in GitHub Desktop.
Save rileymjohnson/a9765e581db8a03e8ccbeccf0186c5cb to your computer and use it in GitHub Desktop.
import torch
layer = torch.nn.Conv2d(128, 256, kernel_size=(2, 2), stride=(3, 3), padding=(1, 1))
for i in range(5, 21):
z = torch.zeros(1, 128, i, i)
z = layer(z)
print(z.shape)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment