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

Method __init__

advanced_source/rpc_ddp_tutorial/main.py:27–31  ·  view source on GitHub ↗
(self, remote_emb_module, device)

Source from the content-addressed store, hash-verified

25 """
26
27 def __init__(self, remote_emb_module, device):
28 super(HybridModel, self).__init__()
29 self.remote_emb_module = remote_emb_module
30 self.fc = DDP(torch.nn.Linear(16, 8).cuda(device), device_ids=[device])
31 self.device = device
32
33 def forward(self, indices, offsets):
34 emb_lookup = self.remote_emb_module.forward(indices, offsets)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected