MCPcopy Create free account
hub / github.com/tensorflow/models / init_async

Method init_async

official/core/base_trainer.py:39–48  ·  view source on GitHub ↗

Initializes the Async Trainer base class.

(self)

Source from the content-addressed store, hash-verified

37 """Trainer class for both sync and async Strategy."""
38
39 def init_async(self):
40 """Initializes the Async Trainer base class."""
41 assert isinstance(self._strategy, tf.distribute.Strategy)
42 self._is_async = isinstance(
43 self._strategy, tf.distribute.experimental.ParameterServerStrategy)
44 self._coordinator = None
45 if self._is_async:
46 self._coordinator = (
47 tf.distribute.experimental.coordinator.ClusterCoordinator(
48 self._strategy))
49
50 def coordinator_for_async(
51 self,

Callers 3

__init__Method · 0.80
__init__Method · 0.80

Calls

no outgoing calls

Tested by 2

__init__Method · 0.64