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

Method __init__

distributed/rpc/batch/parameter_server.py:72–77  ·  view source on GitHub ↗
(self, ps_rref)

Source from the content-addressed store, hash-verified

70class Trainer(object):
71
72 def __init__(self, ps_rref):
73 self.ps_rref = ps_rref
74 self.loss_fn = nn.MSELoss()
75 self.one_hot_indices = torch.LongTensor(batch_size) \
76 .random_(0, num_classes) \
77 .view(batch_size, 1)
78
79 def get_next_batch(self):
80 for _ in range(num_batches):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected