@@ -72,6 +72,8 @@ void LSTMSequenceTest::SetUp() {
72
72
ov::element::Type model_type;
73
73
std::tie (mode, seq_lengths, batch, hidden_size, input_size, activations, clip, direction,
74
74
WRBType, model_type, targetDevice) = this ->GetParam ();
75
+
76
+ max_seq_lengths = seq_lengths;
75
77
size_t num_directions = direction == ov::op::RecurrentSequenceDirection::BIDIRECTIONAL ? 2 : 1 ;
76
78
std::vector<ov::Shape> inputShapes = {
77
79
{batch, seq_lengths, input_size},
@@ -115,7 +117,7 @@ void LSTMSequenceTest::SetUp() {
115
117
seq_lengths_node->set_friendly_name (" seq_lengths" );
116
118
params.push_back (param);
117
119
} else if (mode == SequenceTestsMode::CONVERT_TO_TI_RAND_SEQ_LEN_CONST ||
118
- mode == SequenceTestsMode::PURE_SEQ_RAND_SEQ_LEN_CONST) {
120
+ mode == SequenceTestsMode::PURE_SEQ_RAND_SEQ_LEN_CONST) {
119
121
ov::test::utils::InputGenerateData in_data;
120
122
in_data.start_from = 0 ;
121
123
in_data.range = seq_lengths;
@@ -174,5 +176,26 @@ void LSTMSequenceTest::SetUp() {
174
176
EXPECT_EQ (ti_found, false );
175
177
}
176
178
}
179
+
180
+ void LSTMSequenceTest::generate_inputs (const std::vector<ov::Shape>& targetInputStaticShapes) {
181
+ inputs.clear ();
182
+ const auto & func_inputs = function->inputs ();
183
+ ov::test::utils::InputGenerateData in_data;
184
+ in_data.start_from = 0 ;
185
+ in_data.range = 10 ;
186
+
187
+ for (size_t i = 0 ; i < func_inputs.size (); ++i) {
188
+ ov::Tensor tensor;
189
+
190
+ if (i == 3 ) {
191
+ in_data.range = max_seq_lengths;
192
+ } else {
193
+ in_data.range = 10 ;
194
+ }
195
+
196
+ tensor = ov::test::utils::create_and_fill_tensor (func_inputs[i].get_element_type (), targetInputStaticShapes[i], in_data);
197
+
198
+ inputs.insert ({func_inputs[i].get_node_shared_ptr (), tensor});
199
+ }}
177
200
} // namespace test
178
201
} // namespace ov
0 commit comments