MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / stn_ref

Method stn_ref

tests/integration/test_integration_stn.py:53–61  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

51
52 # Spatial transformer network forward function
53 def stn_ref(self, x):
54 xs = self.localization(x)
55 xs = xs.view(-1, 10 * 3 * 3)
56 theta = self.fc_loc(xs)
57 theta = theta.view(-1, 2, 3)
58
59 grid = F.affine_grid(theta, x.size(), align_corners=False)
60 x = F.grid_sample(x, grid, align_corners=False)
61 return x
62
63 def stn(self, x):
64 xs = self.localization(x)

Callers 1

forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected