Home
last modified time | relevance | path

Searched refs:ds_context (Results 1 – 25 of 25) sorted by relevance

/external/tensorflow/tensorflow/python/distribute/
Ddistribute_lib_test.py27 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
127 t.assertIs(ds_context._get_default_replica_context(),
128 ds_context.get_replica_context())
129 t.assertIs(None, ds_context.get_cross_replica_context())
130 t.assertFalse(ds_context.in_cross_replica_context())
131 t.assertIs(ds_context._get_default_strategy(), ds_context.get_strategy())
132 t.assertFalse(ds_context.has_strategy())
161 replica_context = ds_context.get_replica_context()
163 self.assertIs(None, ds_context.get_cross_replica_context())
164 self.assertFalse(ds_context.in_cross_replica_context())
[all …]
Dvalues_util.py22 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
186 with ds_context.enter_or_assert_strategy(var.distribute_strategy):
187 if ds_context.in_cross_replica_context():
198 with ds_context.enter_or_assert_strategy(var.distribute_strategy):
199 if ds_context.in_cross_replica_context():
211 with ds_context.enter_or_assert_strategy(var.distribute_strategy):
212 if ds_context.in_cross_replica_context():
290 replica_context = ds_context.get_replica_context()
316 replica_context = ds_context.get_replica_context()
Dvalues.py26 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
72 return ds_context.get_replica_context().merge_call(
394 replica_context = ds_context.get_replica_context()
504 with ds_context.enter_or_assert_strategy(self._distribute_strategy):
670 if ds_context.in_cross_replica_context():
713 with ds_context.enter_or_assert_strategy(self._distribute_strategy):
919 with ds_context.enter_or_assert_strategy(self.distribute_strategy):
920 if ds_context.in_cross_replica_context():
939 with ds_context.enter_or_assert_strategy(self._distribute_strategy):
1156 with ds_context.enter_or_assert_strategy(self._distribute_strategy):
[all …]
Dstrategy_gather_test.py26 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
283 ctx = ds_context.get_replica_context()
355 ctx = ds_context.get_replica_context()
382 ctx = ds_context.get_replica_context()
410 ctx = ds_context.get_replica_context()
449 ctx = ds_context.get_replica_context()
468 ctx = ds_context.get_replica_context()
504 ctx = ds_context.get_replica_context()
532 ctx = ds_context.get_replica_context()
561 ctx = ds_context.get_replica_context()
[all …]
Dmirrored_variable_test.py24 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
45 replica_id = ds_context.get_replica_context().replica_id_in_sync_group
106 ds_context.get_replica_context().merge_call(lambda _: _)
126 ds_context.get_replica_context().merge_call(lambda _: _)
143 ds_context.get_replica_context().merge_call(lambda _: _)
154 ds_context.get_replica_context().merge_call(lambda _: _)
167 ds_context.get_replica_context().merge_call(lambda _: _)
183 ds_context.get_replica_context().merge_call(lambda _: _)
201 ds_context.get_replica_context().merge_call(lambda _: _)
217 ds_context.get_replica_context().merge_call(lambda _: _)
[all …]
Dps_values.py25 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
65 with ds_context.enter_or_assert_strategy(self._distribute_strategy):
88 with ds_context.enter_or_assert_strategy(self._distribute_strategy):
90 if ds_context.in_cross_replica_context():
100 replica_context = ds_context.get_replica_context()
Dmirrored_strategy_test.py35 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
349 ds_context.get_replica_context().merge_call(lambda _: _)
400 return ds_context.get_replica_context().replica_id_in_sync_group
414 return ds_context.get_replica_context().replica_id_in_sync_group
437 return ds_context.get_replica_context().merge_call(merge_fn, args=(i,))
456 return ds_context.get_replica_context().merge_call(merge_fn, args=(t,))
471 ds_context.get_replica_context().merge_call(merge_fn)
514 ds_context.get_replica_context().merge_call(lambda _: _)
532 ds_context.get_replica_context().merge_call(lambda _: _)
558 c = ds_context.get_replica_context().merge_call(in_cross_replica)
[all …]
Dstrategy_test_lib.py33 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
81 ds_context.get_replica_context().merge_call(_raise_exception_fn)
95 ds_context.get_replica_context().merge_call(_call_raises_fn)
110 ds_context.get_replica_context().merge_call(_call_merge_raises_fn)
258 replica_id = ds_context.get_replica_context().replica_id_in_sync_group
292 ds_context.get_replica_context().replica_id_in_sync_group)
614 lambda: ds_context.get_replica_context().replica_id_in_sync_group + 1,
801 ctx = ds_context.get_replica_context()
806 ctx = ds_context.get_replica_context()
Dvars_test.py27 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
336 ctx = ds_context.get_replica_context()
464 ctx = ds_context.get_replica_context()
488 ctx = ds_context.get_replica_context()
509 ctx = ds_context.get_replica_context()
530 ctx = ds_context.get_replica_context()
922 ctx = ds_context.get_replica_context()
958 ctx = ds_context.get_replica_context()
991 ctx = ds_context.get_replica_context()
1049 ctx = ds_context.get_replica_context()
[all …]
Dstrategy_common_test.py25 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
58 return ds_context.get_replica_context().replica_id_in_sync_group
Dcollective_all_reduce_strategy.py34 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
789 replica_context = ds_context.get_replica_context()
Dparameter_server_strategy_test.py32 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
67 replica_id = ds_context.get_replica_context().replica_id_in_sync_group
/external/tensorflow/tensorflow/python/keras/distribute/
Ddistributed_training_utils.py21 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
52 if ds_context.has_strategy():
53 strategy = ds_context.get_strategy()
57 if ((not is_tpu) and strategy and ds_context.in_cross_replica_context()):
Dmirrored_variable_test.py25 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
85 ds_context.get_replica_context().merge_call(lambda _: _)
Dkeras_optimizer_v2_test.py25 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
138 replica_id = ds_context.get_replica_context().replica_id_in_sync_group
/external/tensorflow/tensorflow/python/ops/
Dstateful_random_ops.py27 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
236 rctx = ds_context.get_replica_context()
452 if ds_context.has_strategy():
453 self._distribution_strategy = ds_context.get_strategy()
464 if ds_context.has_strategy():
465 strat_name = type(ds_context.get_strategy()).__name__
609 with ds_context.enter_or_assert_strategy(self._distribution_strategy):
610 if ds_context.in_cross_replica_context():
615 return ds_context.get_strategy().extended.update(
622 with ds_context.enter_or_assert_strategy(self._distribution_strategy):
/external/tensorflow/tensorflow/python/kernel_tests/
Dtemplate_mirrored_strategy_test.py20 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
43 ds_context.get_replica_context().merge_call(lambda _: ())
/external/tensorflow/tensorflow/python/keras/mixed_precision/
Dautocast_variable_test.py28 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
151 if ds_context.has_strategy():
174 if not ds_context.has_strategy():
181 if not ds_context.has_strategy():
193 if not ds_context.has_strategy():
308 if not ds_context.has_strategy() or context.executing_eagerly():
/external/tensorflow/tensorflow/python/keras/engine/
Dtraining.py33 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
305 if ds_context.has_strategy():
306 self._distribution_strategy = ds_context.get_strategy()
727 return self._distribution_strategy or ds_context.get_strategy()
2580 if self.built and ds_context.has_strategy():
2581 strategy = ds_context.get_strategy()
Dcompile_utils.py24 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
210 loss_metric_value *= ds_context.get_strategy().num_replicas_in_sync
Dbase_layer_v1.py33 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
1183 if (ds_context.has_strategy() and
1184 ds_context.in_cross_replica_context() and
1763 strategy = ds_context.get_strategy()
Ddata_adapter.py35 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
1170 distribution_strategy=ds_context.get_strategy(),
1173 strategy = ds_context.get_strategy()
Dbase_layer.py38 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
2361 strategy = ds_context.get_strategy()
/external/tensorflow/tensorflow/python/saved_model/
Dload.py26 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
102 if (ds_context.get_replica_context() is not None or
/external/tensorflow/tensorflow/python/keras/layers/
Drecurrent.py27 from tensorflow.python.distribute import distribution_strategy_context as ds_context unknown
443 if ds_context.has_strategy():