Home
last modified time | relevance | path

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

123

/external/tensorflow/tensorflow/python/distribute/
Dmetrics_v1_test.py147 def _expected_fn(num_batches): argument
149 return num_batches * 2 - 0.5
160 def _expected_fn(num_batches): argument
161 return [3./4, 3./8, 3./12, 4./16][num_batches - 1]
176 def _expected_fn(num_batches): argument
181 mean([0.5, 1./3, 1./3, 0., 0.])][num_batches - 1]
195 def _expected_fn(num_batches): argument
200 mean([2./8, 1./7, 1./7, 0., 0.])][num_batches - 1]
213 def _expected_fn(num_batches): argument
218 first = 2. * num_batches - 2.
[all …]
/external/tensorflow/tensorflow/core/kernels/
Deigen_pooling_test.cc31 const int num_batches = 13; in TEST() local
37 Tensor<float, 4> input(depth, input_rows, input_cols, num_batches); in TEST()
38 Tensor<float, 4> result(depth, output_rows, output_cols, num_batches); in TEST()
51 EXPECT_EQ(result.dimension(3), num_batches); in TEST()
53 for (int b = 0; b < num_batches; ++b) { in TEST()
79 const int num_batches = 13; in TEST() local
85 Tensor<float, 4, RowMajor> input(num_batches, input_cols, input_rows, depth); in TEST()
86 Tensor<float, 4, RowMajor> result(num_batches, output_cols, output_rows, in TEST()
100 EXPECT_EQ(result.dimension(0), num_batches); in TEST()
102 for (int b = 0; b < num_batches; ++b) { in TEST()
[all …]
Dparameterized_truncated_normal_op_test.cc27 static Graph* PTruncatedNormal(int num_batches, int samples_per_batch) { in PTruncatedNormal() argument
30 shape_t.flat<int32>().setValues({num_batches, samples_per_batch}); in PTruncatedNormal()
33 Tensor means_t(DT_FLOAT, TensorShape({num_batches})); in PTruncatedNormal()
35 Tensor stdevs_t(DT_FLOAT, TensorShape({num_batches})); in PTruncatedNormal()
38 Tensor minvals_t(DT_FLOAT, TensorShape({num_batches})); in PTruncatedNormal()
40 Tensor maxvals_t(DT_FLOAT, TensorShape({num_batches})); in PTruncatedNormal()
56 static Graph* PTruncatedNormal2SD(int num_batches, int samples_per_batch) { in PTruncatedNormal2SD() argument
59 shape_t.flat<int32>().setValues({num_batches, samples_per_batch}); in PTruncatedNormal2SD()
61 Tensor means_t(DT_FLOAT, TensorShape({num_batches})); in PTruncatedNormal2SD()
63 Tensor stdevs_t(DT_FLOAT, TensorShape({num_batches})); in PTruncatedNormal2SD()
[all …]
Deigen_backward_spatial_convolutions_test.cc231 const int num_batches = 13; in TEST() local
242 num_batches); in TEST()
245 num_batches); in TEST()
257 EXPECT_EQ(input_backward.dimension(3), num_batches); in TEST()
259 for (int b = 0; b < num_batches; ++b) { in TEST()
286 const int num_batches = 13; in TEST() local
296 Tensor<float, 4, RowMajor> input_backward(num_batches, input_cols, input_rows, in TEST()
300 Tensor<float, 4, RowMajor> output_backward(num_batches, output_cols, in TEST()
310 EXPECT_EQ(input_backward.dimension(0), num_batches); in TEST()
315 for (int b = 0; b < num_batches; ++b) { in TEST()
[all …]
Drandom_binomial_op_test.cc27 static Graph* RandomBinomialGraph(double count, double prob, int num_batches, in RandomBinomialGraph() argument
31 shape_t.flat<int32>().setValues({num_batches, samples_per_batch}); in RandomBinomialGraph()
33 Tensor counts_t(DT_FLOAT, TensorShape({num_batches})); in RandomBinomialGraph()
35 Tensor probs_t(DT_FLOAT, TensorShape({num_batches})); in RandomBinomialGraph()
48 static Graph* RandomBinomialInv(int num_batches, int samples_per_batch) { in RandomBinomialInv() argument
50 return RandomBinomialGraph(10., 0.3, num_batches, samples_per_batch); in RandomBinomialInv()
53 static Graph* RandomBinomialRej(int num_batches, int samples_per_batch) { in RandomBinomialRej() argument
55 return RandomBinomialGraph(100., 0.3, num_batches, samples_per_batch); in RandomBinomialRej()
58 static Graph* RandomBinomialInvComplement(int num_batches, in RandomBinomialInvComplement() argument
61 return RandomBinomialGraph(10., 0.8, num_batches, samples_per_batch); in RandomBinomialInvComplement()
[all …]
Deigen_backward_cuboid_convolutions_test.cc299 const int num_batches = 13; in TEST() local
313 input_cols, num_batches); in TEST()
317 output_cols, num_batches); in TEST()
326 EXPECT_EQ(input_backward.dimension(4), num_batches); in TEST()
332 for (int b = 0; b < num_batches; ++b) { in TEST()
366 const int num_batches = 13; in TEST() local
379 Tensor<float, 5, RowMajor> input_backward(num_batches, input_cols, input_rows, in TEST()
384 num_batches, output_cols, output_rows, output_planes, output_depth); in TEST()
393 EXPECT_EQ(input_backward.dimension(0), num_batches); in TEST()
399 for (int b = 0; b < num_batches; ++b) { in TEST()
[all …]
Drandom_binomial_op.cc175 void operator()(OpKernelContext* ctx, const CPUDevice& d, int64 num_batches, in operator ()()
186 auto DoWork = [num_batches, samples_per_batch, &bcast, &counts, &probs, in operator ()()
222 output_batch_offset[sample_idx * num_batches] = static_cast<U>(0.0); in operator ()()
228 output_batch_offset[sample_idx * num_batches] = in operator ()()
239 output_batch_offset[sample_idx * num_batches] = in operator ()()
252 output_batch_offset[sample_idx * num_batches] = in operator ()()
265 output_batch_offset[sample_idx * num_batches] = in operator ()()
278 output_batch_offset[sample_idx * num_batches] = static_cast<U>( in operator ()()
289 output_batch_offset[sample_idx * num_batches] = static_cast<U>(NAN); in operator ()()
387 int64 num_batches = 1; in Compute() local
[all …]
Dparameterized_truncated_normal_op.cc53 void operator()(OpKernelContext* ctx, const CPUDevice& d, int64 num_batches, in operator ()()
308 Shard(worker_threads.num_threads, worker_threads.workers, num_batches, in operator ()()
315 void operator()(OpKernelContext* ctx, const CPUDevice& d, int64 num_batches, in operator ()()
334 auto do_work = [num_batches, samples_per_batch, &ctx, &bcast, &means, in operator ()()
441 output_batch_offset[sample_idx * num_batches] = in operator ()()
506 output_batch_offset[sample_idx * num_batches] = in operator ()()
550 output_batch_offset[sample_idx * num_batches] = in operator ()()
630 int32 num_batches = shape_tensor.flat<int32>()(0); in Compute() local
637 const int32 num_elements = num_batches * samples_per_batch; in Compute()
671 int32 size = num_batches * samples_per_batch; in Compute()
[all …]
Dcount_ops.cc35 int num_batches = per_batch_counts.size(); in OutputSparse() local
52 for (int b = 0; b < num_batches; ++b) { in OutputSparse()
76 dense_shape->flat<int64>().data()[0] = num_batches; in OutputSparse()
196 int num_batches = is_1d ? 1 : shape.flat<int64>()(0); in Compute() local
209 auto per_batch_counts = BatchedMap<W>(num_batches); in Compute()
270 int num_batches = splits.NumElements() - 1; in Compute() local
274 context, num_batches > 0, in Compute()
280 OP_REQUIRES(context, splits_values(num_batches) == num_values, in Compute()
283 splits_values(num_batches), " instead of ", num_values)); in Compute()
285 auto per_batch_counts = BatchedMap<W>(num_batches); in Compute()
Deigen_spatial_convolutions_test.cc197 const int num_batches = 13; in TEST() local
204 Tensor<float, 4> input(input_depth, input_rows, input_cols, num_batches); in TEST()
206 Tensor<float, 4> result(output_depth, output_rows, output_cols, num_batches); in TEST()
219 EXPECT_EQ(result.dimension(3), num_batches); in TEST()
221 for (int b = 0; b < num_batches; ++b) { in TEST()
249 const int num_batches = 13; in TEST() local
259 Tensor<float, 4> input(input_depth, input_rows, input_cols, num_batches); in TEST()
261 Tensor<float, 4> result(output_depth, output_rows, output_cols, num_batches); in TEST()
274 EXPECT_EQ(result.dimension(3), num_batches); in TEST()
277 for (int b = 0; b < num_batches; ++b) { in TEST()
[all …]
Dparameterized_truncated_normal_op.h38 void operator()(OpKernelContext* ctx, const Device& d, int64 num_batches,
52 void operator()(OpKernelContext* ctx, const Device& d, int64 num_batches,
/external/tensorflow/tensorflow/python/keras/layers/preprocessing/benchmarks/
Dhashing_benchmark.py59 num_batches = 5
60 ds = ds.take(num_batches)
61 ds = ds.prefetch(num_batches)
69 avg_time = np.mean(np.array(ends) - np.array(starts)) / num_batches
85 num_batches = 5
86 ds = ds.take(num_batches)
87 ds = ds.prefetch(num_batches)
95 avg_time = np.mean(np.array(ends) - np.array(starts)) / num_batches
Dcategory_crossing_benchmark.py58 num_batches = 5
59 ds = ds.take(num_batches)
60 ds = ds.prefetch(num_batches)
68 avg_time = np.mean(np.array(ends) - np.array(starts)) / num_batches
86 num_batches = 5
87 ds = ds.take(num_batches)
88 ds = ds.prefetch(num_batches)
96 avg_time = np.mean(np.array(ends) - np.array(starts)) / num_batches
Dcategory_encoding_benchmark.py57 num_batches = 5
58 ds = ds.take(num_batches)
59 ds = ds.prefetch(num_batches)
67 avg_time = np.mean(np.array(ends) - np.array(starts)) / num_batches
/external/tensorflow/tensorflow/python/kernel_tests/
Dfractional_max_pool_op_test.py200 num_batches = 5
206 tensor_shape = (num_batches, num_rows, num_cols, num_channels)
216 num_batches = 5
222 tensor_shape = (num_batches, num_rows, num_cols, num_channels)
235 for num_batches in [1, 3]:
239 tensor_shape = (num_batches, num_rows, num_cols, num_channels)
251 num_batches = 3
255 tensor_shape = (num_batches, num_rows, num_cols, num_channels)
272 num_batches = 3
276 tensor_shape = (num_batches, num_rows, num_cols, num_channels)
[all …]
Dfractional_avg_pool_op_test.py198 num_batches = 5
204 tensor_shape = (num_batches, num_rows, num_cols, num_channels)
238 for num_batches in [1, 3]:
242 tensor_shape = (num_batches, num_rows, num_cols, num_channels)
254 num_batches = 3
258 tensor_shape = (num_batches, num_rows, num_cols, num_channels)
275 num_batches = 3
279 tensor_shape = (num_batches, num_rows, num_cols, num_channels)
353 for num_batches in [1, 3]:
359 input_shape = (num_batches, num_rows, num_cols, num_channels)
[all …]
Dself_adjoint_eig_op_test.py130 num_batches = int(np.prod(x_e.shape[:-1]))
132 x_e = np.reshape(x_e, [num_batches] + [n])
133 x_v = np.reshape(x_v, [num_batches] + [n, n])
134 y_e = np.reshape(y_e, [num_batches] + [n])
135 y_v = np.reshape(y_v, [num_batches] + [n, n])
136 for i in range(num_batches):
Deig_op_test.py134 num_batches = int(np.prod(x_e.shape[:-1]))
136 x_e = np.reshape(x_e, [num_batches] + [n])
137 x_v = np.reshape(x_v, [num_batches] + [n, n])
138 y_e = np.reshape(y_e, [num_batches] + [n])
139 y_v = np.reshape(y_v, [num_batches] + [n, n])
140 for i in range(num_batches):
/external/tensorflow/tensorflow/python/training/
Dinput_test.py454 num_batches = 3
457 counter = examples.count_up_to(num_batches * batch_size)
481 for i in range(num_batches):
536 num_batches = 3
539 counter = examples.count_up_to(num_batches * batch_size)
549 for i in range(num_batches):
567 num_batches = 3
570 counter = examples.count_up_to(num_batches * batch_size)
581 for i in range(num_batches):
602 num_batches = 3
[all …]
/external/tensorflow/tensorflow/python/keras/distribute/
Dctl_correctness_test.py128 num_batches = 0
138 num_batches += 1
149 num_batches += 1
151 return total_loss / math_ops.cast(num_batches, dtype=dtypes.float32)
200 num_batches = 0
205 num_batches += 1
211 num_batches += 1
214 total_loss / math_ops.cast(num_batches, dtype=dtypes.float32),
Dkeras_metrics_test.py122 def _expected_fn(num_batches): argument
124 return num_batches * 2 - 0.5
/external/tensorflow/tensorflow/lite/delegates/gpu/cl/kernels/
Dlstm_full_test.cc183 int num_batches() { return n_batch_; } in num_batches() function in tflite::__anonb664ae370111::LSTMOpModel
233 const int num_batches = lstm->num_batches(); in VerifyGoldens() local
239 ASSERT_EQ(num_batches, lstm_input_[i].size()); in VerifyGoldens()
240 for (int b = 0; b < num_batches; ++b) { in VerifyGoldens()
250 ASSERT_EQ(num_batches, lstm_golden_output_[i].size()); in VerifyGoldens()
251 for (int b = 0; b < num_batches; ++b) { in VerifyGoldens()
/external/tensorflow/tensorflow/lite/kernels/
Dbasic_rnn_test.cc217 int num_batches() { return batches_; } in num_batches() function in tflite::__anon3123f5fe0111::RNNOpModel
266 (rnn.input_size() * rnn.num_batches()); in TEST()
295 (rnn.input_size() * rnn.num_batches()); in TEST_P()
323 (rnn.input_size() * rnn.num_batches()); in TEST_P()
/external/tensorflow/tensorflow/lite/delegates/gpu/gl/
Dapi.cc106 int num_batches = 0; in Execute() local
120 if (num_batches == 0) { in Execute()
121 num_batches = b; in Execute()
122 } else if (num_batches != b) { in Execute()
125 " vs ", num_batches)); in Execute()
129 for (size_t b = 0; b < num_batches; ++b) { in Execute()
/external/tensorflow/tensorflow/core/kernels/image/
Dnon_max_suppression_op.cc446 const int num_batches = inp_boxes.dim_size(0); in BatchedNonMaxSuppressionOp() local
458 num_batches, in BatchedNonMaxSuppressionOp()
463 std::vector<std::vector<float>> nmsed_boxes(num_batches); in BatchedNonMaxSuppressionOp()
465 std::vector<std::vector<float>> nmsed_scores(num_batches); in BatchedNonMaxSuppressionOp()
467 std::vector<std::vector<float>> nmsed_classes(num_batches); in BatchedNonMaxSuppressionOp()
469 std::vector<int> final_valid_detections(num_batches); in BatchedNonMaxSuppressionOp()
483 int length = num_batches * num_classes; in BatchedNonMaxSuppressionOp()
504 TensorShape valid_detections_shape({num_batches}); in BatchedNonMaxSuppressionOp()
520 length = num_batches; in BatchedNonMaxSuppressionOp()
535 TensorShape boxes_shape({num_batches, per_batch_size, 4}); in BatchedNonMaxSuppressionOp()
[all …]

123