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

Function TEST

tensorflow/lite/model_flex_test.cc:25–37  ·  view source on GitHub ↗

Ensures that a model with TensorFlow ops can be imported as long as the appropriate delegate is linked into the client.

Source from the content-addressed store, hash-verified

23// Ensures that a model with TensorFlow ops can be imported as long as the
24// appropriate delegate is linked into the client.
25TEST(FlexModel, WithFlexDelegate) {
26 auto model = FlatBufferModel::BuildFromFile(
27 "tensorflow/lite/testdata/multi_add_flex.bin");
28 ASSERT_TRUE(model);
29
30 std::unique_ptr<Interpreter> interpreter;
31 ASSERT_EQ(InterpreterBuilder(*model,
32 ops::builtin::BuiltinOpResolver{})(&interpreter),
33 kTfLiteOk);
34 ASSERT_TRUE(interpreter);
35
36 ASSERT_EQ(interpreter->AllocateTensors(), kTfLiteOk);
37}
38
39} // namespace tflite
40

Callers

nothing calls this directly

Calls 2

InterpreterBuilderClass · 0.85
AllocateTensorsMethod · 0.45

Tested by

no test coverage detected