Home
last modified time | relevance | path

Searched refs:lstm (Results 1 – 25 of 94) sorted by relevance

1234

/external/tensorflow/tensorflow/lite/kernels/
Dbidirectional_sequence_lstm_test.cc440 BidirectionalLSTMOpModel lstm( in TEST_P() local
513 lstm.SetInputToInputWeights({-0.45018822, -0.02338299, -0.0870589, in TEST_P()
517 lstm.SetInputToCellWeights({-0.50013041, 0.1370284, 0.11810488, 0.2013163, in TEST_P()
521 lstm.SetInputToForgetWeights({0.09701663, 0.20334584, -0.50592935, in TEST_P()
525 lstm.SetInputToOutputWeights({-0.25065863, -0.28290087, 0.04613829, in TEST_P()
529 lstm.SetInputGateBias({0., 0., 0., 0.}); in TEST_P()
531 lstm.SetCellBias({0., 0., 0., 0.}); in TEST_P()
533 lstm.SetForgetGateBias({1., 1., 1., 1.}); in TEST_P()
535 lstm.SetOutputGateBias({0., 0., 0., 0.}); in TEST_P()
537 lstm.SetRecurrentToInputWeights( in TEST_P()
[all …]
Dunidirectional_sequence_lstm_test.cc390 UnidirectionalLSTMOpModel* lstm, float tolerance = 1e-5, in VerifyGoldens() argument
394 const int num_inputs = lstm->num_inputs(); in VerifyGoldens()
405 lstm->SetInput(((i * num_batches) + b) * num_inputs, batch_start, in VerifyGoldens()
414 lstm->SetInput(b * input_sequence_size * num_inputs, batch_start, in VerifyGoldens()
419 lstm->Invoke(); in VerifyGoldens()
421 const int num_outputs = lstm->num_outputs(); in VerifyGoldens()
443 EXPECT_THAT(lstm->GetOutput(), in VerifyGoldens()
507 UnidirectionalLSTMOpModel lstm( in TEST_F() local
542 lstm.SetInputToInputWeights(input_to_input_weights_); in TEST_F()
543 lstm.SetInputToCellWeights(input_to_cell_weights_); in TEST_F()
[all …]
Dlstm_test.cc341 void VerifyGoldens(LSTMOpModel* lstm, float tolerance) { in VerifyGoldens() argument
345 SetAllWeightsAndBiases(lstm); in VerifyGoldens()
346 lstm->ApplyDelegate(); in VerifyGoldens()
348 const int num_inputs = lstm->num_inputs(); in VerifyGoldens()
349 const int num_outputs = lstm->num_outputs(); in VerifyGoldens()
350 const int num_batches = lstm->num_batches(); in VerifyGoldens()
361 lstm->SetInput(b * num_inputs, batch_start, batch_end); in VerifyGoldens()
364 lstm->Invoke(); in VerifyGoldens()
375 EXPECT_THAT(lstm->GetOutput(), in VerifyGoldens()
383 void SetAllWeightsAndBiases(LSTMOpModel* lstm) { in SetAllWeightsAndBiases() argument
[all …]
Dunidirectional_sequence_lstm.cc58 GetVariableInput(context, node, lstm::full::kCellStateTensor); in PopulateQuantizedLstmParams8x8_16()
63 GetOutputSafe(context, node, lstm::full::kOutputTensor, &output_tensor)); in PopulateQuantizedLstmParams8x8_16()
89 context, GetInputSafe(context, node, lstm::full::kInputTensor, &input)); in PopulateQuantizedLstmParams8x8_16()
92 context, node, lstm::full::kInputToInputWeightsTensor); in PopulateQuantizedLstmParams8x8_16()
96 GetInputSafe(context, node, lstm::full::kInputToForgetWeightsTensor, in PopulateQuantizedLstmParams8x8_16()
100 lstm::full::kInputToCellWeightsTensor, in PopulateQuantizedLstmParams8x8_16()
105 GetInputSafe(context, node, lstm::full::kInputToOutputWeightsTensor, in PopulateQuantizedLstmParams8x8_16()
109 context, node, lstm::full::kRecurrentToInputWeightsTensor); in PopulateQuantizedLstmParams8x8_16()
113 GetInputSafe(context, node, lstm::full::kRecurrentToForgetWeightsTensor, in PopulateQuantizedLstmParams8x8_16()
118 GetInputSafe(context, node, lstm::full::kRecurrentToCellWeightsTensor, in PopulateQuantizedLstmParams8x8_16()
[all …]
Doptional_tensor_test.cc235 LSTMOpModel lstm(n_batch, n_input, n_cell, n_output, in TEST() local
266 lstm.SetInputToCellWeights({-0.49770179, -0.27711356, -0.09624726, 0.05100781, in TEST()
270 lstm.SetInputToForgetWeights({-0.55291498, -0.42866567, 0.13056988, in TEST()
274 lstm.SetInputToOutputWeights({0.10725588, -0.02335852, -0.55932593, in TEST()
278 lstm.SetCellBias({0., 0., 0., 0.}); in TEST()
280 lstm.SetForgetGateBias({1., 1., 1., 1.}); in TEST()
282 lstm.SetOutputGateBias({0., 0., 0., 0.}); in TEST()
284 lstm.SetRecurrentToCellWeights( in TEST()
290 lstm.SetRecurrentToForgetWeights( in TEST()
295 lstm.SetRecurrentToOutputWeights( in TEST()
[all …]
Dquant_basic_lstm_test.cc168 QuantizedLSTMOpModel* lstm) { in VerifyGoldens() argument
171 const int inputSize = lstm->inputSize(); in VerifyGoldens()
182 lstm->setInput(inputStep); in VerifyGoldens()
183 lstm->Invoke(); in VerifyGoldens()
185 const int outputSize = lstm->outputSize(); in VerifyGoldens()
192 EXPECT_THAT(lstm->getOutput(), ElementsAreArray(expected)); in VerifyGoldens()
210 QuantizedLSTMOpModel lstm( in TEST_P() local
277 VerifyGoldens(lstmInput, lstmGoldenOutput, &lstm); in TEST_P()
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Dload_quantization_recipe.cc50 void Initialize(LSTMOp lstm, OpBuilder* builder);
63 void LoadForLSTMOp(LSTMOp lstm, OpBuilder* builder);
73 void LoadQuantizationRecipe::Initialize(LSTMOp lstm, OpBuilder* builder) { in Initialize() argument
75 lstm.input().getType().cast<ShapedType>().getElementType(); in Initialize()
92 int8 = any_int8.castFromExpressedType(lstm.input().getType()); in Initialize()
93 int16 = any_int16.castFromExpressedType(lstm.input().getType()); in Initialize()
141 void LoadQuantizationRecipe::LoadForLSTMOp(LSTMOp lstm, OpBuilder* builder) { in LoadForLSTMOp() argument
142 Initialize(lstm, builder); in LoadForLSTMOp()
147 Location loc = lstm.getLoc(); in LoadForLSTMOp()
152 loc, lstm.input(), lstm.input_to_input_weights(), in LoadForLSTMOp()
[all …]
/external/tensorflow/tensorflow/lite/delegates/gpu/cl/kernels/
Dlstm_full_test.cc228 void VerifyGoldens(LSTMOpModel* lstm, float tolerance) { in VerifyGoldens() argument
229 EXPECT_EQ(lstm->ApplyDelegate(), kTfLiteOk); in VerifyGoldens()
231 const int num_inputs = lstm->num_inputs(); in VerifyGoldens()
232 const int num_outputs = lstm->num_outputs(); in VerifyGoldens()
233 const int num_batches = lstm->num_batches(); in VerifyGoldens()
244 lstm->SetInput(b * num_inputs, batch_start, batch_end); in VerifyGoldens()
247 lstm->Invoke(); in VerifyGoldens()
258 EXPECT_THAT(lstm->GetOutput(), in VerifyGoldens()
318 LSTMOpModel lstm( in TEST_P() local
335 VerifyGoldens(&lstm, 0.00001f); in TEST_P()
[all …]
/external/tensorflow/tensorflow/lite/delegates/gpu/common/
Dlstm_parser.cc76 node, tflite::ops::builtin::lstm::full::kInputToInputWeightsTensor); in HasCifg()
83 node, tflite::ops::builtin::lstm::full::kCellToForgetWeightsTensor); in HasPeephole()
89 tflite::ops::builtin::lstm::full::kForgetLayerNormCoefficientsTensor); in HasNormalization()
94 tflite::ops::builtin::lstm::full::kProjectionWeightsTensor); in HasProjection()
137 reader->AddInput(node, tflite::ops::builtin::lstm::full::kInputTensor)); in BuildLstmGate()
256 tflite::ops::builtin::lstm::full::kCellStateTensor, &cell_state)); in BuildCellStateUpdate()
382 tflite::ops::builtin::lstm::full::kProjectionWeightsTensor, reader, in BuildOutputStateUpdate()
386 ->ReadTensor(tflite::ops::builtin::lstm::full::kProjectionBiasTensor, in BuildOutputStateUpdate()
454 tflite::ops::builtin::lstm::full::kCellStateTensor, &old_cell_state)); in ParseLSTMAttributes()
463 tflite::ops::builtin::lstm::full::kOutputStateTensor, &old_output_state)); in ParseLSTMAttributes()
[all …]
/external/tensorflow/tensorflow/lite/tools/optimize/calibration/builtin_logging_ops/
Dlstm.cc470 ops::builtin::lstm::full::kInputTensor, &input)); in lstm_eval()
473 context, node, ops::builtin::lstm::full::kInputToInputWeightsTensor); in lstm_eval()
478 ops::builtin::lstm::full::kInputToForgetWeightsTensor, in lstm_eval()
483 ops::builtin::lstm::full::kInputToCellWeightsTensor, in lstm_eval()
489 ops::builtin::lstm::full::kInputToOutputWeightsTensor, in lstm_eval()
493 context, node, ops::builtin::lstm::full::kRecurrentToInputWeightsTensor); in lstm_eval()
498 ops::builtin::lstm::full::kRecurrentToForgetWeightsTensor, in lstm_eval()
504 ops::builtin::lstm::full::kRecurrentToCellWeightsTensor, in lstm_eval()
510 ops::builtin::lstm::full::kRecurrentToOutputWeightsTensor, in lstm_eval()
514 context, node, ops::builtin::lstm::full::kCellToInputWeightsTensor); in lstm_eval()
[all …]
/external/tensorflow/tensorflow/lite/tools/optimize/calibration/custom_logging_ops/
Dlstm.cc537 GetInput(context, node, ops::builtin::lstm::full::kInputTensor); in lstm_eval()
540 context, node, ops::builtin::lstm::full::kInputToInputWeightsTensor); in lstm_eval()
542 context, node, ops::builtin::lstm::full::kInputToForgetWeightsTensor); in lstm_eval()
544 context, node, ops::builtin::lstm::full::kInputToCellWeightsTensor); in lstm_eval()
546 context, node, ops::builtin::lstm::full::kInputToOutputWeightsTensor); in lstm_eval()
549 context, node, ops::builtin::lstm::full::kRecurrentToInputWeightsTensor); in lstm_eval()
551 context, node, ops::builtin::lstm::full::kRecurrentToForgetWeightsTensor); in lstm_eval()
553 context, node, ops::builtin::lstm::full::kRecurrentToCellWeightsTensor); in lstm_eval()
555 context, node, ops::builtin::lstm::full::kRecurrentToOutputWeightsTensor); in lstm_eval()
558 context, node, ops::builtin::lstm::full::kCellToInputWeightsTensor); in lstm_eval()
[all …]
/external/tensorflow/tensorflow/lite/delegates/nnapi/
Dnnapi_delegate_test.cc3375 LSTMOpModel* lstm, float tolerance = 1e-5) { in VerifyGoldens() argument
3378 const int num_inputs = lstm->num_inputs(); in VerifyGoldens()
3387 lstm->SetInput(b * lstm->num_inputs(), batch_start, batch_end); in VerifyGoldens()
3390 lstm->Invoke(); in VerifyGoldens()
3392 const int num_outputs = lstm->num_outputs(); in VerifyGoldens()
3399 EXPECT_THAT(lstm->GetOutput(), in VerifyGoldens()
3461 LSTMOpModel lstm(n_batch, n_input, n_cell, n_output, in TEST_F() local
3496 lstm.SetInputToInputWeights(input_to_input_weights_); in TEST_F()
3497 lstm.SetInputToCellWeights(input_to_cell_weights_); in TEST_F()
3498 lstm.SetInputToForgetWeights(input_to_forget_weights_); in TEST_F()
[all …]
/external/tensorflow/tensorflow/compiler/tests/
Dlstm_test.py27 from tensorflow.compiler.tests import lstm
80 weights = init_weights(lstm.LSTMCellWeightsShape(num_inputs, num_nodes))
86 m, c = lstm.LSTMCell(weights, m_prev, c_prev, x, pad)
144 weights = array_ops.zeros(lstm.LSTMCellWeightsShape(num_inputs, num_nodes))
151 lstm.LSTMLayer('lstm', weights, m, c, x_seq, [pad])
153 lstm.LSTMLayer('lstm', weights, m, c, x_seq, [pad] * 2)
155 lstm.LSTMLayer('lstm', weights, m, c, x_seq, [pad] * 4)
164 weights = init_weights(lstm.LSTMCellWeightsShape(num_inputs, num_nodes))
171 out_seq = lstm.LSTMLayer('lstm', weights, m_init, c_init, x_seq, pad_seq)
242 out_seq, weights = lstm.BuildLSTMLayer(FLAGS.batch_size, FLAGS.seq_length,
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v1/
DCudnnRNNV3.pbtxt58 s: "lstm"
64 s: "lstm"
183 s: "lstm"
189 s: "lstm"
315 s: "lstm"
321 s: "lstm"
DCudnnRNNParamsSize.pbtxt44 s: "lstm"
50 s: "lstm"
147 s: "lstm"
153 s: "lstm"
DCudnnRNNBackpropV3.pbtxt86 s: "lstm"
92 s: "lstm"
232 s: "lstm"
238 s: "lstm"
385 s: "lstm"
391 s: "lstm"
DCudnnRNNParamsToCanonical.pbtxt50 s: "lstm"
56 s: "lstm"
DCudnnRNNCanonicalToParams.pbtxt50 s: "lstm"
56 s: "lstm"
/external/gemmlowp/test/
Dbenchmark_meta_gemm.cc292 std::vector<Shape> lstm; in main() local
293 lstm.push_back(Shape(1, 500, 320)); in main()
294 lstm.push_back(Shape(1, 100, 500)); in main()
295 lstm.push_back(Shape(1, 500, 500)); in main()
296 lstm.push_back(Shape(1, 500, 100)); in main()
297 lstm.push_back(Shape(1, 2000, 100)); in main()
299 for (auto& shape : lstm) { in main()
327 for (auto& shape : lstm) { in main()
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v2/
DCudnnRNNParamsSize.pbtxt44 s: "lstm"
50 s: "lstm"
147 s: "lstm"
153 s: "lstm"
DCudnnRNNV3.pbtxt58 s: "lstm"
64 s: "lstm"
183 s: "lstm"
189 s: "lstm"
DCudnnRNNBackpropV3.pbtxt86 s: "lstm"
92 s: "lstm"
232 s: "lstm"
238 s: "lstm"
DCudnnRNNParamsToCanonical.pbtxt50 s: "lstm"
56 s: "lstm"
/external/tensorflow/tensorflow/lite/tools/optimize/calibration/
DBUILD14 srcs = ["builtin_logging_ops/lstm.cc"],
15 hdrs = ["builtin_logging_ops/lstm.h"],
34 srcs = ["custom_logging_ops/lstm.cc"],
35 hdrs = ["custom_logging_ops/lstm.h"],
88 "//tensorflow/lite:testdata/lstm.bin",
/external/tensorflow/tensorflow/lite/micro/examples/magic_wand/train/
Dtrain_test.py49 lstm, lstm_path = build_lstm(self.seq_length)
53 lstm_prob = lstm(tf.constant(lstm_data, dtype="float32")).numpy()
55 self.assertIsInstance(lstm, tf.keras.Sequential)

1234