Home
last modified time | relevance | path

Searched refs:global_batch_size (Results 1 – 17 of 17) sorted by relevance

/external/tensorflow/tensorflow/python/ops/
Dnn_loss_scaling_utilities_test.py40 loss = nn_impl.compute_average_loss(per_example_loss, global_batch_size=10)
47 nn_impl.compute_average_loss(per_example_loss, global_batch_size=[10])
53 nn_impl.compute_average_loss(per_example_loss, global_batch_size=10.0)
59 nn_impl.compute_average_loss(per_example_loss, global_batch_size=-1)
65 nn_impl.compute_average_loss(per_example_loss, global_batch_size=0)
125 global_batch_size=10)
Dnn_impl.py413 global_batch_size=None): argument
453 if global_batch_size is None:
461 global_batch_size = per_replica_batch_size * num_replicas
464 global_batch_size, message="global_batch_size must be scalar.")
466 global_batch_size,
469 global_batch_size, message="global_batch_size must be positive.")
471 global_batch_size = math_ops.cast(global_batch_size, input_dtype)
472 return math_ops.reduce_sum(per_example_loss) / global_batch_size
/external/tensorflow/tensorflow/python/keras/distribute/
Ddistributed_training_utils_v1.py501 global_batch_size = min(num_samples, 32)
505 global_batch_size = batch_size
507 global_batch_size *= distribution_strategy.num_replicas_in_sync
509 steps = np.ceil(num_samples / global_batch_size).astype(int)
511 if num_samples % global_batch_size:
513 'batch size %s.' % (num_samples, global_batch_size))
514 steps = num_samples // global_batch_size
523 global_batch_size = num_samples // steps
527 global_batch_size = batch_size
529 global_batch_size *= distribution_strategy.num_replicas_in_sync
[all …]
/external/tensorflow/tensorflow/python/data/experimental/kernel_tests/
Drebatch_dataset_test.py38 def _test(self, global_batch_size, num_workers, num_replicas_per_worker, argument
45 global_batch_size += constant_op.constant(0, dtypes.int64)
51 distribute.batch_sizes_for_worker(global_batch_size, num_workers,
57 self.assertAllEqual(np.sum(batch_sizes), global_batch_size)
68 global_batch_size,
81 global_batch_size = 8
85 batch_sizes = distribute.batch_sizes_for_worker(global_batch_size,
91 self._test(global_batch_size, num_workers, num_replicas_per_worker,
99 global_batch_size = 4
105 distribute.batch_sizes_for_worker(global_batch_size, num_workers,
[all …]
/external/tensorflow/tensorflow/python/data/experimental/ops/
Ddistribute.py365 def batch_sizes_for_worker(global_batch_size, num_workers, argument
454 const_value = tensor_util.constant_value(global_batch_size)
457 global_batch_size = const_value
463 floor = global_batch_size // num_subbatches
464 num_ceil = global_batch_size - (num_subbatches * floor)
/external/tensorflow/tensorflow/python/distribute/
Dstrategy_common_test.py626 global_batch_size = 10
627 batch_size = input_context.get_per_replica_batch_size(global_batch_size)
647 global_batch_size = 8
649 global_batch_size, drop_remainder=False)
670 global_batch_size = 8
671 batch_size = input_context.get_per_replica_batch_size(global_batch_size)
Ddistributed_table_test.py96 global_batch_size = 24
97 batch_size = input_context.get_per_replica_batch_size(global_batch_size)
Dinput_lib_test.py1106 global_batch_size = 8
1110 batch_size = ctx.get_per_replica_batch_size(global_batch_size)
1226 global_batch_size = 8
1230 batch_size = ctx.get_per_replica_batch_size(global_batch_size)
1269 global_batch_size = 8
1273 batch_size = ctx.get_per_replica_batch_size(global_batch_size)
Ddistribute_lib.py524 def get_per_replica_batch_size(self, global_batch_size): argument
538 if global_batch_size % self._num_replicas_in_sync != 0:
541 (global_batch_size, self._num_replicas_in_sync))
542 return global_batch_size // self._num_replicas_in_sync
Dcustom_training_loop_input_test.py162 global_batch_size = 2
165 8, output_type=dtypes.int32).batch(global_batch_size)
Dtpu_strategy_test.py288 global_batch_size = 2
289 batch_size = input_context.get_per_replica_batch_size(global_batch_size)
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.distribute.-input-context.pbtxt23 argspec: "args=[\'self\', \'global_batch_size\'], varargs=None, keywords=None, defaults=None"
Dtensorflow.nn.pbtxt77 …argspec: "args=[\'per_example_loss\', \'sample_weight\', \'global_batch_size\'], varargs=None, key…
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.distribute.-input-context.pbtxt23 argspec: "args=[\'self\', \'global_batch_size\'], varargs=None, keywords=None, defaults=None"
Dtensorflow.nn.pbtxt77 …argspec: "args=[\'per_example_loss\', \'sample_weight\', \'global_batch_size\'], varargs=None, key…
/external/tensorflow/tensorflow/python/tpu/tests/
Dtpu_embedding_base_test.py425 global_batch_size = self.batch_size * self.data_batch_size * num_replicas
427 global_batch_size = self.batch_size * num_replicas
430 global_batch_size)
432 global_batch_size)
434 global_batch_size)
/external/tensorflow/tensorflow/dtensor/python/
Dinput_util.py342 global_batch_size: int,
437 expected_batch_size = global_batch_size // num_global_replicas