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

Method forward

intermediate_source/parametrizations.py:69–71  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

67 self.weight = nn.Parameter(torch.rand(n_features, n_features))
68
69 def forward(self, x):
70 A = symmetric(self.weight)
71 return x @ A
72
73###############################################################################
74# The layer can be then used as a regular linear layer

Callers

nothing calls this directly

Calls 1

symmetricFunction · 0.85

Tested by

no test coverage detected