Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/examples
/ forward
Method
forward
distributed/ddp/example.py:27–28 ·
view source on GitHub ↗
(self, x)
Source
from the content-addressed store, hash-verified
25
self.net2 = nn.Linear(10, 5)
26
27
def
forward(self, x):
28
return
self.net2(self.relu(self.net1(x)))
29
30
31
def
demo_basic(rank):
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected