/external/tensorflow/tensorflow/python/tpu/ |
D | tpu_estimator_signals_test.py | 36 batch_size = params['batch_size'] 42 dataset = dataset.batch(batch_size) 52 batch_size = params['batch_size'] 58 dataset = dataset.batch(batch_size) 67 batch_size = 2 69 params = {'batch_size': batch_size} 81 self.assertAllEqual(a[:batch_size], result['a']) 82 self.assertAllEqual(b[:batch_size], result['b']) 86 self.assertAllEqual(a[batch_size:num_samples], result['a']) 87 self.assertAllEqual(b[batch_size:num_samples], result['b']) [all …]
|
/external/tensorflow/tensorflow/contrib/slim/python/slim/nets/ |
D | inception_v3_test.py | 39 batch_size = 5 43 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 47 [batch_size, num_classes]) 50 [batch_size, num_classes]) 53 batch_size = 5 56 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 60 [batch_size, 8, 8, 2048]) 70 batch_size = 5 81 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 89 batch_size = 5 [all …]
|
D | inception_v2_test.py | 39 batch_size = 5 43 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 47 [batch_size, num_classes]) 50 [batch_size, num_classes]) 53 batch_size = 5 56 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 60 [batch_size, 7, 7, 1024]) 69 batch_size = 5 78 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 86 batch_size = 5 [all …]
|
D | vgg_test.py | 34 batch_size = 5 38 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 42 [batch_size, num_classes]) 45 batch_size = 1 49 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 53 [batch_size, 2, 2, num_classes]) 56 batch_size = 5 61 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 73 batch_size = 5 77 inputs = random_ops.random_uniform((batch_size, height, width, 3)) [all …]
|
D | inception_v1_test.py | 39 batch_size = 5 43 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 47 [batch_size, num_classes]) 50 [batch_size, num_classes]) 53 batch_size = 5 56 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 60 [batch_size, 7, 7, 1024]) 70 batch_size = 5 80 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 88 batch_size = 5 [all …]
|
D | overfeat_test.py | 33 batch_size = 5 37 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 41 [batch_size, num_classes]) 44 batch_size = 1 48 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 52 [batch_size, 2, 2, num_classes]) 55 batch_size = 5 59 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 70 batch_size = 5 74 inputs = random_ops.random_uniform((batch_size, height, width, 3)) [all …]
|
D | alexnet_test.py | 33 batch_size = 5 37 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 41 [batch_size, num_classes]) 44 batch_size = 1 48 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 52 [batch_size, 4, 7, num_classes]) 55 batch_size = 5 59 inputs = random_ops.random_uniform((batch_size, height, width, 3)) 70 batch_size = 5 74 inputs = random_ops.random_uniform((batch_size, height, width, 3)) [all …]
|
/external/tensorflow/tensorflow/lite/kernels/internal/ |
D | kernel_utils.cc | 24 int input_size, int num_units, int batch_size, in RnnBatchStep() argument 32 batch_size, output_batch_leading_dim, activation, in RnnBatchStep() 41 int batch_size, int output_batch_leading_dim, in RnnBatchStep() argument 48 tensor_utils::VectorBatchVectorAssign(bias_ptr, num_units, batch_size, in RnnBatchStep() 53 input_weights_ptr, num_units, input_size, input_ptr_batch, batch_size, in RnnBatchStep() 60 batch_size, output_ptr_batch, /*result_stride=*/1); in RnnBatchStep() 66 batch_size, output_ptr_batch, /*result_stride=*/1); in RnnBatchStep() 70 output_ptr_batch, num_units * batch_size, activation, output_ptr_batch); in RnnBatchStep() 71 tensor_utils::CopyVector(output_ptr_batch, num_units * batch_size, in RnnBatchStep() 75 for (int k = 0; k < batch_size; k++) { in RnnBatchStep() [all …]
|
/external/tensorflow/tensorflow/python/data/experimental/kernel_tests/ |
D | make_batched_features_dataset_test.py | 41 for batch_size in [1, 2]: 49 batch_size=batch_size)) 51 batch_size, 0, num_epochs=num_epochs, label_key_provided=True) 61 batch_size=batch_size)) 63 batch_size, 1, num_epochs=num_epochs, label_key_provided=True) 73 batch_size=batch_size)) 75 batch_size, num_epochs=num_epochs, label_key_provided=True) 83 batch_size=batch_size)) 84 self.verify_records(batch_size, num_epochs=num_epochs) 109 for batch_size in [1, 2]: [all …]
|
D | make_tf_record_dataset_test.py | 34 def _read_test(self, batch_size, num_epochs, file_index=None, argument 50 batch_size=batch_size, 57 batch_size, 67 for batch_size in [1, 2]: 70 self._read_test(batch_size, num_epochs, 0) 73 self._read_test(batch_size, num_epochs, 1) 76 self._read_test(batch_size, num_epochs) 79 self._read_test(batch_size, num_epochs, num_parallel_reads=8) 82 for batch_size in [1, 2, 10]: 85 self._read_test(batch_size, num_epochs, 0, drop_final_batch=True) [all …]
|
D | make_csv_dataset_test.py | 40 def _make_csv_dataset(self, filenames, batch_size, num_epochs=1, **kwargs): argument 42 filenames, batch_size=batch_size, num_epochs=num_epochs, **kwargs) 64 def _next_expected_batch(self, expected_output, expected_keys, batch_size, argument 71 if len(features[expected_keys[0]]) == batch_size: 80 batch_size, argument 91 batch_size, 112 batch_size=1, argument 122 batch_size=batch_size, 126 self._verify_output(dataset, batch_size, num_epochs, label_name, 153 batch_size=1, [all …]
|
/external/tensorflow/tensorflow/contrib/seq2seq/python/kernel_tests/ |
D | basic_decoder_test.py | 44 batch_size = 5 51 inputs = np.random.randn(batch_size, max_time, 66 dtype=dtypes.float32, batch_size=batch_size), 82 batch_size_t = my_decoder.batch_size 88 self.assertEqual((batch_size, expected_output_depth), 90 self.assertEqual((batch_size,), step_outputs[1].get_shape()) 91 self.assertEqual((batch_size, cell_depth), first_state[0].get_shape()) 92 self.assertEqual((batch_size, cell_depth), first_state[1].get_shape()) 93 self.assertEqual((batch_size, cell_depth), step_state[0].get_shape()) 94 self.assertEqual((batch_size, cell_depth), step_state[1].get_shape()) [all …]
|
D | basic_decoder_v2_test.py | 47 batch_size = 5 54 inputs = np.random.randn(batch_size, max_time, 66 batch_size=batch_size) 90 batch_size_t = my_decoder.batch_size 96 self.assertEqual((batch_size, expected_output_depth), 98 self.assertEqual((batch_size,), step_outputs[1].get_shape()) 99 self.assertEqual((batch_size, cell_depth), first_state[0].get_shape()) 100 self.assertEqual((batch_size, cell_depth), first_state[1].get_shape()) 101 self.assertEqual((batch_size, cell_depth), step_state[0].get_shape()) 102 self.assertEqual((batch_size, cell_depth), step_state[1].get_shape()) [all …]
|
D | beam_search_decoder_test.py | 99 batch_size = array_ops.shape(array)[1] 110 array, [max_time, batch_size * beam_width]) 112 expected_array, [max_time, batch_size * beam_width]) 184 batch_size, beam_width, is_valid=True): argument 189 batch_size = array_ops.constant(batch_size) 194 beam_search_decoder._check_batch_beam(t, batch_size, beam_width) 198 t, batch_size, beam_width) 258 self.batch_size = 2 266 dummy_cell_state = array_ops.zeros([self.batch_size, self.beam_width]) 270 array_ops.ones([self.batch_size, self.beam_width])), [all …]
|
/external/tensorflow/tensorflow/python/training/ |
D | input_test.py | 466 batch_size = 10 470 counter = examples.count_up_to(num_batches * batch_size) 484 batch_size=batch_size) 488 [counter, sparse_counter, "string"], batch_size=batch_size) 497 np.arange(i * batch_size, (i + 1) * batch_size)) 501 np.arange(2 * batch_size) // 2, # 0, 0, 1, 1, ... 502 [0, 1] * batch_size)).T) 504 expected = np.arange(2 * i * batch_size, 2 * (i + 1) * batch_size) // 2 505 expected *= ([1, -1] * batch_size) # mult by [1, -1, 1, -1, ...] 507 self.assertAllEqual(results[1].dense_shape, [batch_size, 2]) [all …]
|
/external/tensorflow/tensorflow/contrib/slim/python/slim/data/ |
D | prefetch_queue_test.py | 41 batch_size = 10 48 counter = examples.count_up_to(num_batches * batch_size) 55 [counter, image, label], batch_size=batch_size, num_threads=1) 65 np.arange(i * batch_size, (i + 1) * batch_size)) 67 (batch_size, image_size, image_size, 3)) 68 self.assertEquals(results[2].shape, (batch_size, 1)) 78 batch_size = 10 85 counter = examples.count_up_to(num_batches * batch_size) 92 [counter, image, label], batch_size=batch_size, num_threads=4) 104 (batch_size, image_size, image_size, 3)) [all …]
|
/external/tensorflow/tensorflow/contrib/eager/python/examples/resnet50/ |
D | resnet50_graph_test.py | 35 def image_shape(batch_size): argument 37 return [batch_size, 3, 224, 224] 38 return [batch_size, 224, 224, 3] 41 def random_batch(batch_size): argument 42 images = np.random.rand(*image_shape(batch_size)).astype(np.float32) 45 low=0, high=num_classes, size=[batch_size]).astype(np.int32) 46 one_hot = np.zeros((batch_size, num_classes)).astype(np.float32) 47 one_hot[np.arange(batch_size), labels] = 1. 56 batch_size = 8 66 np_images, _ = random_batch(batch_size) [all …]
|
/external/tensorflow/tensorflow/core/util/ctc/ |
D | ctc_beam_search_test.cc | 104 const int batch_size = 1; in TEST() local 119 int sequence_lengths[batch_size] = {timesteps}; in TEST() 120 float input_data_mat[timesteps][batch_size][num_classes] = { in TEST() 129 for (int b = 0; b < batch_size; ++b) { in TEST() 151 Eigen::Map<const Eigen::ArrayXi> seq_len(&sequence_lengths[0], batch_size); in TEST() 155 inputs.emplace_back(&input_data_mat[t][0][0], batch_size, num_classes); in TEST() 161 output.resize(batch_size); in TEST() 163 float score[batch_size][top_paths] = {{0.0}}; in TEST() 164 Eigen::Map<Eigen::MatrixXf> scores(&score[0][0], batch_size, top_paths); in TEST() 174 output.resize(batch_size); in TEST() [all …]
|
/external/tensorflow/tensorflow/contrib/eager/python/examples/densenet/ |
D | densenet_graph_test.py | 32 def image_shape(batch_size): argument 34 return [batch_size, 3, 224, 224] 35 return [batch_size, 224, 224, 3] 38 def random_batch(batch_size): argument 39 images = np.random.rand(*image_shape(batch_size)).astype(np.float32) 42 low=0, high=num_classes, size=[batch_size]).astype(np.int32) 43 one_hot = np.zeros((batch_size, num_classes)).astype(np.float32) 44 one_hot[np.arange(batch_size), labels] = 1. 56 batch_size = 1 70 np_images, _ = random_batch(batch_size) [all …]
|
/external/tensorflow/tensorflow/contrib/rnn/python/kernel_tests/ |
D | gru_ops_test.py | 45 batch_size = 4 57 feed[x] = np.random.randn(num_steps, batch_size, input_size) 62 batch_size = 4 70 x = array_ops.zeros([batch_size, input_size]) 71 h = array_ops.zeros([batch_size, cell_size]) 74 x_value = np.random.rand(batch_size, input_size) 75 h_value = np.random.rand(batch_size, cell_size) 95 batch_size = 2 107 dtypes.float32, shape=(time_steps, batch_size, input_size)) 108 h = array_ops.zeros([batch_size, cell_size]) [all …]
|
/external/tensorflow/tensorflow/contrib/learn/python/learn/learn_io/ |
D | graph_io.py | 50 batch_size, argument 103 batch_size=batch_size, 118 batch_size, argument 173 batch_size, 188 batch_size, argument 246 batch_size, 339 batch_size, argument 391 if (batch_size is None) or ( 392 (not isinstance(batch_size, ops.Tensor)) and 393 (batch_size <= 0 or batch_size >= queue_capacity)): [all …]
|
/external/tensorflow/tensorflow/contrib/eager/python/examples/revnet/ |
D | ops_test.py | 31 batch_size = 100 33 x = tf.random_normal(shape=[batch_size, 32, 32, 3]) 36 self.assertEqual(y.shape, [batch_size, 32, 32, 5]) 39 self.assertEqual(y.shape, [batch_size, 16, 16, 3]) 42 self.assertEqual(y.shape, [batch_size, 16, 16, 5]) 45 x = tf.random_normal(shape=[batch_size, 32, 32, 3]) 50 dy = tf.random_normal(shape=[batch_size, 3, 32, 32]) 56 x = tf.random_normal(shape=[batch_size, 3, 32, 32]) 59 self.assertEqual(y.shape, [batch_size, 5, 32, 32]) 62 self.assertEqual(y.shape, [batch_size, 3, 16, 16]) [all …]
|
/external/tensorflow/tensorflow/contrib/learn/python/learn/estimators/ |
D | debug.py | 96 batch_size = None 102 if batch_size is None: 103 batch_size = first_dim 105 size_checks.append(check_ops.assert_equal(batch_size, first_dim)) 108 logits = array_ops.zeros([batch_size, head.logits_dimension]) 209 def predict_classes(self, input_fn=None, batch_size=None): argument 222 input_fn=input_fn, batch_size=batch_size, outputs=[key]) 227 batch_size=None): argument 240 batch_size=batch_size, 324 def predict_scores(self, input_fn=None, batch_size=None): argument [all …]
|
/external/tensorflow/tensorflow/contrib/training/python/training/ |
D | sampling_ops_test.py | 47 batch_size = 16 55 batch_size, 63 batch_size, 71 probs, batch_size, init_probs) 76 array_ops.zeros([1, 3]), label, probs, batch_size, init_probs) 84 batch_size, 94 batch_size, 100 sampling_ops.stratified_sample(val, label, 1, batch_size, init_probs) 109 batch_size, 116 val, label, [.1] * 10, batch_size, init_probs=[.2] * 5) [all …]
|
/external/tensorflow/tensorflow/contrib/rnn/kernels/ |
D | gru_ops.cc | 52 const int64 batch_size = x_tensor->dim_size(0); in Compute() local 59 OP_REQUIRES(ctx, h_prev_tensor->dim_size(0) == batch_size, in Compute() 62 batch_size)); in Compute() 111 ctx, ctx->allocate_output("r", TensorShape({batch_size, cell_size}), in Compute() 116 ctx, ctx->allocate_output("u", TensorShape({batch_size, cell_size}), in Compute() 121 ctx, ctx->allocate_output("c", TensorShape({batch_size, cell_size}), in Compute() 127 TensorShape({batch_size, cell_size}), &h_tensor)); in Compute() 133 TensorShape({batch_size, input_size + cell_size}), in Compute() 139 TensorShape({batch_size, input_size + cell_size}), in Compute() 145 TensorShape({batch_size, 2 * cell_size}), in Compute() [all …]
|