Home
last modified time | relevance | path

Searched refs:n_batch (Results 1 – 25 of 35) sorted by relevance

12

/external/tensorflow/tensorflow/lite/tools/optimize/calibration/custom_logging_ops/
Dlstm.cc63 const TfLiteLSTMParams* params, int n_batch, int n_cell, int n_input, in LstmStepWithAuxInput() argument
80 std::fill_n(input_gate_scratch, n_cell * n_batch, 0.0f); in LstmStepWithAuxInput()
82 std::fill_n(forget_gate_scratch, n_cell * n_batch, 0.0f); in LstmStepWithAuxInput()
83 std::fill_n(cell_scratch, n_cell * n_batch, 0.0f); in LstmStepWithAuxInput()
84 std::fill_n(output_gate_scratch, n_cell * n_batch, 0.0f); in LstmStepWithAuxInput()
88 n_batch, input_gate_scratch); in LstmStepWithAuxInput()
90 tensor_utils::VectorBatchVectorAssign(forget_gate_bias_ptr, n_cell, n_batch, in LstmStepWithAuxInput()
92 tensor_utils::VectorBatchVectorAssign(cell_bias_ptr, n_cell, n_batch, in LstmStepWithAuxInput()
94 tensor_utils::VectorBatchVectorAssign(output_gate_bias_ptr, n_cell, n_batch, in LstmStepWithAuxInput()
101 input_to_input_weights_ptr, n_cell, n_input, input_ptr, n_batch, in LstmStepWithAuxInput()
[all …]
/external/tensorflow/tensorflow/lite/kernels/internal/reference/
Dportable_tensor_utils.h60 int n_batch, float* result) { in MatrixBatchVectorMultiplyAccumulate() argument
62 n_batch, result); in MatrixBatchVectorMultiplyAccumulate()
69 int n_batch, in MatrixBatchVectorMultiplyAccumulate() argument
72 scaling_factors, n_batch, result); in MatrixBatchVectorMultiplyAccumulate()
78 int n_batch, float* __restrict__ result, const float* per_channel_scale, in MatrixBatchVectorMultiplyAccumulate() argument
82 matrix, m_rows, m_cols, vectors, scaling_factors, n_batch, result, in MatrixBatchVectorMultiplyAccumulate()
91 int n_batch, int32_t* scratch, in MatrixBatchVectorMultiplyAccumulate() argument
95 scaling_factors, n_batch, result); in MatrixBatchVectorMultiplyAccumulate()
101 const float* __restrict__ vector, int n_batch, float* __restrict__ result) { in SparseMatrixBatchVectorMultiplyAccumulate1x4() argument
103 matrix, segments, indices, m_rows, m_cols, vector, n_batch, result); in SparseMatrixBatchVectorMultiplyAccumulate1x4()
[all …]
Dportable_tensor_utils_impl.h60 int n_batch, float* result);
65 int n_batch, float* __restrict__ result);
70 int n_batch, float* __restrict__ result, const float* per_channel_scale,
77 int n_batch, int32_t* scratch, float* __restrict__ result,
83 const float* __restrict__ vector, int n_batch, float* __restrict__ result);
87 int m_rows, int m_cols, const float* __restrict__ vector, int n_batch,
94 int n_batch, const int32_t input_offset, const int32_t output_multiplier,
102 const float* scaling_factors, int n_batch, float* __restrict__ result);
110 int v_size, int n_batch,
114 const int16_t* vector, int v_size, const int16_t* batch_vector, int n_batch,
[all …]
Dportable_tensor_utils.cc122 int n_batch, float* result) { in PortableMatrixBatchVectorMultiplyAccumulate() argument
124 for (int b = 0; b < n_batch; b++) { in PortableMatrixBatchVectorMultiplyAccumulate()
141 int n_batch, float* __restrict__ result) { in PortableMatrixBatchVectorMultiplyAccumulate() argument
142 for (int batch = 0; batch < n_batch; ++batch, vectors += m_cols) { in PortableMatrixBatchVectorMultiplyAccumulate()
166 int n_batch, float* __restrict__ result, const float* per_channel_scale, in PortableMatrixBatchVectorMultiplyAccumulate() argument
171 matrix, m_rows, m_cols, vectors, scaling_factors, n_batch, result); in PortableMatrixBatchVectorMultiplyAccumulate()
181 for (int batch = 0; batch < n_batch; ++batch, vectors += m_cols) { in PortableMatrixBatchVectorMultiplyAccumulate()
209 const float* __restrict__ vector, int n_batch, float* __restrict__ result) { in PortableSparseMatrixBatchVectorMultiplyAccumulate1x4() argument
212 for (int batch = 0; batch < n_batch; batch++) { in PortableSparseMatrixBatchVectorMultiplyAccumulate1x4()
234 int n_batch, const int32_t input_offset, const int32_t output_multiplier, in PortableSparseMatrixBatchVectorMultiplyAccumulate1x16() argument
[all …]
Dsvdf.h77 const int n_batch = input_shape.Dims(0); in EvalIntegerSVDF() local
86 std::copy(state_data + 1, state_data + n_batch * n_memory * n_filter, in EvalIntegerSVDF()
95 for (int b = 0; b < n_batch; b++) { in EvalIntegerSVDF()
120 for (int b = 0; b < n_batch; ++b) { in EvalIntegerSVDF()
133 n_batch * n_unit, n_rank); in EvalIntegerSVDF()
136 tensor_utils::VectorBatchVectorAdd(bias_data, n_unit, n_batch, in EvalIntegerSVDF()
142 for (int i = 0; i < n_batch * n_unit; ++i) { in EvalIntegerSVDF()
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/
Dsse_tensor_utils.h39 int n_batch, float* result) { in MatrixBatchVectorMultiplyAccumulate() argument
42 n_batch, result); in MatrixBatchVectorMultiplyAccumulate()
45 vector, n_batch, result); in MatrixBatchVectorMultiplyAccumulate()
52 const float* __restrict__ scaling_factors, int n_batch, in MatrixBatchVectorMultiplyAccumulate() argument
55 vectors, scaling_factors, n_batch, result); in MatrixBatchVectorMultiplyAccumulate()
61 int n_batch, float* __restrict__ result, const float* per_channel_scale, in MatrixBatchVectorMultiplyAccumulate() argument
65 vectors, scaling_factors, n_batch, result, per_channel_scale, in MatrixBatchVectorMultiplyAccumulate()
72 const float* __restrict__ scaling_factors, int n_batch, in MatrixBatchVectorMultiplyAccumulate() argument
76 vectors, scaling_factors, n_batch, scratch, result, context); in MatrixBatchVectorMultiplyAccumulate()
82 const float* __restrict__ vector, int n_batch, float* __restrict__ result) { in SparseMatrixBatchVectorMultiplyAccumulate1x4() argument
[all …]
Dneon_tensor_utils.h29 int n_batch, float* result) { in MatrixBatchVectorMultiplyAccumulate() argument
31 vector, n_batch, result); in MatrixBatchVectorMultiplyAccumulate()
38 int n_batch, in MatrixBatchVectorMultiplyAccumulate() argument
41 vectors, scaling_factors, n_batch, result); in MatrixBatchVectorMultiplyAccumulate()
48 int n_batch, int32_t* scratch, in MatrixBatchVectorMultiplyAccumulate() argument
52 vectors, scaling_factors, n_batch, scratch, result, context); in MatrixBatchVectorMultiplyAccumulate()
58 int n_batch, float* __restrict__ result, const float* per_channel_scale, in MatrixBatchVectorMultiplyAccumulate() argument
62 vectors, scaling_factors, n_batch, result, per_channel_scale, in MatrixBatchVectorMultiplyAccumulate()
69 const float* __restrict__ vector, int n_batch, float* __restrict__ result) { in SparseMatrixBatchVectorMultiplyAccumulate1x4() argument
71 segments, indices, m_rows, m_cols, vector, n_batch, result); in SparseMatrixBatchVectorMultiplyAccumulate1x4()
[all …]
Dneon_tensor_utils_impl.h34 int n_batch, float* result);
41 int n_batch,
50 int n_batch, int32_t* scratch,
58 int n_batch, float* __restrict__ result, const float* per_channel_scale,
65 int n_batch, int n_input, int16_t* output);
67 void NeonApplySigmoid(const int16_t* input, int32_t n_batch, int32_t n_input,
70 void NeonApplyTanh(int32_t integer_bits, const int16_t* input, int32_t n_batch,
73 void NeonCwiseMul(const int16_t* input_1, const int16_t* input_2, int n_batch,
77 int32_t multiplier, int shift, int n_batch, int n_input,
80 void NeonCwiseAdd(const int16_t* input_1, const int16_t* input_2, int n_batch,
[all …]
Dneon_tensor_utils.cc227 int n_batch, float* result) { in NeonMatrixBatchVectorMultiplyAccumulate() argument
234 for (int b = 0; b < n_batch; b++) { in NeonMatrixBatchVectorMultiplyAccumulate()
276 const int8_t* ShuffleVectors(const int8_t* vectors, const int n_batch, in ShuffleVectors() argument
279 kNeonVectorAlignment, n_batch * m_cols, shuffled_vectors_free)); in ShuffleVectors()
281 for (int i = 0; i < n_batch; i += 4) { in ShuffleVectors()
331 const int8_t* vectors, const float* scaling_factors, int n_batch, in DotprodMatrixBatchFourVectorMultiplyAccumulate() argument
336 ShuffleVectors(vectors, n_batch, m_cols, &shuffled_vectors_free); in DotprodMatrixBatchFourVectorMultiplyAccumulate()
339 for (int batch = 0; batch < n_batch; batch += 4) { in DotprodMatrixBatchFourVectorMultiplyAccumulate()
459 const int8_t* vectors, const float* scaling_factors, int n_batch, in DotprodMatrixBatchFourVectorMultiplyAccumulate() argument
464 ShuffleVectors(vectors, n_batch, m_cols, &shuffled_vectors_free); in DotprodMatrixBatchFourVectorMultiplyAccumulate()
[all …]
Dsse_tensor_utils_impl.h33 const float* __restrict__ vector, int n_batch, float* __restrict__ result);
39 const float* __restrict__ scaling_factors, int n_batch,
51 const float* __restrict__ scaling_factors, int n_batch,
59 const float* __restrict__ scaling_factors, int n_batch, int32_t* scratch,
66 const float* __restrict__ scaling_factors, int n_batch,
76 const float* __restrict__ scaling_factors, int n_batch,
Dsse_tensor_utils.cc161 const float* __restrict__ vector, int n_batch, float* __restrict__ result) { in Avx2MatrixBatchVectorMultiplyAccumulateImpl() argument
168 for (int b = 0; b < n_batch; ++b) { in Avx2MatrixBatchVectorMultiplyAccumulateImpl()
202 const float* __restrict__ scaling_factors, int n_batch, in Avx2MatrixBatchVectorMultiplyAccumulateImpl() argument
205 for (std::intptr_t batch = 0; batch < n_batch; ++batch) { in Avx2MatrixBatchVectorMultiplyAccumulateImpl()
294 const float* __restrict__ scaling_factors, int n_batch, in SseMatrixBatchVectorMultiplyAccumulateImpl() argument
299 matrix, m_rows, m_cols, vectors, scaling_factors, n_batch, result, in SseMatrixBatchVectorMultiplyAccumulateImpl()
303 for (std::intptr_t batch = 0; batch < n_batch; ++batch) { in SseMatrixBatchVectorMultiplyAccumulateImpl()
379 const int8_t* input_to_gate_weights, int32_t n_batch, in SseCpuBackendGemm() argument
395 rhs_params.cols = n_batch; in SseCpuBackendGemm()
400 dst_params.cols = n_batch; in SseCpuBackendGemm()
[all …]
/external/tensorflow/tensorflow/lite/kernels/internal/
Dportable_tensor_utils.h51 void VectorBatchVectorAdd(const T* vector, int v_size, int n_batch, in VectorBatchVectorAdd() argument
53 for (int b = 0; b < n_batch; b++) { in VectorBatchVectorAdd()
73 const T* batch_vector, int n_batch, in VectorBatchVectorCwiseProduct() argument
75 for (int b = 0; b < n_batch; b++) { in VectorBatchVectorCwiseProduct()
101 int n_batch, T* result) { in VectorBatchVectorCwiseProductAccumulate() argument
102 for (int b = 0; b < n_batch; b++) { in VectorBatchVectorCwiseProductAccumulate()
112 void VectorBatchVectorAssign(const T* vector, int v_size, int n_batch, in VectorBatchVectorAssign() argument
114 for (int b = 0; b < n_batch; b++) { in VectorBatchVectorAssign()
153 inline void BatchQuantizeFloats(const float* float_data_ptr, int n_batch, in BatchQuantizeFloats() argument
157 for (int b = 0; b < n_batch; ++b) { in BatchQuantizeFloats()
[all …]
Dtensor_utils.h45 const float* __restrict__ scaling_factors, int n_batch,
53 int n_batch, float* __restrict__ result, const float* per_channel_scale,
63 const float* vector_scaling_factors, int n_batch, in MatrixBatchVectorMultiplyAccumulate() argument
68 for (int b = 0; b < n_batch; ++b) { in MatrixBatchVectorMultiplyAccumulate()
73 scaling_factor_scratch, n_batch, result, in MatrixBatchVectorMultiplyAccumulate()
107 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp,
138 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp,
/external/tensorflow/tensorflow/lite/kernels/
Dlstm_eval.cc47 float* output, int m_rows, int m_cols, int n_batch, in MatrixBatchVectorMultiplyAccumulate() argument
56 tflite::RuntimeShape input_shape({n_batch, m_cols}); in MatrixBatchVectorMultiplyAccumulate()
57 tflite::RuntimeShape output_shape({n_batch, m_rows}); in MatrixBatchVectorMultiplyAccumulate()
58 if (n_batch == 1) { in MatrixBatchVectorMultiplyAccumulate()
66 for (int i = 0; i < m_rows * n_batch; ++i) { in MatrixBatchVectorMultiplyAccumulate()
187 const int n_batch, const int n_input, const int n_aux_input, in CalculateLstmGateFloat() argument
198 std::fill_n(gate, n_cell * n_batch, 0.0f); in CalculateLstmGateFloat()
200 tensor_utils::VectorBatchVectorAssign(gate_bias, n_cell, n_batch, gate); in CalculateLstmGateFloat()
208 n_input, n_batch, context); in CalculateLstmGateFloat()
216 n_aux_input, n_batch, context); in CalculateLstmGateFloat()
[all …]
Dbidirectional_sequence_lstm_test.cc32 BidirectionalLSTMOpModel(int n_batch, int n_input, int n_cell, int n_output, in BidirectionalLSTMOpModel() argument
40 : n_batch_(n_batch), in BidirectionalLSTMOpModel()
430 const int n_batch = 1; in TEST_P() local
441 n_batch, n_input, n_cell, n_output, sequence_length, /*use_cifg=*/false, in TEST_P()
447 {sequence_length, n_batch, n_input}, // input tensor in TEST_P()
495 {n_batch, n_output}, // activation_state tensor in TEST_P()
496 {n_batch, n_cell}, // cell_state tensor in TEST_P()
498 {n_batch, n_output}, // activation_state tensor in TEST_P()
499 {n_batch, n_cell}, // cell_state tensor in TEST_P()
501 {sequence_length, n_batch, 0}, // aux_input tensor in TEST_P()
[all …]
Dunidirectional_sequence_lstm_test.cc36 int n_batch, int n_input, int n_cell, int n_output, int sequence_length, in HybridUnidirectionalLSTMOpModel() argument
42 n_batch, n_input, n_cell, n_output, sequence_length, time_major, in HybridUnidirectionalLSTMOpModel()
248 const int n_batch = 1; in TEST_F() local
256 n_batch, n_input, n_cell, n_output, sequence_length, in TEST_F()
262 {sequence_length, n_batch, n_input}, // input tensor in TEST_F()
286 {n_batch, n_output}, // output_state tensor in TEST_F()
287 {n_batch, n_cell}, // cell_state tensor in TEST_F()
310 const int n_batch = 1; in TEST_F() local
318 n_batch, n_input, n_cell, n_output, sequence_length, in TEST_F()
324 {sequence_length, n_batch, n_input}, // input tensor in TEST_F()
[all …]
Dunidirectional_sequence_gru_test.cc34 explicit GRUOpModel(int n_batch, int n_input, int n_output, in GRUOpModel() argument
37 : n_batch_(n_batch), n_input_(n_input), n_output_(n_output) { in GRUOpModel()
40 AddVariableInput(TensorData{TensorType_FLOAT32, {n_batch, n_output}}); in GRUOpModel()
101 const int n_batch = 2; in TEST() local
105 GRUOpModel m(n_batch, n_input, n_output, in TEST()
106 {{n_time, n_batch, n_input}, in TEST()
107 {n_batch, n_output}, in TEST()
133 EXPECT_THAT(m.GetOutputShape(), ElementsAre(n_time, n_batch, n_output)); in TEST()
Dgru_cell.cc45 const int n_batch = input_shape.Dims(0); in GruCell() local
70 auto r = ru.block(0 * n_output, 0, n_output, n_batch); in GruCell()
71 auto u = ru.block(1 * n_output, 0, n_output, n_batch); in GruCell()
76 auto hr = xh.block(n_input, 0, n_output, n_batch); in GruCell()
88 memcpy(output_state, output, n_batch * n_output * sizeof(float)); in GruCell()
Dunidirectional_sequence_gru.cc40 const int n_batch = input->dims->data[1]; in GruImpl() local
43 const int n_batch_input = n_batch * n_input; in GruImpl()
44 const int n_batch_output = n_batch * n_output; in GruImpl()
45 const RuntimeShape input_shape({n_batch, n_input}); in GruImpl()
58 const RuntimeShape output_shape = RuntimeShape({n_batch, n_output}); in GruImpl()
142 const int n_batch = input->dims->data[1]; in Prepare() local
150 TF_LITE_ENSURE_EQ(context, input_state->dims->data[0], n_batch); in Prepare()
189 output_size->data[1] = n_batch; in Prepare()
213 activation_size->data[0] = n_batch; in Prepare()
225 concat_size->data[0] = n_batch; in Prepare()
Dlstm_test.cc39 LSTMOpModel(int n_batch, int n_input, int n_cell, int n_output, bool use_cifg, in LSTMOpModel() argument
46 n_batch_(n_batch), in LSTMOpModel()
48 input_ = AddInput({TensorType_FLOAT32, {n_batch, n_input}}); in LSTMOpModel()
104 AddVariableInput({TensorType_FLOAT32, {n_batch, n_output}}); in LSTMOpModel()
105 AddVariableInput({TensorType_FLOAT32, {n_batch, n_cell}}); in LSTMOpModel()
130 output_ = AddOutput({TensorType_FLOAT32, {n_batch, n_output}}); in LSTMOpModel()
413 const int n_batch = 1; in TEST_P() local
475 LSTMOpModel lstm(n_batch, n_input, n_cell, n_output, in TEST_P()
490 const int n_batch = 1; in TEST_P() local
546 LSTMOpModel lstm(n_batch, n_input, n_cell, n_output, in TEST_P()
[all …]
Doptional_tensor_test.cc31 LSTMOpModel(int n_batch, int n_input, int n_cell, int n_output, bool use_cifg, in LSTMOpModel() argument
35 : n_batch_(n_batch), in LSTMOpModel()
229 const int n_batch = 1; in TEST() local
235 LSTMOpModel lstm(n_batch, n_input, n_cell, n_output, in TEST()
241 {n_batch, n_input}, // input tensor in TEST()
Dbidirectional_sequence_lstm.cc438 const int n_batch = time_major ? input->dims->data[1] : input->dims->data[0]; in Prepare() local
546 n_batch * n_fw_output); in Prepare()
547 TF_LITE_ENSURE_EQ(context, NumElements(fw_cell_state), n_batch * n_fw_cell); in Prepare()
551 fw_output_size->data[0] = time_major ? max_time : n_batch; in Prepare()
552 fw_output_size->data[1] = time_major ? n_batch : max_time; in Prepare()
585 fw_scratch_buffer_size->data[0] = n_batch; in Prepare()
618 bw_output_size->data[0] = time_major ? max_time : n_batch; in Prepare()
619 bw_output_size->data[1] = time_major ? n_batch : max_time; in Prepare()
629 n_batch * n_bw_output); in Prepare()
630 TF_LITE_ENSURE_EQ(context, NumElements(bw_cell_state), n_batch * n_bw_cell); in Prepare()
[all …]
/external/tensorflow/tensorflow/lite/tools/optimize/calibration/builtin_logging_ops/
Dlstm.cc46 const int n_batch, const int n_input, const int n_aux_input, in CalculateLstmGateFloat() argument
58 std::fill_n(gate, n_cell * n_batch, 0.0f); in CalculateLstmGateFloat()
60 tensor_utils::VectorBatchVectorAssign(gate_bias, n_cell, n_batch, gate); in CalculateLstmGateFloat()
66 input_to_gate_weights, n_cell, n_input, input, n_batch, gate); in CalculateLstmGateFloat()
73 aux_input, n_batch, gate); in CalculateLstmGateFloat()
77 recurrent_to_gate_weights, n_cell, n_output, output_state, n_batch, gate); in CalculateLstmGateFloat()
81 cell_to_gate_weights, n_cell, cell_state, n_batch, gate); in CalculateLstmGateFloat()
86 n_cell * n_batch, error_reporter); in CalculateLstmGateFloat()
88 tensor_utils::MeanStddevNormalization(gate, gate, n_cell, n_batch); in CalculateLstmGateFloat()
90 gate, n_batch, gate); in CalculateLstmGateFloat()
[all …]
/external/tensorflow/tensorflow/lite/delegates/gpu/cl/kernels/
Dlstm_full_test.cc35 LSTMOpModel(int n_batch, int n_input, int n_cell, int n_output, bool use_cifg, in LSTMOpModel() argument
63 n_batch_(n_batch), in LSTMOpModel()
65 input_ = AddInput({TensorType_FLOAT32, {n_batch, n_input}}); in LSTMOpModel()
124 AddVariableInput({TensorType_FLOAT32, {n_batch, n_output}}); in LSTMOpModel()
125 AddVariableInput({TensorType_FLOAT32, {n_batch, n_cell}}); in LSTMOpModel()
150 output_ = AddOutput({TensorType_FLOAT32, {n_batch, n_output}}); in LSTMOpModel()
265 const int n_batch = 1; in TEST_P() local
319 n_batch, n_input, n_cell, n_output, in TEST_P()
339 const int n_batch = 1; in TEST_P() local
387 n_batch, n_input, n_cell, n_output, in TEST_P()
[all …]
/external/armnn/src/backends/reference/workloads/
DLstmUtils.cpp43 uint32_t n_batch, in MeanStddevNormalization() argument
46 for (uint32_t batch = 0; batch < n_batch; ++batch) { in MeanStddevNormalization()
72 output_vector -= v_size * n_batch; in MeanStddevNormalization()
73 input_vector -= v_size * n_batch; in MeanStddevNormalization()

12