/external/tensorflow/tensorflow/lite/kernels/ |
D | bidirectional_sequence_lstm_test.cc | 32 BidirectionalLSTMOpModel(int n_batch, int n_input, int n_cell, int n_output, in BidirectionalLSTMOpModel() argument 44 n_fw_output_(n_output), in BidirectionalLSTMOpModel() 45 n_bw_output_(n_output), in BidirectionalLSTMOpModel() 434 const int n_output = 4; in TEST_P() local 441 n_batch, n_input, n_cell, n_output, sequence_length, /*use_cifg=*/false, in TEST_P() 455 {n_cell, n_output}, // recurrent_to_input_weight tensor in TEST_P() 456 {n_cell, n_output}, // recurrent_to_forget_weight tensor in TEST_P() 457 {n_cell, n_output}, // recurrent_to_cell_weight tensor in TEST_P() 458 {n_cell, n_output}, // recurrent_to_output_weight tensor in TEST_P() 478 {n_cell, n_output}, // recurrent_to_input_weight tensor in TEST_P() [all …]
|
D | unidirectional_sequence_lstm_test.cc | 32 UnidirectionalLSTMOpModel(int n_batch, int n_input, int n_cell, int n_output, in UnidirectionalLSTMOpModel() argument 44 n_output_(n_output), in UnidirectionalLSTMOpModel() 288 int n_batch, int n_input, int n_cell, int n_output, int sequence_length, in HybridUnidirectionalLSTMOpModel() argument 294 n_batch, n_input, n_cell, n_output, sequence_length, time_major, in HybridUnidirectionalLSTMOpModel() 504 const int n_output = 4; in TEST_F() local 508 n_batch, n_input, n_cell, n_output, sequence_length, in TEST_F() 521 {n_cell, n_output}, // recurrent_to_input_weight tensor in TEST_F() 522 {n_cell, n_output}, // recurrent_to_forget_weight tensor in TEST_F() 523 {n_cell, n_output}, // recurrent_to_cell_weight tensor in TEST_F() 524 {n_cell, n_output}, // recurrent_to_output_weight tensor in TEST_F() [all …]
|
D | lstm_eval.cc | 49 int n_input, int n_aux_input, int n_output, in ComputeRowSums() argument 95 n_output); in ComputeRowSums() 99 n_output); in ComputeRowSums() 102 n_output); in ComputeRowSums() 105 n_output); in ComputeRowSums() 109 projection_weights_ptr, projection_weights_row_sums, n_output, n_cell); in ComputeRowSums() 157 const int n_output, const int n_cell, in CalculateLstmGateFloat() argument 185 recurrent_to_gate_weights, n_cell, n_output, output_state, n_batch, gate); in CalculateLstmGateFloat() 262 void CalculateLstmOutputFloat(int n_batch, int n_cell, int n_output, in CalculateLstmOutputFloat() argument 279 tensor_utils::VectorBatchVectorAssign(projection_bias, n_output, n_batch, in CalculateLstmOutputFloat() [all …]
|
D | lstm_test.cc | 39 LSTMOpModel(int n_batch, int n_input, int n_cell, int n_output, bool use_cifg, in LSTMOpModel() argument 45 n_output_(n_output), in LSTMOpModel() 62 recurrent_to_input_weights_ = AddInput({weight_type, {n_cell, n_output}}); in LSTMOpModel() 64 recurrent_to_forget_weights_ = AddInput({weight_type, {n_cell, n_output}}); in LSTMOpModel() 65 recurrent_to_cell_weights_ = AddInput({weight_type, {n_cell, n_output}}); in LSTMOpModel() 66 recurrent_to_output_weights_ = AddInput({weight_type, {n_cell, n_output}}); in LSTMOpModel() 92 projection_weights_ = AddInput({weight_type, {n_output, n_cell}}); in LSTMOpModel() 98 projection_bias_ = AddInput({TensorType_FLOAT32, {n_output}}); in LSTMOpModel() 104 AddVariableInput({TensorType_FLOAT32, {n_batch, n_output}}); in LSTMOpModel() 130 output_ = AddOutput({TensorType_FLOAT32, {n_batch, n_output}}); in LSTMOpModel() [all …]
|
D | optional_tensor_test.cc | 31 LSTMOpModel(int n_batch, int n_input, int n_cell, int n_output, bool use_cifg, in LSTMOpModel() argument 38 n_output_(n_output) { in LSTMOpModel() 233 const int n_output = 4; in TEST() local 235 LSTMOpModel lstm(n_batch, n_input, n_cell, n_output, in TEST() 249 {n_cell, n_output}, // recurrent_to_forget_weight tensor in TEST() 250 {n_cell, n_output}, // recurrent_to_cell_weight tensor in TEST() 251 {n_cell, n_output}, // recurrent_to_output_weight tensor in TEST()
|
D | unidirectional_sequence_lstm.cc | 411 int n_output, int n_cell, in CheckInputTensorDimensions() argument 453 n_output); in CheckInputTensorDimensions() 465 n_output); in CheckInputTensorDimensions() 475 n_output); in CheckInputTensorDimensions() 582 TF_LITE_ENSURE_EQ(context, projection_weights->dims->data[0], n_output); in CheckInputTensorDimensions() 590 TF_LITE_ENSURE_EQ(context, projection_bias->dims->data[0], n_output); in CheckInputTensorDimensions() 905 const int n_output = recurrent_to_output_weights->dims->data[1]; in Prepare() local 909 context, CheckInputTensorDimensions(context, node, n_input, n_output, in Prepare() 927 TF_LITE_ENSURE_EQ(context, NumElements(output_state), n_batch * n_output); in Prepare() 932 output_size->data[input->dims->size - 1] = n_output; in Prepare() [all …]
|
D | bidirectional_sequence_lstm.cc | 176 TfLiteContext* context, TfLiteNode* node, int n_input, int n_output, in CheckLstmTensorDimensionsAndTypes() argument 244 n_output); in CheckLstmTensorDimensionsAndTypes() 257 n_output); in CheckLstmTensorDimensionsAndTypes() 268 n_output); in CheckLstmTensorDimensionsAndTypes() 357 TF_LITE_ENSURE_EQ(context, projection_weights->dims->data[0], n_output); in CheckLstmTensorDimensionsAndTypes() 367 TF_LITE_ENSURE_EQ(context, projection_bias->dims->data[0], n_output); in CheckLstmTensorDimensionsAndTypes() 385 int n_output, int n_cell) { in CheckInputTensorDimensions() argument 389 context, node, n_input, n_output, n_cell, in CheckInputTensorDimensions() 403 context, node, n_input, n_output, n_cell, in CheckInputTensorDimensions()
|
D | lstm.cc | 854 int n_output, int n_cell, in CheckInputTensorDimensions() argument 903 n_output); in CheckInputTensorDimensions() 916 n_output); in CheckInputTensorDimensions() 927 n_output); in CheckInputTensorDimensions() 1032 TF_LITE_ENSURE_EQ(context, projection_weights->dims->data[0], n_output); in CheckInputTensorDimensions() 1042 TF_LITE_ENSURE_EQ(context, projection_bias->dims->data[0], n_output); in CheckInputTensorDimensions() 1339 const int n_output = recurrent_to_output_weights->dims->data[1]; in Prepare() local 1343 context, CheckInputTensorDimensions(context, node, n_input, n_output, in Prepare() 1360 TF_LITE_ENSURE_EQ(context, NumElements(output_state), n_batch * n_output); in Prepare() 1366 output_size->data[1] = n_output; in Prepare() [all …]
|
/external/tensorflow/tensorflow/lite/experimental/kernels/ |
D | unidirectional_sequence_gru_test.cc | 34 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() 103 const int n_output = 3; in TEST() local 105 GRUOpModel m(n_batch, n_input, n_output, in TEST() 107 {n_batch, n_output}, in TEST() 108 {2 * n_output, n_input + n_output}, in TEST() 109 {2 * n_output}, in TEST() 110 {n_output, n_input + n_output}, in TEST() 111 {n_output}}); in TEST() [all …]
|
D | gru_cell.cc | 47 const int n_output = state_shape.Dims(1); 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()
|
D | unidirectional_sequence_gru.cc | 40 const int n_output = output->dims->data[2]; in GruImpl() local 42 const int n_batch_output = n_batch * n_output; in GruImpl() 56 const RuntimeShape output_shape = RuntimeShape({n_batch, n_output}); in GruImpl() 143 const int n_output = input_state->dims->data[1]; in Prepare() local 150 TF_LITE_ENSURE_EQ(context, gate_weight->dims->data[0], 2 * n_output); in Prepare() 151 TF_LITE_ENSURE_EQ(context, gate_weight->dims->data[1], n_input + n_output); in Prepare() 158 TF_LITE_ENSURE_EQ(context, gate_bias->dims->data[0], 2 * n_output); in Prepare() 165 TF_LITE_ENSURE_EQ(context, candidate_weight->dims->data[0], n_output); in Prepare() 167 n_input + n_output); in Prepare() 174 TF_LITE_ENSURE_EQ(context, candidate_bias->dims->data[0], n_output); in Prepare() [all …]
|
/external/tensorflow/tensorflow/lite/delegates/gpu/cl/kernels/ |
D | lstm_full_test.cc | 35 LSTMOpModel(int n_batch, int n_input, int n_cell, int n_output, bool use_cifg, in LSTMOpModel() argument 62 n_output_(n_output), in LSTMOpModel() 79 AddConstInput({weight_type, {n_cell, n_output}}, in LSTMOpModel() 82 AddConstInput({weight_type, {n_cell, n_output}}, in LSTMOpModel() 84 AddConstInput({weight_type, {n_cell, n_output}}, recurrent_to_cell_weights); in LSTMOpModel() 85 AddConstInput({weight_type, {n_cell, n_output}}, in LSTMOpModel() 112 AddConstInput({weight_type, {n_output, n_cell}}, projection_weights); in LSTMOpModel() 118 AddConstInput({TensorType_FLOAT32, {n_output}}, projection_bias); in LSTMOpModel() 124 AddVariableInput({TensorType_FLOAT32, {n_batch, n_output}}); in LSTMOpModel() 150 output_ = AddOutput({TensorType_FLOAT32, {n_batch, n_output}}); in LSTMOpModel() [all …]
|
/external/tensorflow/tensorflow/lite/tools/optimize/calibration/custom_logging_ops/ |
D | lstm.cc | 64 int n_aux_input, int n_output, int output_batch_leading_dim, in LstmStepWithAuxInput() 151 recurrent_to_input_weights_ptr, n_cell, n_output, output_state_ptr, in LstmStepWithAuxInput() 155 recurrent_to_forget_weights_ptr, n_cell, n_output, output_state_ptr, in LstmStepWithAuxInput() 158 recurrent_to_cell_weights_ptr, n_cell, n_output, output_state_ptr, in LstmStepWithAuxInput() 161 recurrent_to_output_weights_ptr, n_cell, n_output, output_state_ptr, in LstmStepWithAuxInput() 168 recurrent_to_input_weights_ptr, n_cell, n_output, output_state_ptr, in LstmStepWithAuxInput() 175 recurrent_to_forget_weights_ptr, n_cell, n_output, output_state_ptr, in LstmStepWithAuxInput() 182 recurrent_to_cell_weights_ptr, n_cell, n_output, output_state_ptr, in LstmStepWithAuxInput() 190 recurrent_to_output_weights_ptr, n_cell, n_output, output_state_ptr, in LstmStepWithAuxInput() 301 std::copy_n(projection_bias_ptr, n_output, in LstmStepWithAuxInput() [all …]
|
/external/tensorflow/tensorflow/lite/tools/optimize/calibration/builtin_logging_ops/ |
D | lstm.cc | 47 const int n_output, const int n_cell, in CalculateLstmGateFloat() argument 77 recurrent_to_gate_weights, n_cell, n_output, output_state, n_batch, gate); in CalculateLstmGateFloat() 124 int n_batch, int n_cell, int n_output, const float* cell_state, in CalculateLstmOutputCalibration() argument 142 tensor_utils::VectorBatchVectorAssign(projection_bias, n_output, n_batch, in CalculateLstmOutputCalibration() 145 std::fill_n(output_state, n_batch * n_output, 0.0f); in CalculateLstmOutputCalibration() 148 projection_weights, n_output, n_cell, scratch, n_batch, output_state); in CalculateLstmOutputCalibration() 150 tensor_utils::CwiseClipping(output_state, n_batch * n_output, proj_clip); in CalculateLstmOutputCalibration() 153 std::copy_n(scratch, n_batch * n_output, output_state); in CalculateLstmOutputCalibration() 181 int n_aux_input, int n_output, int output_batch_leading_dim, in LstmStepCalibration() 210 input_gate_bias_ptr, n_batch, n_input, n_aux_input, n_output, n_cell, in LstmStepCalibration() [all …]
|
/external/tensorflow/tensorflow/lite/delegates/nnapi/ |
D | nnapi_delegate_test.cc | 3092 LSTMOpModel(int n_batch, int n_input, int n_cell, int n_output, bool use_cifg, in LSTMOpModel() argument 3100 n_output_(n_output), in LSTMOpModel() 3459 const int n_output = 4; in TEST_F() local 3461 LSTMOpModel lstm(n_batch, n_input, n_cell, n_output, in TEST_F() 3474 {n_cell, n_output}, // recurrent_to_input_weight_tensor in TEST_F() 3475 {n_cell, n_output}, // recurrent_to_forget_weight_tensor in TEST_F() 3476 {n_cell, n_output}, // recurrent_to_cell_weight_tensor in TEST_F() 3477 {n_cell, n_output}, // recurrent_to_output_weight_tensor in TEST_F() 3491 {n_batch, n_output}, // activation_state tensor in TEST_F() 3523 const int n_output = 4; in TEST_F() local [all …]
|
/external/tensorflow/tensorflow/lite/kernels/internal/reference/ |
D | portable_tensor_utils.h | 126 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp, in MatrixBatchVectorMultiplyAccumulate() argument 130 n_output, output_zp, scratch, output, context); in MatrixBatchVectorMultiplyAccumulate() 136 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp, in MatrixBatchVectorMultiplyAccumulate() argument 140 n_output, output_zp, scratch, output, context); in MatrixBatchVectorMultiplyAccumulate() 166 int32_t n_hidden, int32_t n_output, in MatrixBatchVectorMultiply() argument 171 n_hidden, n_output, output_zp, proj_output); in MatrixBatchVectorMultiply()
|
D | portable_tensor_utils.cc | 296 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp, in PortableMatrixBatchVectorMultiplyAccumulateImpl() argument 301 for (int row = 0; row < n_output; ++row) { in PortableMatrixBatchVectorMultiplyAccumulateImpl() 310 acc += output[batch * n_output + row]; in PortableMatrixBatchVectorMultiplyAccumulateImpl() 317 output[batch * n_output + row] = static_cast<T>(acc); in PortableMatrixBatchVectorMultiplyAccumulateImpl() 325 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp, in PortableMatrixBatchVectorMultiplyAccumulate() argument 329 n_output, output_zp, output); in PortableMatrixBatchVectorMultiplyAccumulate() 335 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp, in PortableMatrixBatchVectorMultiplyAccumulate() argument 339 n_output, output_zp, output); in PortableMatrixBatchVectorMultiplyAccumulate() 378 int32_t n_output, int32_t output_zp, int8_t* proj_output) { in PortableMatrixBatchVectorMultiply() argument 382 for (int row = 0; row < n_output; ++row) { in PortableMatrixBatchVectorMultiply() [all …]
|
D | portable_tensor_utils_impl.h | 111 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp, 117 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp, 133 int32_t n_output, int32_t output_zp, int8_t* proj_output);
|
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/ |
D | neon_tensor_utils.h | 93 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp, in MatrixBatchVectorMultiplyAccumulate() argument 97 n_output, output_zp, scratch, output, context); in MatrixBatchVectorMultiplyAccumulate() 103 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp, in MatrixBatchVectorMultiplyAccumulate() argument 107 n_output, output_zp, scratch, output, context); in MatrixBatchVectorMultiplyAccumulate() 127 int32_t n_hidden, int32_t n_output, in MatrixBatchVectorMultiply() argument 132 n_hidden, n_output, output_zp, proj_output); in MatrixBatchVectorMultiply()
|
D | sse_tensor_utils.h | 102 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp, in MatrixBatchVectorMultiplyAccumulate() argument 106 shift, n_batch, n_input, n_output, output_zp, scratch, output, context); in MatrixBatchVectorMultiplyAccumulate() 112 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp, in MatrixBatchVectorMultiplyAccumulate() argument 116 shift, n_batch, n_input, n_output, output_zp, scratch, output, context); in MatrixBatchVectorMultiplyAccumulate() 136 int32_t n_hidden, int32_t n_output, in MatrixBatchVectorMultiply() argument 141 n_hidden, n_output, output_zp, proj_output); in MatrixBatchVectorMultiply()
|
D | neon_tensor_utils_impl.h | 93 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp, 99 int32_t n_batch, int32_t n_input, int32_t n_output, int32_t output_zp,
|
D | neon_tensor_utils.cc | 744 int32_t n_output, int32_t output_zp, in NeonMatrixBatchVectorMultiplyImpl() argument 782 for (int row = 0; row < n_output; ++row) { in NeonMatrixBatchVectorMultiplyImpl() 842 scratch[batch * n_output + row] = dotprod; in NeonMatrixBatchVectorMultiplyImpl() 853 int32_t multiplier, int32_t shift, int32_t n_batch, int32_t n_output, in NeonMatrixBatchVectorAccumulateImpl() argument 856 const int total_size = n_batch * n_output; in NeonMatrixBatchVectorAccumulateImpl() 906 int32_t multiplier, int32_t shift, int32_t n_batch, int32_t n_output, in NeonMatrixBatchVectorAccumulateImpl() argument 909 const int total_size = n_batch * n_output; in NeonMatrixBatchVectorAccumulateImpl() 981 int32_t n_input, int32_t n_output, int32_t output_zp, in NeonCpuBackendGemm() argument 989 lhs_params.rows = n_output; in NeonCpuBackendGemm() 1000 dst_params.rows = n_output; in NeonCpuBackendGemm() [all …]
|
D | sse_tensor_utils.cc | 178 int32_t n_input, int32_t n_output, int32_t output_zp, in SseCpuBackendGemm() argument 186 lhs_params.rows = n_output; in SseCpuBackendGemm() 197 dst_params.rows = n_output; in SseCpuBackendGemm()
|
/external/tensorflow/tensorflow/lite/kernels/internal/ |
D | tensor_utils.h | 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/compiler/mlir/lite/utils/ |
D | lstm_utils.cc | 682 const int n_output = recurrent_kernel_type.getDimSize(0); in ConvertKerasLSTMLayer() local 712 output_shape = {time, batch, n_output}; in ConvertKerasLSTMLayer() 714 output_shape = {batch, time, n_output}; in ConvertKerasLSTMLayer() 771 SmallVector<int64_t, 2> last_output_shape({batch, n_output}); in ConvertKerasLSTMLayer()
|