MCPcopy Create free account
hub / github.com/pytorch/tutorials / forward

Method forward

intermediate_source/parametrizations.py:228–230  ·  view source on GitHub ↗
(self, X)

Source from the content-addressed store, hash-verified

226 self.register_buffer("Id", torch.eye(n))
227
228 def forward(self, X):
229 # (I + X)(I - X)^{-1}
230 return torch.linalg.solve(self.Id - X, self.Id + X)
231
232layer = nn.Linear(3, 3)
233parametrize.register_parametrization(layer, "weight", Skew())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected