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

Method forward

test/dynamo/test_export.py:137–141  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

135 self.a = a
136
137 def forward(self, x):
138 if self.a == Animal.COW.value:
139 return x * x
140 else:
141 raise ValueError("bad")
142
143 module = MyModule("moo")
144 input = (torch.ones(4, 3),)

Callers

nothing calls this directly

Calls 7

helper_fnMethod · 0.95
blockMethod · 0.80
featuresMethod · 0.80
sinMethod · 0.45
linearMethod · 0.45
tensorMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected