MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / __init__

Method __init__

tensorpack/train/trainers.py:288–300  ·  view source on GitHub ↗

Args: gpus (list[int]): list of GPU ids. server (tf.train.Server): the server with ps and workers.

(self, gpus, server)

Source from the content-addressed store, hash-verified

286
287 @map_arg(gpus=_int_to_range)
288 def __init__(self, gpus, server):
289 """
290 Args:
291 gpus (list[int]): list of GPU ids.
292 server (tf.train.Server): the server with ps and workers.
293 """
294 super(DistributedTrainerReplicated, self).__init__(gpus, server)
295 assert self.job_name in ['ps', 'worker'], self.job_name
296 if self.job_name == 'ps':
297 self.join()
298
299 self._builder = DistributedReplicatedBuilder(gpus, server)
300 self.is_chief = self._builder.is_chief
301
302 def _setup_input(self, input_signature, input):
303 with override_to_local_variable():

Callers

nothing calls this directly

Calls 3

joinMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected