Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/examples
/ Foo
Class
Foo
fx/profiling_tracer.py:16–19 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
14
15
# Setup: a module with `record_function`
16
class
Foo(torch.nn.Module):
17
def
forward(self, x):
18
with
torch.profiler.record_function(
'foo'
):
19
return
torch.relu(x)
20
21
f = Foo()
22
x = torch.randn(5, 3, 2)
Callers
1
profiling_tracer.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected