/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 42 n_fw_cell_(n_cell), in BidirectionalLSTMOpModel() 43 n_bw_cell_(n_cell), in BidirectionalLSTMOpModel() 433 const int n_cell = 4; in TEST_P() local 441 n_batch, n_input, n_cell, n_output, sequence_length, /*use_cifg=*/false, in TEST_P() 450 {n_cell, n_input}, // input_to_input_weight tensor in TEST_P() 451 {n_cell, n_input}, // input_to_forget_weight tensor in TEST_P() 452 {n_cell, n_input}, // input_to_cell_weight tensor in TEST_P() 453 {n_cell, n_input}, // input_to_output_weight tensor in TEST_P() 455 {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 43 n_cell_(n_cell), 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() 503 const int n_cell = 4; in TEST_F() local 508 n_batch, n_input, n_cell, n_output, sequence_length, in TEST_F() 516 {n_cell, n_input}, // input_to_input_weight tensor in TEST_F() 517 {n_cell, n_input}, // input_to_forget_weight tensor in TEST_F() 518 {n_cell, n_input}, // input_to_cell_weight tensor in TEST_F() 519 {n_cell, n_input}, // input_to_output_weight tensor in TEST_F() [all …]
|
D | lstm_eval.cc | 48 int32_t* projection_weights_row_sums, int32_t* row_sums, int n_cell, in ComputeRowSums() argument 67 input_to_input_row_sums, n_cell, n_input); in ComputeRowSums() 70 input_to_forget_row_sums, n_cell, n_input); in ComputeRowSums() 72 input_to_cell_row_sums, n_cell, n_input); in ComputeRowSums() 74 input_to_output_row_sums, n_cell, n_input); in ComputeRowSums() 79 aux_input_to_input_row_sums, n_cell, in ComputeRowSums() 83 aux_input_to_forget_row_sums, n_cell, in ComputeRowSums() 86 aux_input_to_cell_row_sums, n_cell, in ComputeRowSums() 89 aux_input_to_output_row_sums, n_cell, in ComputeRowSums() 94 recurrent_to_input_row_sums, n_cell, in ComputeRowSums() [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 37 n_cell_(n_cell), in LSTMOpModel() 232 const int n_cell = 4; in TEST() local 235 LSTMOpModel lstm(n_batch, n_input, n_cell, n_output, in TEST() 244 {n_cell, n_input}, // input_to_forget_weight tensor in TEST() 245 {n_cell, n_input}, // input_to_cell_weight tensor in TEST() 246 {n_cell, n_input}, // input_to_output_weight tensor 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() [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 53 input_to_input_weights_ = AddInput({weight_type, {n_cell, n_input}}); in LSTMOpModel() 55 input_to_forget_weights_ = AddInput({weight_type, {n_cell, n_input}}); in LSTMOpModel() 56 input_to_cell_weights_ = AddInput({weight_type, {n_cell, n_input}}); in LSTMOpModel() 57 input_to_output_weights_ = AddInput({weight_type, {n_cell, n_input}}); 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() 72 cell_to_input_weights_ = AddInput({weight_type, {n_cell}}); in LSTMOpModel() [all …]
|
D | unidirectional_sequence_lstm.cc | 411 int n_output, int n_cell, in CheckInputTensorDimensions() argument 425 TF_LITE_ENSURE_EQ(context, input_to_input_weights->dims->data[0], n_cell); in CheckInputTensorDimensions() 435 TF_LITE_ENSURE_EQ(context, input_to_forget_weights->dims->data[0], n_cell); in CheckInputTensorDimensions() 443 TF_LITE_ENSURE_EQ(context, input_to_cell_weights->dims->data[0], n_cell); in CheckInputTensorDimensions() 451 n_cell); in CheckInputTensorDimensions() 463 n_cell); in CheckInputTensorDimensions() 473 TF_LITE_ENSURE_EQ(context, recurrent_to_cell_weights->dims->data[0], n_cell); in CheckInputTensorDimensions() 490 TF_LITE_ENSURE_EQ(context, cell_to_input_weights->dims->data[0], n_cell); in CheckInputTensorDimensions() 500 TF_LITE_ENSURE_EQ(context, cell_to_forget_weights->dims->data[0], n_cell); in CheckInputTensorDimensions() 510 TF_LITE_ENSURE_EQ(context, cell_to_output_weights->dims->data[0], n_cell); in CheckInputTensorDimensions() [all …]
|
D | bidirectional_sequence_lstm.cc | 177 int n_cell, int input_to_input_weights_tensor, in CheckLstmTensorDimensionsAndTypes() argument 201 TF_LITE_ENSURE_EQ(context, input_to_forget_weights->dims->data[0], n_cell); in CheckLstmTensorDimensionsAndTypes() 211 TF_LITE_ENSURE_EQ(context, input_to_input_weights->dims->data[0], n_cell); in CheckLstmTensorDimensionsAndTypes() 222 TF_LITE_ENSURE_EQ(context, input_to_cell_weights->dims->data[0], n_cell); in CheckLstmTensorDimensionsAndTypes() 232 TF_LITE_ENSURE_EQ(context, input_to_output_weights->dims->data[0], n_cell); in CheckLstmTensorDimensionsAndTypes() 242 n_cell); in CheckLstmTensorDimensionsAndTypes() 255 n_cell); in CheckLstmTensorDimensionsAndTypes() 266 TF_LITE_ENSURE_EQ(context, recurrent_to_cell_weights->dims->data[0], n_cell); in CheckLstmTensorDimensionsAndTypes() 285 TF_LITE_ENSURE_EQ(context, cell_to_input_weights->dims->data[0], n_cell); in CheckLstmTensorDimensionsAndTypes() 294 TF_LITE_ENSURE_EQ(context, cell_to_forget_weights->dims->data[0], n_cell); in CheckLstmTensorDimensionsAndTypes() [all …]
|
D | lstm.cc | 854 int n_output, int n_cell, in CheckInputTensorDimensions() argument 869 TF_LITE_ENSURE_EQ(context, input_to_forget_weights->dims->data[0], n_cell); in CheckInputTensorDimensions() 880 TF_LITE_ENSURE_EQ(context, input_to_input_weights->dims->data[0], n_cell); in CheckInputTensorDimensions() 891 TF_LITE_ENSURE_EQ(context, input_to_cell_weights->dims->data[0], n_cell); in CheckInputTensorDimensions() 901 n_cell); in CheckInputTensorDimensions() 914 n_cell); in CheckInputTensorDimensions() 925 TF_LITE_ENSURE_EQ(context, recurrent_to_cell_weights->dims->data[0], n_cell); in CheckInputTensorDimensions() 944 TF_LITE_ENSURE_EQ(context, cell_to_input_weights->dims->data[0], n_cell); in CheckInputTensorDimensions() 954 TF_LITE_ENSURE_EQ(context, cell_to_forget_weights->dims->data[0], n_cell); in CheckInputTensorDimensions() 964 TF_LITE_ENSURE_EQ(context, cell_to_output_weights->dims->data[0], n_cell); in CheckInputTensorDimensions() [all …]
|
/external/tensorflow/tensorflow/lite/tools/optimize/calibration/custom_logging_ops/ |
D | lstm.cc | 63 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() 87 tensor_utils::VectorBatchVectorAssign(input_gate_bias_ptr, n_cell, 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/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 70 AddConstInput({weight_type, {n_cell, n_input}}, input_to_input_weights); in LSTMOpModel() 72 AddConstInput({weight_type, {n_cell, n_input}}, input_to_forget_weights); in LSTMOpModel() 73 AddConstInput({weight_type, {n_cell, n_input}}, input_to_cell_weights); in LSTMOpModel() 74 AddConstInput({weight_type, {n_cell, n_input}}, input_to_output_weights); 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() 92 AddConstInput({weight_type, {n_cell}}, cell_to_input_weights); in LSTMOpModel() [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 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() 72 n_cell, n_aux_input, 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() 85 logger->LogTensorValue(intermediate_tensor_index, gate, n_cell * n_batch, in CalculateLstmGateFloat() 88 tensor_utils::MeanStddevNormalization(gate, gate, n_cell, n_batch); in CalculateLstmGateFloat() 89 tensor_utils::VectorBatchVectorCwiseProduct(layer_norm_coefficients, n_cell, in CalculateLstmGateFloat() [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 3099 n_cell_(n_cell), in LSTMOpModel() 3458 const int n_cell = 4; in TEST_F() local 3461 LSTMOpModel lstm(n_batch, n_input, n_cell, n_output, in TEST_F() 3469 {n_cell, n_input}, // input_to_input_weight tensor in TEST_F() 3470 {n_cell, n_input}, // input_to_forget_weight tensor in TEST_F() 3471 {n_cell, n_input}, // input_to_cell_weight tensor in TEST_F() 3472 {n_cell, n_input}, // input_to_output_weight tensor 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() [all …]
|
/external/tensorflow/tensorflow/lite/kernels/internal/reference/ |
D | portable_tensor_utils.h | 153 int32_t n_batch, int32_t n_input, int32_t n_cell, in MatrixBatchVectorMultiply() argument 158 n_input, n_cell, gate_output, gate_output_zp); in MatrixBatchVectorMultiply() 309 int32_t n_cell, int16_t* output) { in TwoGateSaturatingAdd() argument 313 recurrent_effective_scale_b, n_batch, n_cell, output); in TwoGateSaturatingAdd()
|
D | portable_tensor_utils_impl.h | 126 int32_t n_cell, int8_t* gate_output, 228 int32_t n_batch, int32_t n_cell,
|
D | portable_tensor_utils.cc | 348 int32_t n_cell, int8_t* gate_output, in PortableMatrixBatchVectorMultiply() argument 353 for (int row = 0; row < n_cell; ++row) { in PortableMatrixBatchVectorMultiply() 369 gate_output[batch * n_cell + row] = static_cast<int8_t>(acc); in PortableMatrixBatchVectorMultiply() 750 int32_t n_batch, int32_t n_cell, in PortableTwoGateSaturatingAdd() argument 754 for (int i = 0; i < n_batch * n_cell; ++i) { in PortableTwoGateSaturatingAdd()
|
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/ |
D | neon_tensor_utils.h | 114 int32_t n_batch, int32_t n_input, int32_t n_cell, in MatrixBatchVectorMultiply() argument 119 n_input, n_cell, gate_output, gate_output_zp); in MatrixBatchVectorMultiply() 306 int32_t n_cell, int16_t* output) { in TwoGateSaturatingAdd() argument 310 recurrent_effective_scale_b, n_batch, n_cell, output); in TwoGateSaturatingAdd()
|
D | sse_tensor_utils.h | 123 int32_t n_batch, int32_t n_input, int32_t n_cell, in MatrixBatchVectorMultiply() argument 128 n_input, n_cell, gate_output, gate_output_zp); in MatrixBatchVectorMultiply() 315 int32_t n_cell, int16_t* output) { in TwoGateSaturatingAdd() argument 319 recurrent_effective_scale_b, n_batch, n_cell, output); in TwoGateSaturatingAdd()
|
/external/tensorflow/tensorflow/lite/kernels/internal/ |
D | tensor_utils_common.h | 163 int32_t n_batch, int32_t n_input, int32_t n_cell, 461 int32_t n_cell, int16_t* output);
|
D | tensor_utils_test.cc | 1980 int32_t n_cell, int16_t* output);
|
/external/tensorflow/tensorflow/compiler/mlir/lite/ir/ |
D | tfl_ops.cc | 2028 const int n_cell = input_to_output_weights.getDimSize(0); in Verify() local 2037 (state_size != n_batch * n_cell) || in Verify() 2040 (recurrent_to_output_weights.getDimSize(0) != n_cell) || in Verify() 2054 forget_layer_norm_coefficients.getDimSize(0) != n_cell) in Verify()
|