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

Class Skew

intermediate_source/parametrizations.py:119–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117# We use a similar parametrization, copying the upper-triangular part with signs
118# reversed into the lower-triangular part
119class Skew(nn.Module):
120 def forward(self, X):
121 A = X.triu(1)
122 return A - A.transpose(-1, -2)
123
124
125cnn = nn.Conv2d(in_channels=5, out_channels=8, kernel_size=3)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected