Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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_fn
Method · 0.95
block
Method · 0.80
features
Method · 0.80
sin
Method · 0.45
linear
Method · 0.45
tensor
Method · 0.45
append
Method · 0.45
Tested by
no test coverage detected