MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / __init__

Method __init__

tensorflow/python/distribute/hvd_strategy.py:296–311  ·  view source on GitHub ↗

r'''Construct a server specification.

(self)

Source from the content-addressed store, hash-verified

294 for t in worker_indices for g in range(self._num_gpus)]
295
296 def __init__(self):
297 r'''Construct a server specification.
298 '''
299 self._task_type = 'localhost'
300 self._rank = hvd.local_rank()
301 self._world_size = hvd.size()
302 self._task_id = 0
303 self._cluster_spec = None
304 self._is_chief = True
305 visible_devices = os.getenv('CUDA_VISIBLE_DEVICES', '')
306 if visible_devices:
307 self._num_gpus = len(visible_devices.split(','))
308 else:
309 self._num_gpus = 1
310 self._update()
311 self._saving_listener_registry = {}
312
313
314class GraphRewriting(object): # pylint: disable=useless-object-inheritance

Callers 5

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 3

_updateMethod · 0.95
sizeMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected