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

Method forward

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

Source from the content-addressed store, hash-verified

197# ``parametrize.cached()``
198class NoisyParametrization(nn.Module):
199 def forward(self, X):
200 print("Computing the Parametrization")
201 return X
202
203layer = nn.Linear(4, 4)
204parametrize.register_parametrization(layer, "weight", NoisyParametrization())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected