MCPcopy Create free account
hub / github.com/pytorch/examples / M

Class M

fx/inline_function.py:31–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30# Sample module
31class M(torch.nn.Module):
32 def __init__(self):
33 super().__init__()
34 self.relu = torch.nn.ReLU()
35
36 def forward(self, x):
37 return self.relu(x) + 1.0
38
39# Symbolically trace an instance of `M`. After tracing, `self.relu` is
40# represented as a `call_module` Node. The full operation in the

Callers 1

inline_function.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected