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

Function run_once

recipes_source/debug_mode_tutorial.py:58–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56from torch.utils._debug_mode import DebugMode
57
58def run_once():
59 x = torch.randn(8, 8)
60 y = torch.randn(8, 8)
61 return torch.mm(torch.relu(x), y)
62
63with DebugMode() as debug_mode:
64 out = run_once()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected