MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/lite/delegates/nnapi/quant_lstm_sup_test.cc:246–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244using tflite::delegate::nnapi::DecomposeBiasTensor;
245
246TEST(DecomposeBiasTensor, ExtractInputBias) {
247 // clang-format off
248 std::vector<int32_t> biases
249 // inputGateBias
250 {-7876, 13488, -726, 32839,
251 // cellGateBias
252 39481, 48624, 48976, -21419,
253 // forgetGateBias
254 9206, -46884, -11693, -38724,
255 // outputGateBias
256 -58999, -17050, -41852, -40538};
257 // clang-format on
258
259 std::vector<int32_t> input_bias;
260 std::vector<int32_t> cell_bias;
261 std::vector<int32_t> forget_bias;
262 std::vector<int32_t> output_bias;
263 DecomposeBiasTensor(biases.data(), 4, &input_bias, &cell_bias, &forget_bias,
264 &output_bias);
265
266 EXPECT_THAT(input_bias, ElementsAreArray({-7876, 13488, -726, 32839}));
267}
268
269TEST(DecomposeBiasTensor, ExtractCellBias) {
270 // clang-format off

Callers

nothing calls this directly

Calls 2

DecomposeBiasTensorFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected