1
// Tencent is pleased to support the open source community by making ncnn available.
3
// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
5
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
6
// in compliance with the License. You may obtain a copy of the License at
8
// https://opensource.org/licenses/BSD-3-Clause
10
// Unless required by applicable law or agreed to in writing, software distributed
11
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
13
// specific language governing permissions and limitations under the License.
17
static int test_rnn(const ncnn::Mat& a, int outch, int direction)
20
int num_directions = direction == 2 ? 2 : 1;
24
pd.set(1, outch * input_size * num_directions);
27
std::vector<ncnn::Mat> weights(3);
28
weights[0] = RandomMat(outch * input_size * num_directions);
29
weights[1] = RandomMat(outch * num_directions);
30
weights[2] = RandomMat(outch * outch * num_directions);
32
int ret = test_layer("RNN", pd, weights, a);
35
fprintf(stderr, "test_rnn failed a.dims=%d a=(%d %d %d) outch=%d direction=%d\n", a.dims, a.w, a.h, a.c, outch, direction);
41
int test_rnn_with_hidden(const ncnn::Mat& a, int outch, int direction)
44
int num_directions = direction == 2 ? 2 : 1;
48
pd.set(1, outch * input_size * num_directions);
51
std::vector<ncnn::Mat> weights(3);
52
weights[0] = RandomMat(outch * input_size * num_directions);
53
weights[1] = RandomMat(outch * num_directions);
54
weights[2] = RandomMat(outch * outch * num_directions);
56
// initial hidden state
57
ncnn::Mat hidden = RandomMat(outch, num_directions, -1.f, 1.f);
59
std::vector<ncnn::Mat> as(2);
63
int ret = test_layer("RNN", pd, weights, as, 2);
66
fprintf(stderr, "test_rnn_with_hidden failed a.dims=%d a=(%d %d %d) outch=%d direction=%d\n", a.dims, a.w, a.h, a.c, outch, direction);
72
int test_rnn_with_hidden_input(const ncnn::Mat& a, int outch, int direction)
75
int num_directions = direction == 2 ? 2 : 1;
79
pd.set(1, outch * input_size * num_directions);
82
std::vector<ncnn::Mat> weights(3);
83
weights[0] = RandomMat(outch * input_size * num_directions);
84
weights[1] = RandomMat(outch * num_directions);
85
weights[2] = RandomMat(outch * outch * num_directions);
87
// initial hidden state
88
ncnn::Mat hidden = RandomMat(outch, num_directions, -1.f, 1.f);
90
std::vector<ncnn::Mat> as(2);
94
int ret = test_layer("RNN", pd, weights, as, 1);
97
fprintf(stderr, "test_rnn_with_hidden_input failed a.dims=%d a=(%d %d %d) outch=%d direction=%d\n", a.dims, a.w, a.h, a.c, outch, direction);
103
int test_rnn_with_hidden_output(const ncnn::Mat& a, int outch, int direction)
105
int input_size = a.w;
106
int num_directions = direction == 2 ? 2 : 1;
110
pd.set(1, outch * input_size * num_directions);
111
pd.set(2, direction);
113
std::vector<ncnn::Mat> weights(3);
114
weights[0] = RandomMat(outch * input_size * num_directions);
115
weights[1] = RandomMat(outch * num_directions);
116
weights[2] = RandomMat(outch * outch * num_directions);
118
std::vector<ncnn::Mat> as(1);
121
int ret = test_layer("RNN", pd, weights, as, 2);
124
fprintf(stderr, "test_rnn_with_hidden_output failed a.dims=%d a=(%d %d %d) outch=%d direction=%d\n", a.dims, a.w, a.h, a.c, outch, direction);
130
static int test_rnn_0()
133
|| test_rnn(RandomMat(4, 1), 2, 2)
134
|| test_rnn(RandomMat(8, 2), 2, 2)
135
|| test_rnn(RandomMat(16, 8), 7, 2)
136
|| test_rnn(RandomMat(17, 8), 8, 2)
137
|| test_rnn(RandomMat(19, 15), 8, 2)
138
|| test_rnn(RandomMat(5, 16), 16, 2)
139
|| test_rnn(RandomMat(3, 16), 8, 2)
140
|| test_rnn(RandomMat(8, 16), 16, 2)
141
|| test_rnn(RandomMat(31, 3), 31, 2)
142
|| test_rnn(RandomMat(2, 5), 17, 2);
145
static int test_rnn_1()
148
|| test_rnn_with_hidden(RandomMat(4, 4), 1, 2)
149
|| test_rnn_with_hidden(RandomMat(8, 2), 2, 2)
150
|| test_rnn_with_hidden(RandomMat(16, 8), 7, 2)
151
|| test_rnn_with_hidden(RandomMat(17, 8), 8, 2)
152
|| test_rnn_with_hidden(RandomMat(19, 15), 8, 2)
153
|| test_rnn_with_hidden(RandomMat(5, 16), 16, 2)
154
|| test_rnn_with_hidden(RandomMat(3, 16), 8, 2)
155
|| test_rnn_with_hidden(RandomMat(2, 5), 79, 2)
156
|| test_rnn_with_hidden(RandomMat(4, 4), 1, 1)
157
|| test_rnn_with_hidden(RandomMat(8, 2), 2, 1)
158
|| test_rnn_with_hidden(RandomMat(16, 8), 7, 1)
159
|| test_rnn_with_hidden(RandomMat(17, 8), 8, 1)
160
|| test_rnn_with_hidden(RandomMat(19, 15), 8, 1)
161
|| test_rnn_with_hidden(RandomMat(5, 16), 16, 1)
162
|| test_rnn_with_hidden(RandomMat(3, 16), 8, 1)
163
|| test_rnn_with_hidden(RandomMat(2, 5), 79, 1)
164
|| test_rnn_with_hidden(RandomMat(4, 2), 1, 0)
165
|| test_rnn_with_hidden(RandomMat(8, 2), 2, 0)
166
|| test_rnn_with_hidden(RandomMat(16, 8), 7, 0)
167
|| test_rnn_with_hidden(RandomMat(17, 8), 8, 0)
168
|| test_rnn_with_hidden(RandomMat(19, 15), 8, 0)
169
|| test_rnn_with_hidden(RandomMat(5, 16), 16, 0)
170
|| test_rnn_with_hidden(RandomMat(3, 16), 8, 0)
171
|| test_rnn_with_hidden(RandomMat(2, 5), 17, 0)
173
|| test_rnn_with_hidden_input(RandomMat(4, 4), 1, 2)
174
|| test_rnn_with_hidden_input(RandomMat(8, 2), 2, 2)
175
|| test_rnn_with_hidden_input(RandomMat(16, 8), 7, 2)
176
|| test_rnn_with_hidden_input(RandomMat(17, 8), 8, 2)
177
|| test_rnn_with_hidden_input(RandomMat(19, 15), 8, 2)
178
|| test_rnn_with_hidden_input(RandomMat(5, 16), 16, 2)
179
|| test_rnn_with_hidden_input(RandomMat(3, 16), 8, 2)
180
|| test_rnn_with_hidden_input(RandomMat(2, 5), 79, 2)
181
|| test_rnn_with_hidden_input(RandomMat(4, 4), 1, 1)
182
|| test_rnn_with_hidden_input(RandomMat(8, 2), 2, 1)
183
|| test_rnn_with_hidden_input(RandomMat(16, 8), 7, 1)
184
|| test_rnn_with_hidden_input(RandomMat(17, 8), 8, 1)
185
|| test_rnn_with_hidden_input(RandomMat(19, 15), 8, 1)
186
|| test_rnn_with_hidden_input(RandomMat(5, 16), 16, 1)
187
|| test_rnn_with_hidden_input(RandomMat(3, 16), 8, 1)
188
|| test_rnn_with_hidden_input(RandomMat(2, 5), 79, 1)
189
|| test_rnn_with_hidden_input(RandomMat(4, 2), 1, 0)
190
|| test_rnn_with_hidden_input(RandomMat(8, 2), 2, 0)
191
|| test_rnn_with_hidden_input(RandomMat(16, 8), 7, 0)
192
|| test_rnn_with_hidden_input(RandomMat(17, 8), 8, 0)
193
|| test_rnn_with_hidden_input(RandomMat(19, 15), 8, 0)
194
|| test_rnn_with_hidden_input(RandomMat(5, 16), 16, 0)
195
|| test_rnn_with_hidden_input(RandomMat(3, 16), 8, 0)
196
|| test_rnn_with_hidden_input(RandomMat(2, 5), 17, 0)
198
|| test_rnn_with_hidden_output(RandomMat(4, 4), 1, 2)
199
|| test_rnn_with_hidden_output(RandomMat(8, 2), 2, 2)
200
|| test_rnn_with_hidden_output(RandomMat(16, 8), 7, 2)
201
|| test_rnn_with_hidden_output(RandomMat(17, 8), 8, 2)
202
|| test_rnn_with_hidden_output(RandomMat(19, 15), 8, 2)
203
|| test_rnn_with_hidden_output(RandomMat(5, 16), 16, 2)
204
|| test_rnn_with_hidden_output(RandomMat(3, 16), 8, 2)
205
|| test_rnn_with_hidden_output(RandomMat(2, 5), 79, 2)
206
|| test_rnn_with_hidden_output(RandomMat(4, 4), 1, 1)
207
|| test_rnn_with_hidden_output(RandomMat(8, 2), 2, 1)
208
|| test_rnn_with_hidden_output(RandomMat(16, 8), 7, 1)
209
|| test_rnn_with_hidden_output(RandomMat(17, 8), 8, 1)
210
|| test_rnn_with_hidden_output(RandomMat(19, 15), 8, 1)
211
|| test_rnn_with_hidden_output(RandomMat(5, 16), 16, 1)
212
|| test_rnn_with_hidden_output(RandomMat(3, 16), 8, 1)
213
|| test_rnn_with_hidden_output(RandomMat(2, 5), 79, 1)
214
|| test_rnn_with_hidden_output(RandomMat(4, 2), 1, 0)
215
|| test_rnn_with_hidden_output(RandomMat(8, 2), 2, 0)
216
|| test_rnn_with_hidden_output(RandomMat(16, 8), 7, 0)
217
|| test_rnn_with_hidden_output(RandomMat(17, 8), 8, 0)
218
|| test_rnn_with_hidden_output(RandomMat(19, 15), 8, 0)
219
|| test_rnn_with_hidden_output(RandomMat(5, 16), 16, 0)
220
|| test_rnn_with_hidden_output(RandomMat(3, 16), 8, 0)
221
|| test_rnn_with_hidden_output(RandomMat(2, 5), 17, 0);
224
static int test_rnn_2()
227
|| test_rnn(RandomMat(4, 1), 1, 0)
228
|| test_rnn(RandomMat(8, 2), 2, 0)
229
|| test_rnn(RandomMat(16, 8), 7, 0)
230
|| test_rnn(RandomMat(17, 8), 8, 0)
231
|| test_rnn(RandomMat(19, 15), 8, 0)
232
|| test_rnn(RandomMat(5, 16), 16, 0)
233
|| test_rnn(RandomMat(3, 16), 8, 0)
234
|| test_rnn(RandomMat(8, 16), 16, 0)
235
|| test_rnn(RandomMat(2, 5), 17, 0);
238
static int test_rnn_3()
241
|| test_rnn(RandomMat(4, 1), 1, 1)
242
|| test_rnn(RandomMat(8, 2), 2, 1)
243
|| test_rnn(RandomMat(16, 8), 7, 1)
244
|| test_rnn(RandomMat(17, 8), 8, 1)
245
|| test_rnn(RandomMat(19, 15), 8, 1)
246
|| test_rnn(RandomMat(5, 16), 16, 1)
247
|| test_rnn(RandomMat(3, 16), 8, 1)
248
|| test_rnn(RandomMat(8, 16), 16, 1)
249
|| test_rnn(RandomMat(2, 5), 17, 1);
253
static int test_rnn_int8(const ncnn::Mat& a, int outch, int direction)
255
int input_size = a.w;
256
int num_directions = direction == 2 ? 2 : 1;
260
pd.set(1, outch * input_size * num_directions);
261
pd.set(2, direction);
262
pd.set(8, 2); // int8_scale_term
264
std::vector<ncnn::Mat> weights(5);
265
weights[0] = RandomS8Mat(outch * input_size * num_directions);
266
weights[1] = RandomMat(outch * num_directions);
267
weights[2] = RandomS8Mat(outch * outch * num_directions);
268
weights[3] = RandomMat(outch * num_directions, 100.f, 200.f);
269
weights[4] = RandomMat(outch * num_directions, 100.f, 200.f);
271
int ret = test_layer("RNN", pd, weights, a);
274
fprintf(stderr, "test_rnn_int8 failed a.dims=%d a=(%d %d %d) outch=%d direction=%d\n", a.dims, a.w, a.h, a.c, outch, direction);
280
int test_rnn_int8_with_hidden(const ncnn::Mat& a, int outch, int direction)
282
int input_size = a.w;
283
int num_directions = direction == 2 ? 2 : 1;
287
pd.set(1, outch * input_size * num_directions);
288
pd.set(2, direction);
289
pd.set(8, 2); // int8_scale_term
291
std::vector<ncnn::Mat> weights(5);
292
weights[0] = RandomS8Mat(outch * input_size * num_directions);
293
weights[1] = RandomMat(outch * num_directions);
294
weights[2] = RandomS8Mat(outch * outch * num_directions);
295
weights[3] = RandomMat(outch * num_directions, 100.f, 200.f);
296
weights[4] = RandomMat(outch * num_directions, 100.f, 200.f);
298
// initial hidden state
299
ncnn::Mat hidden = RandomMat(outch, num_directions, -1.f, 1.f);
301
std::vector<ncnn::Mat> as(2);
305
int ret = test_layer("RNN", pd, weights, as, 2);
308
fprintf(stderr, "test_rnn_int8_with_hidden failed a.dims=%d a=(%d %d %d) outch=%d direction=%d\n", a.dims, a.w, a.h, a.c, outch, direction);
314
int test_rnn_int8_with_hidden_input(const ncnn::Mat& a, int outch, int direction)
316
int input_size = a.w;
317
int num_directions = direction == 2 ? 2 : 1;
321
pd.set(1, outch * input_size * num_directions);
322
pd.set(2, direction);
323
pd.set(8, 2); // int8_scale_term
325
std::vector<ncnn::Mat> weights(5);
326
weights[0] = RandomS8Mat(outch * input_size * num_directions);
327
weights[1] = RandomMat(outch * num_directions);
328
weights[2] = RandomS8Mat(outch * outch * num_directions);
329
weights[3] = RandomMat(outch * num_directions, 100.f, 200.f);
330
weights[4] = RandomMat(outch * num_directions, 100.f, 200.f);
332
// initial hidden state
333
ncnn::Mat hidden = RandomMat(outch, num_directions, -1.f, 1.f);
335
std::vector<ncnn::Mat> as(2);
339
int ret = test_layer("RNN", pd, weights, as, 1);
342
fprintf(stderr, "test_rnn_int8_with_hidden_input failed a.dims=%d a=(%d %d %d) outch=%d direction=%d\n", a.dims, a.w, a.h, a.c, outch, direction);
348
int test_rnn_int8_with_hidden_output(const ncnn::Mat& a, int outch, int direction)
350
int input_size = a.w;
351
int num_directions = direction == 2 ? 2 : 1;
355
pd.set(1, outch * input_size * num_directions);
356
pd.set(2, direction);
357
pd.set(8, 2); // int8_scale_term
359
std::vector<ncnn::Mat> weights(5);
360
weights[0] = RandomS8Mat(outch * input_size * num_directions);
361
weights[1] = RandomMat(outch * num_directions);
362
weights[2] = RandomS8Mat(outch * outch * num_directions);
363
weights[3] = RandomMat(outch * num_directions, 100.f, 200.f);
364
weights[4] = RandomMat(outch * num_directions, 100.f, 200.f);
366
std::vector<ncnn::Mat> as(1);
369
int ret = test_layer("RNN", pd, weights, as, 2);
372
fprintf(stderr, "test_rnn_int8_with_hidden_output failed a.dims=%d a=(%d %d %d) outch=%d direction=%d\n", a.dims, a.w, a.h, a.c, outch, direction);
378
static int test_rnn_4()
381
|| test_rnn_int8(RandomMat(4, 1), 2, 2)
382
|| test_rnn_int8(RandomMat(8, 2), 2, 2)
383
|| test_rnn_int8(RandomMat(16, 8), 7, 2)
384
|| test_rnn_int8(RandomMat(17, 8), 8, 2)
385
|| test_rnn_int8(RandomMat(19, 15), 8, 2)
386
|| test_rnn_int8(RandomMat(5, 16), 16, 2)
387
|| test_rnn_int8(RandomMat(3, 16), 8, 2)
388
|| test_rnn_int8(RandomMat(8, 16), 16, 2)
389
|| test_rnn_int8(RandomMat(31, 3), 31, 2)
390
|| test_rnn_int8(RandomMat(2, 5), 17, 2);
393
static int test_rnn_5()
396
|| test_rnn_int8_with_hidden(RandomMat(4, 4), 1, 2)
397
|| test_rnn_int8_with_hidden(RandomMat(8, 2), 2, 2)
398
|| test_rnn_int8_with_hidden(RandomMat(16, 8), 7, 2)
399
|| test_rnn_int8_with_hidden(RandomMat(17, 8), 8, 2)
400
|| test_rnn_int8_with_hidden(RandomMat(19, 15), 8, 2)
401
|| test_rnn_int8_with_hidden(RandomMat(5, 16), 16, 2)
402
|| test_rnn_int8_with_hidden(RandomMat(3, 16), 8, 2)
403
|| test_rnn_int8_with_hidden(RandomMat(2, 5), 79, 2)
404
|| test_rnn_int8_with_hidden(RandomMat(4, 4), 1, 1)
405
|| test_rnn_int8_with_hidden(RandomMat(8, 2), 2, 1)
406
|| test_rnn_int8_with_hidden(RandomMat(16, 8), 7, 1)
407
|| test_rnn_int8_with_hidden(RandomMat(17, 8), 8, 1)
408
|| test_rnn_int8_with_hidden(RandomMat(19, 15), 8, 1)
409
|| test_rnn_int8_with_hidden(RandomMat(5, 16), 16, 1)
410
|| test_rnn_int8_with_hidden(RandomMat(3, 16), 8, 1)
411
|| test_rnn_int8_with_hidden(RandomMat(2, 5), 79, 1)
412
|| test_rnn_int8_with_hidden(RandomMat(4, 2), 1, 0)
413
|| test_rnn_int8_with_hidden(RandomMat(8, 2), 2, 0)
414
|| test_rnn_int8_with_hidden(RandomMat(16, 8), 7, 0)
415
|| test_rnn_int8_with_hidden(RandomMat(17, 8), 8, 0)
416
|| test_rnn_int8_with_hidden(RandomMat(19, 15), 8, 0)
417
|| test_rnn_int8_with_hidden(RandomMat(5, 16), 16, 0)
418
|| test_rnn_int8_with_hidden(RandomMat(3, 16), 8, 0)
419
|| test_rnn_int8_with_hidden(RandomMat(2, 5), 17, 0)
421
|| test_rnn_int8_with_hidden_input(RandomMat(4, 4), 1, 2)
422
|| test_rnn_int8_with_hidden_input(RandomMat(8, 2), 2, 2)
423
|| test_rnn_int8_with_hidden_input(RandomMat(16, 8), 7, 2)
424
|| test_rnn_int8_with_hidden_input(RandomMat(17, 8), 8, 2)
425
|| test_rnn_int8_with_hidden_input(RandomMat(19, 15), 8, 2)
426
|| test_rnn_int8_with_hidden_input(RandomMat(5, 16), 16, 2)
427
|| test_rnn_int8_with_hidden_input(RandomMat(3, 16), 8, 2)
428
|| test_rnn_int8_with_hidden_input(RandomMat(2, 5), 79, 2)
429
|| test_rnn_int8_with_hidden_input(RandomMat(4, 4), 1, 1)
430
|| test_rnn_int8_with_hidden_input(RandomMat(8, 2), 2, 1)
431
|| test_rnn_int8_with_hidden_input(RandomMat(16, 8), 7, 1)
432
|| test_rnn_int8_with_hidden_input(RandomMat(17, 8), 8, 1)
433
|| test_rnn_int8_with_hidden_input(RandomMat(19, 15), 8, 1)
434
|| test_rnn_int8_with_hidden_input(RandomMat(5, 16), 16, 1)
435
|| test_rnn_int8_with_hidden_input(RandomMat(3, 16), 8, 1)
436
|| test_rnn_int8_with_hidden_input(RandomMat(2, 5), 79, 1)
437
|| test_rnn_int8_with_hidden_input(RandomMat(4, 2), 1, 0)
438
|| test_rnn_int8_with_hidden_input(RandomMat(8, 2), 2, 0)
439
|| test_rnn_int8_with_hidden_input(RandomMat(16, 8), 7, 0)
440
|| test_rnn_int8_with_hidden_input(RandomMat(17, 8), 8, 0)
441
|| test_rnn_int8_with_hidden_input(RandomMat(19, 15), 8, 0)
442
|| test_rnn_int8_with_hidden_input(RandomMat(5, 16), 16, 0)
443
|| test_rnn_int8_with_hidden_input(RandomMat(3, 16), 8, 0)
444
|| test_rnn_int8_with_hidden_input(RandomMat(2, 5), 17, 0)
446
|| test_rnn_int8_with_hidden_output(RandomMat(4, 4), 1, 2)
447
|| test_rnn_int8_with_hidden_output(RandomMat(8, 2), 2, 2)
448
|| test_rnn_int8_with_hidden_output(RandomMat(16, 8), 7, 2)
449
|| test_rnn_int8_with_hidden_output(RandomMat(17, 8), 8, 2)
450
|| test_rnn_int8_with_hidden_output(RandomMat(19, 15), 8, 2)
451
|| test_rnn_int8_with_hidden_output(RandomMat(5, 16), 16, 2)
452
|| test_rnn_int8_with_hidden_output(RandomMat(3, 16), 8, 2)
453
|| test_rnn_int8_with_hidden_output(RandomMat(2, 5), 79, 2)
454
|| test_rnn_int8_with_hidden_output(RandomMat(4, 4), 1, 1)
455
|| test_rnn_int8_with_hidden_output(RandomMat(8, 2), 2, 1)
456
|| test_rnn_int8_with_hidden_output(RandomMat(16, 8), 7, 1)
457
|| test_rnn_int8_with_hidden_output(RandomMat(17, 8), 8, 1)
458
|| test_rnn_int8_with_hidden_output(RandomMat(19, 15), 8, 1)
459
|| test_rnn_int8_with_hidden_output(RandomMat(5, 16), 16, 1)
460
|| test_rnn_int8_with_hidden_output(RandomMat(3, 16), 8, 1)
461
|| test_rnn_int8_with_hidden_output(RandomMat(2, 5), 79, 1)
462
|| test_rnn_int8_with_hidden_output(RandomMat(4, 2), 1, 0)
463
|| test_rnn_int8_with_hidden_output(RandomMat(8, 2), 2, 0)
464
|| test_rnn_int8_with_hidden_output(RandomMat(16, 8), 7, 0)
465
|| test_rnn_int8_with_hidden_output(RandomMat(17, 8), 8, 0)
466
|| test_rnn_int8_with_hidden_output(RandomMat(19, 15), 8, 0)
467
|| test_rnn_int8_with_hidden_output(RandomMat(5, 16), 16, 0)
468
|| test_rnn_int8_with_hidden_output(RandomMat(3, 16), 8, 0)
469
|| test_rnn_int8_with_hidden_output(RandomMat(2, 5), 17, 0);
472
static int test_rnn_6()
475
|| test_rnn_int8(RandomMat(4, 1), 1, 0)
476
|| test_rnn_int8(RandomMat(8, 2), 2, 0)
477
|| test_rnn_int8(RandomMat(16, 8), 7, 0)
478
|| test_rnn_int8(RandomMat(17, 8), 8, 0)
479
|| test_rnn_int8(RandomMat(19, 15), 8, 0)
480
|| test_rnn_int8(RandomMat(5, 16), 16, 0)
481
|| test_rnn_int8(RandomMat(3, 16), 8, 0)
482
|| test_rnn_int8(RandomMat(8, 16), 16, 0)
483
|| test_rnn_int8(RandomMat(2, 5), 17, 0);
486
static int test_rnn_7()
489
|| test_rnn_int8(RandomMat(4, 1), 1, 1)
490
|| test_rnn_int8(RandomMat(8, 2), 2, 1)
491
|| test_rnn_int8(RandomMat(16, 8), 7, 1)
492
|| test_rnn_int8(RandomMat(17, 8), 8, 1)
493
|| test_rnn_int8(RandomMat(19, 15), 8, 1)
494
|| test_rnn_int8(RandomMat(5, 16), 16, 1)
495
|| test_rnn_int8(RandomMat(3, 16), 8, 1)
496
|| test_rnn_int8(RandomMat(8, 16), 16, 1)
497
|| test_rnn_int8(RandomMat(2, 5), 17, 1);