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

Method forward

torch/_export/db/examples/class_method.py:22–24  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

20 self.linear = torch.nn.Linear(4, 2)
21
22 def forward(self, x):
23 x = self.linear(x)
24 return self.method(x) * self.__class__.method(x) * type(self).method(x)

Callers

nothing calls this directly

Calls 2

methodMethod · 0.95
linearMethod · 0.45

Tested by

no test coverage detected