Skip to content

Instantly share code, notes, and snippets.

@jcjohnson
Created October 6, 2016 04:45
Show Gist options
  • Select an option

  • Save jcjohnson/dea431055e71013f6dc259dbc90ce3ff to your computer and use it in GitHub Desktop.

Select an option

Save jcjohnson/dea431055e71013f6dc259dbc90ce3ff to your computer and use it in GitHub Desktop.
require 'nn'
print(nn.SpatialReflectionPadding)
local m = nn.SpatialReflectionPadding(2, 2, 2, 2)
print(m)
local x = torch.randn(2, 3, 4, 5)
local y = m:forward(x)
print(#y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment