Lines Matching refs:lstm
280 LSTMOpModel lstm(n_batch, n_input, n_cell, n_output, in TEST() local
311 lstm.SetInputToInputWeights({-0.45018822, -0.02338299, -0.0870589, -0.34550029, 0.04266912, in TEST()
314 lstm.SetInputToCellWeights({-0.50013041, 0.1370284, 0.11810488, 0.2013163, -0.20583314, in TEST()
317 lstm.SetInputToForgetWeights({0.09701663, 0.20334584, -0.50592935, -0.31343272, -0.40032279, in TEST()
320 lstm.SetInputToOutputWeights({-0.25065863, -0.28290087, 0.04613829, 0.40525138, 0.44272184, in TEST()
323 lstm.SetInputGateBias({0., 0., 0., 0.}); in TEST()
325 lstm.SetCellGateBias({0., 0., 0., 0.}); in TEST()
327 lstm.SetForgetGateBias({1., 1., 1., 1.}); in TEST()
329 lstm.SetOutputGateBias({0., 0., 0., 0.}); in TEST()
331 lstm.SetRecurrentToInputWeights({-0.0063535, -0.2042388, 0.31454784, -0.35746509, 0.28902304, in TEST()
336 lstm.SetRecurrentToCellWeights({-0.3407414, 0.24443203, -0.2078532, 0.26320225, 0.05695659, in TEST()
341 lstm.SetRecurrentToForgetWeights({-0.48684245, -0.06655136, 0.42224967, 0.2112639, 0.27654213, in TEST()
346 lstm.SetRecurrentToOutputWeights({0.43385774, -0.17194885, 0.2718237, 0.09215671, 0.24107647, in TEST()
357 lstm.ResetCellState(); in TEST()
358 lstm.ResetOutputState(); in TEST()
360 const int input_sequence_size = sizeof(lstm_input) / sizeof(float) / (lstm.num_inputs()); in TEST()
362 float* batch0_start = lstm_input + i * lstm.num_inputs(); in TEST()
363 float* batch0_end = batch0_start + lstm.num_inputs(); in TEST()
365 lstm.SetInput(0, batch0_start, batch0_end); in TEST()
367 lstm.Invoke(); in TEST()
369 float* golden_start = lstm_golden_output + i * lstm.num_outputs(); in TEST()
370 float* golden_end = golden_start + lstm.num_outputs(); in TEST()
373 EXPECT_THAT(lstm.GetOutput(), ElementsAreArray(ArrayFloatNear(expected))); in TEST()
384 LSTMOpModel lstm(n_batch, n_input, n_cell, n_output, in TEST() local
415 lstm.SetInputToCellWeights({-0.49770179, -0.27711356, -0.09624726, 0.05100781, 0.04717243, in TEST()
418 lstm.SetInputToForgetWeights({-0.55291498, -0.42866567, 0.13056988, -0.3633365, -0.22755712, in TEST()
421 lstm.SetInputToOutputWeights({0.10725588, -0.02335852, -0.55932593, -0.09426838, -0.44257352, in TEST()
424 lstm.SetCellGateBias({0., 0., 0., 0.}); in TEST()
426 lstm.SetForgetGateBias({1., 1., 1., 1.}); in TEST()
428 lstm.SetOutputGateBias({0., 0., 0., 0.}); in TEST()
430 lstm.SetRecurrentToCellWeights({0.54066205, -0.32668582, -0.43562764, -0.56094903, 0.42957711, in TEST()
435 lstm.SetRecurrentToForgetWeights({-0.13832897, -0.0515101, -0.2359007, -0.16661474, -0.14340827, in TEST()
440 lstm.SetRecurrentToOutputWeights({0.41613156, 0.42610586, -0.16495961, -0.5663873, 0.30579174, in TEST()
445 lstm.SetCellToForgetWeights({0.47485286, -0.51955009, -0.24458408, 0.31544167}); in TEST()
446 lstm.SetCellToOutputWeights({-0.17135078, 0.82760304, 0.85573703, -0.77109635}); in TEST()
454 lstm.ResetCellState(); in TEST()
455 lstm.ResetOutputState(); in TEST()
457 const int input_sequence_size = sizeof(lstm_input) / sizeof(float) / (lstm.num_inputs()); in TEST()
459 float* batch0_start = lstm_input + i * lstm.num_inputs(); in TEST()
460 float* batch0_end = batch0_start + lstm.num_inputs(); in TEST()
462 lstm.SetInput(0, batch0_start, batch0_end); in TEST()
464 lstm.Invoke(); in TEST()
466 float* golden_start = lstm_golden_output + i * lstm.num_outputs(); in TEST()
467 float* golden_end = golden_start + lstm.num_outputs(); in TEST()
470 EXPECT_THAT(lstm.GetOutput(), ElementsAreArray(ArrayFloatNear(expected))); in TEST()
480 LSTMOpModel lstm(n_batch, n_input, n_cell, n_output, in TEST() local
511 lstm.SetInputToInputWeights( in TEST()
530 lstm.SetInputToForgetWeights( in TEST()
549 lstm.SetInputToCellWeights( in TEST()
568 lstm.SetInputToOutputWeights( in TEST()
587 lstm.SetInputGateBias({0.02234832, 0.14757581, 0.18176508, 0.10380666, 0.053110216, in TEST()
592 lstm.SetForgetGateBias({0.035185695, -0.042891346, -0.03032477, 0.23027696, 0.11098921, in TEST()
597 lstm.SetCellGateBias({-0.024379363, 0.0055531194, 0.23377132, 0.033463873, -0.1483596, in TEST()
602 lstm.SetOutputGateBias({0.046159424, -0.0012809046, 0.03563469, 0.12648113, 0.027195795, in TEST()
607 lstm.SetRecurrentToInputWeights( in TEST()
673 lstm.SetRecurrentToForgetWeights( in TEST()
739 lstm.SetRecurrentToCellWeights( in TEST()
805 lstm.SetRecurrentToOutputWeights({ in TEST()
872 lstm.SetCellToInputWeights({0.040369894, 0.030746894, 0.24704495, 0.018586371, -0.037586458, in TEST()
877 lstm.SetCellToForgetWeights({-0.01998659, -0.15568835, -0.24248174, -0.012770197, in TEST()
883 lstm.SetCellToOutputWeights({0.08286371, -0.08261836, -0.51210177, 0.002913762, 0.17764764, in TEST()
888 lstm.SetProjectionWeights( in TEST()
982 lstm.ResetCellState(); in TEST()
983 lstm.ResetOutputState(); in TEST()
985 const int input_sequence_size = sizeof(lstm_input[0]) / sizeof(float) / (lstm.num_inputs()); in TEST()
987 float* batch0_start = lstm_input[0] + i * lstm.num_inputs(); in TEST()
988 float* batch0_end = batch0_start + lstm.num_inputs(); in TEST()
990 lstm.SetInput(0, batch0_start, batch0_end); in TEST()
992 float* batch1_start = lstm_input[1] + i * lstm.num_inputs(); in TEST()
993 float* batch1_end = batch1_start + lstm.num_inputs(); in TEST()
994 lstm.SetInput(lstm.num_inputs(), batch1_start, batch1_end); in TEST()
996 lstm.Invoke(); in TEST()
998 float* golden_start_batch0 = lstm_golden_output[0] + i * lstm.num_outputs(); in TEST()
999 float* golden_end_batch0 = golden_start_batch0 + lstm.num_outputs(); in TEST()
1000 float* golden_start_batch1 = lstm_golden_output[1] + i * lstm.num_outputs(); in TEST()
1001 float* golden_end_batch1 = golden_start_batch1 + lstm.num_outputs(); in TEST()
1005 EXPECT_THAT(lstm.GetOutput(), ElementsAreArray(ArrayFloatNear(expected))); in TEST()