/external/tensorflow/tensorflow/python/distribute/ |
D | input_util.py | 25 num_replicas_in_sync=None, argument 64 num_replicas_in_sync=num_replicas_in_sync, 73 num_replicas_in_sync=num_replicas_in_sync,
|
D | input_ops.py | 26 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)
|
D | strategy_common_test.py | 237 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 …]
|
D | input_lib_test.py | 69 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 …]
|
D | strategy_gather_test.py | 82 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 …]
|
D | tpu_strategy_test.py | 589 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 …]
|
D | test_util_test.py | 49 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)
|
D | values_test.py | 88 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)
|
D | tpu_strategy.py | 942 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 …]
|
D | tpu_strategy_compilation_test.py | 73 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)]
|
D | input_lib.py | 1003 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 …]
|
D | distribute_lib.py | 496 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 …]
|
D | one_device_strategy_test.py | 123 dataset = dataset.batch(distribution.num_replicas_in_sync) 144 dataset = dataset.batch(distribution.num_replicas_in_sync)
|
D | mirrored_strategy_test.py | 88 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/ |
D | tpu_outside_compilation_test.py | 150 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/ |
D | loss_scale_optimizer_test.py | 122 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/ |
D | tpu_embedding_v2_checkpoint_test.py | 59 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
|
D | tpu_embedding_base_test.py | 228 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/ |
D | input_lib.py | 35 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/ |
D | tensorflow.distribute.experimental.-value-context.pbtxt | 6 name: "num_replicas_in_sync" 15 …argspec: "args=[\'self\', \'replica_id_in_sync_group\', \'num_replicas_in_sync\'], varargs=None, k…
|
D | tensorflow.distribute.-input-context.pbtxt | 14 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/ |
D | tensorflow.distribute.-input-context.pbtxt | 14 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/ |
D | distributed_training_utils_v1.py | 160 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/ |
D | input_layer.py | 118 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/ |
D | cluster_coordinator_test.py | 1100 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 …]
|