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

Class NoisyParametrization

intermediate_source/parametrizations.py:198–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196# Parametrizations come with an inbuilt caching system via the context manager
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 1

Calls

no outgoing calls

Tested by

no test coverage detected