Home
last modified time | relevance | path

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

1234

/external/tensorflow/tensorflow/python/distribute/
Dinput_util.py25 num_replicas_in_sync=None, argument
64 num_replicas_in_sync=num_replicas_in_sync,
73 num_replicas_in_sync=num_replicas_in_sync,
Dinput_ops.py26 def auto_shard_dataset(dataset, num_shards, index, num_replicas_in_sync=None): argument
46 if num_replicas_in_sync is None:
47 num_replicas_in_sync = 1
50 num_replicas_in_sync)
53 num_replicas_in_sync)
Dstrategy_common_test.py237 self.assertEqual(fn_eager().numpy(), 1.0 * strategy.num_replicas_in_sync)
238 self.assertEqual(fn_graph().numpy(), 1.0 * strategy.num_replicas_in_sync)
242 self.assertEqual(fn_eager().numpy(), 1.0 * strategy.num_replicas_in_sync)
243 self.assertEqual(fn_graph().numpy(), 1.0 * strategy.num_replicas_in_sync)
256 self.assertEqual(3 * strategy.num_replicas_in_sync, x_s)
336 self.assertEqual(got, 1.0 * strategy.num_replicas_in_sync)
358 values=array_ops.identity([[1.0 * strategy.num_replicas_in_sync]]),
389 expect = (1.0 * strategy.num_replicas_in_sync,
392 [[1.0 * strategy.num_replicas_in_sync]]),
395 2.0 * strategy.num_replicas_in_sync,
[all …]
Dinput_lib_test.py69 num_replicas_in_sync, argument
89 num_replicas_in_sync=len(devices)))
99 num_replicas_in_sync=num_replicas_in_sync,
107 num_replicas_in_sync, argument
116 num_replicas_in_sync=num_replicas_in_sync,
123 num_replicas_in_sync=num_replicas_in_sync,
169 num_replicas_in_sync=None, argument
189 num_replicas_in_sync,
198 num_replicas_in_sync,
526 if distribution.num_replicas_in_sync == 1:
[all …]
Dstrategy_gather_test.py82 value_on_replica for _ in range(strategy.num_replicas_in_sync)
141 1, shape=(sum(range(strategy.num_replicas_in_sync + 1)), 1))
163 1, shape=(1, sum(range(strategy.num_replicas_in_sync + 1))))
173 if strategy.num_replicas_in_sync <= 1:
219 if strategy.num_replicas_in_sync <= 1:
286 all_value = [value_on_replica for _ in range(strategy.num_replicas_in_sync)]
371 1, shape=(sum(range(strategy.num_replicas_in_sync + 1)), 1))
399 1, shape=(1, sum(range(strategy.num_replicas_in_sync + 1))))
428 1, shape=(1, sum(range(strategy.num_replicas_in_sync + 1))))
435 [value_2 for _ in range(strategy.num_replicas_in_sync)], axis=axis)
[all …]
Dtpu_strategy_test.py589 self.assertEqual(sum_val, strategy.num_replicas_in_sync * 10)
735 strategy.num_replicas_in_sync * 2,
736 output_type=dtypes.float32).batch(strategy.num_replicas_in_sync)
747 expected_result = [[x + 2.] for x in range(0, strategy.num_replicas_in_sync)
757 strategy.num_replicas_in_sync, output_type=dtypes.float32).batch(
758 strategy.num_replicas_in_sync, drop_remainder=True)
785 data = range(0, strategy.num_replicas_in_sync)
788 [x + data_sum] for x in range(0, strategy.num_replicas_in_sync)
864 if strategy.num_replicas_in_sync != 2:
905 for replica in range(strategy.num_replicas_in_sync):
[all …]
Dtest_util_test.py49 self.evaluate(results), [1.] * strategy.num_replicas_in_sync)
66 self.evaluate(results['foo']), [1.] * strategy.num_replicas_in_sync)
68 self.evaluate(results['bar'][0]), [0.] * strategy.num_replicas_in_sync)
70 self.evaluate(results['bar'][1]), [1.] * strategy.num_replicas_in_sync)
Dvalues_test.py88 constant_op.constant(1., shape=(distribution.num_replicas_in_sync)))
108 [[1., 2., 3.]] * distribution.num_replicas_in_sync)
129 expected = tuple([v for i in range(distribution.num_replicas_in_sync)]
154 expected = tuple([v * i for i in range(distribution.num_replicas_in_sync)]
176 for i in range(distribution.num_replicas_in_sync):
190 multiple_values = range(distribution.num_replicas_in_sync)
196 expected = range(distribution.num_replicas_in_sync)
211 multiple_values = range(distribution.num_replicas_in_sync)
227 expected = [i**2 for i in range(distribution.num_replicas_in_sync)]
300 multiple_values = range(distribution.num_replicas_in_sync)
Dtpu_strategy.py942 num_replicas_in_sync=self._num_replicas_in_sync)
957 num_replicas_in_sync=self._num_replicas_in_sync))
1005 num_replicas_in_sync=self._num_replicas_in_sync,
1023 num_replicas_in_sync=self._num_replicas_in_sync))
1589 for i in range(strategy.num_replicas_in_sync):
1718 output_shape[axis] *= self.num_replicas_in_sync
1722 value_shape * context.num_replicas_in_sync,
1760 replica_broadcast_shape[axis] = self.num_replicas_in_sync
1764 self.num_replicas_in_sync,
1773 self.replica_id_in_sync_group, self.num_replicas_in_sync)
[all …]
Dtpu_strategy_compilation_test.py73 expected_result_ones = [1 for _ in range(0, strategy.num_replicas_in_sync)]
77 expected_result_twos = [2 for _ in range(0, strategy.num_replicas_in_sync)]
Dinput_lib.py1003 num_replicas_in_sync=None, argument
1059 self._num_replicas_in_sync = num_replicas_in_sync
1120 num_replicas_in_sync): argument
1131 if num_replicas_in_sync is not None:
1135 num_replicas_in_sync)
1147 num_replicas_in_sync)
1159 num_replicas_in_sync)
1162 def _make_rebatch_fn(self, dataset, num_workers, num_replicas_in_sync): argument
1172 if num_replicas_in_sync % num_workers:
1177 num_replicas_in_sync, num_workers))
[all …]
Ddistribute_lib.py496 num_replicas_in_sync=1): argument
507 self._num_replicas_in_sync = num_replicas_in_sync
510 def num_replicas_in_sync(self): member in InputContext
588 num_replicas_in_sync=1): argument
597 self._num_replicas_in_sync = num_replicas_in_sync
600 def num_replicas_in_sync(self): member in ValueContext
612 .format(self.replica_id_in_sync_group, self.num_replicas_in_sync))
833 self.num_replicas_in_sync)
1570 def num_replicas_in_sync(self): member in StrategyBase
3118 def num_replicas_in_sync(self): member in ReplicaContextBase
[all …]
Done_device_strategy_test.py123 dataset = dataset.batch(distribution.num_replicas_in_sync)
144 dataset = dataset.batch(distribution.num_replicas_in_sync)
Dmirrored_strategy_test.py88 self.assertEqual(2, distribution.num_replicas_in_sync)
112 expected = sum(range(distribution.num_replicas_in_sync))
127 expected_result = (4 * distribution.num_replicas_in_sync,
128 2 * distribution.num_replicas_in_sync)
134 num_replicas = distribution.num_replicas_in_sync
265 dataset = dataset.batch(distribution.num_replicas_in_sync)
287 dataset = dataset.batch(distribution.num_replicas_in_sync)
431 self.assertLen(traces, distribution.num_replicas_in_sync)
449 self.assertLen(traces, distribution.num_replicas_in_sync)
1202 self.assertEqual(context.num_gpus() * 2, distribution.num_replicas_in_sync)
[all …]
/external/tensorflow/tensorflow/python/tpu/
Dtpu_outside_compilation_test.py150 constant_op.constant(35., shape=(strategy.num_replicas_in_sync)))
170 constant_op.constant(35., shape=(strategy.num_replicas_in_sync)))
191 constant_op.constant(36., shape=(strategy.num_replicas_in_sync)))
219 constant_op.constant(213., shape=(strategy.num_replicas_in_sync)))
246 constant_op.constant(21., shape=(strategy.num_replicas_in_sync)))
276 output_value, shape=(strategy.num_replicas_in_sync)))
298 constant_op.constant(58., shape=(strategy.num_replicas_in_sync)))
323 constant_op.constant(58., shape=(strategy.num_replicas_in_sync)))
348 constant_op.constant(7., shape=(strategy.num_replicas_in_sync)))
384 output_value, shape=(strategy.num_replicas_in_sync)))
[all …]
/external/tensorflow/tensorflow/python/training/experimental/
Dloss_scale_optimizer_test.py122 loss = lambda: grad_check_fn(var) / strategy.num_replicas_in_sync
137 self.assertEqual(loss_scale % strategy.num_replicas_in_sync, 0)
139 strategy, var, opt, loss_scale / strategy.num_replicas_in_sync)
167 learning_rate / strategy.num_replicas_in_sync)
176 loss_scale.initial_loss_scale % strategy.num_replicas_in_sync, 0)
190 strategy.num_replicas_in_sync))
209 loss = lambda: var * 2.0 / strategy.num_replicas_in_sync
243 loss = lambda: var / strategy.num_replicas_in_sync
/external/tensorflow/tensorflow/python/tpu/tests/
Dtpu_embedding_v2_checkpoint_test.py59 num_rows = strategy.num_replicas_in_sync
122 num_rows = strategy.num_replicas_in_sync
222 strategy.num_replicas_in_sync * 2)
233 strategy.num_replicas_in_sync * 2)
245 np.ones((strategy.num_replicas_in_sync * 2, 4)),
252 np.ones((strategy.num_replicas_in_sync * 2, 4)),
257 num_rows = strategy.num_replicas_in_sync
331 num_rows = strategy.num_replicas_in_sync
Dtpu_embedding_base_test.py228 self.batch_size * strategy.num_replicas_in_sync, drop_remainder=True)
262 self.batch_size * strategy.num_replicas_in_sync, drop_remainder=True)
291 self.batch_size * strategy.num_replicas_in_sync, drop_remainder=True)
303 self.batch_size * strategy.num_replicas_in_sync, drop_remainder=True)
324 self.batch_size * strategy.num_replicas_in_sync, drop_remainder=True)
352 self.batch_size * strategy.num_replicas_in_sync, drop_remainder=True)
356 num_replicas = strategy.num_replicas_in_sync
/external/tensorflow/tensorflow/python/distribute/v1/
Dinput_lib.py35 num_replicas_in_sync=None, argument
43 num_replicas_in_sync=num_replicas_in_sync,
234 num_replicas_in_sync=None, argument
261 num_replicas_in_sync=num_replicas_in_sync,
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.distribute.experimental.-value-context.pbtxt6 name: "num_replicas_in_sync"
15 …argspec: "args=[\'self\', \'replica_id_in_sync_group\', \'num_replicas_in_sync\'], varargs=None, k…
Dtensorflow.distribute.-input-context.pbtxt14 name: "num_replicas_in_sync"
19 …args=[\'self\', \'num_input_pipelines\', \'input_pipeline_id\', \'num_replicas_in_sync\'], varargs…
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.distribute.-input-context.pbtxt14 name: "num_replicas_in_sync"
19 …args=[\'self\', \'num_input_pipelines\', \'input_pipeline_id\', \'num_replicas_in_sync\'], varargs…
/external/tensorflow/tensorflow/python/keras/distribute/
Ddistributed_training_utils_v1.py160 output_losses = output_losses[::strategy.num_replicas_in_sync]
161 metrics = metrics[::strategy.num_replicas_in_sync]
208 all_outputs = all_outputs[::distribution_strategy.num_replicas_in_sync]
507 global_batch_size *= distribution_strategy.num_replicas_in_sync
529 global_batch_size *= distribution_strategy.num_replicas_in_sync
542 if global_batch_size % distribution_strategy.num_replicas_in_sync:
546 global_batch_size, distribution_strategy.num_replicas_in_sync))
547 batch_size = global_batch_size // distribution_strategy.num_replicas_in_sync
1035 num_replicas = strategy.num_replicas_in_sync
/external/tensorflow/tensorflow/python/keras/engine/
Dinput_layer.py118 if batch_size % strategy.num_replicas_in_sync != 0:
121 batch_size, strategy.num_replicas_in_sync))
122 batch_size = batch_size // strategy.num_replicas_in_sync
/external/tensorflow/tensorflow/python/distribute/coordinator/
Dcluster_coordinator_test.py1100 all_results = [(2, 0)] * self.strategy.num_replicas_in_sync
1102 for i in range(self.strategy.num_replicas_in_sync):
1135 expected_result = (4. * self.strategy.num_replicas_in_sync,
1136 2. * self.strategy.num_replicas_in_sync)
1172 expected_result = (4. * self.strategy.num_replicas_in_sync,
1173 2. * self.strategy.num_replicas_in_sync)
1225 for i in range(self.strategy.num_replicas_in_sync):
1326 num_or_size_splits=self.strategy.num_replicas_in_sync,
1353 num_or_size_splits=self.strategy.num_replicas_in_sync,
1380 for i in range(self.strategy.num_replicas_in_sync):
[all …]

1234