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

Method SetUp

tensorflow/lite/interpreter_test.cc:1953–1969  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1951 }
1952
1953 void SetUp() final {
1954 cancellation_data_.is_cancelled = false;
1955
1956 // Set up the interpreter. Create the input and output tensors.
1957 int num_tensors = 3;
1958 ASSERT_EQ(interpreter_.AddTensors(num_tensors), kTfLiteOk);
1959 interpreter_.SetInputs({0});
1960 interpreter_.SetOutputs({2});
1961 TfLiteQuantizationParams quantized;
1962 for (int tensor_index = 0; tensor_index < num_tensors; tensor_index++) {
1963 ASSERT_EQ(interpreter_.SetTensorParametersReadWrite(
1964 tensor_index, kTfLiteFloat32, "", {3}, quantized),
1965 kTfLiteOk);
1966 }
1967 interpreter_.SetCancellationFunction(&cancellation_data_,
1968 &CheckCancellation);
1969 }
1970};
1971
1972TEST_F(CancellationTest, CancelBeforeInvoke) {

Callers

nothing calls this directly

Calls 5

AddTensorsMethod · 0.45
SetInputsMethod · 0.45
SetOutputsMethod · 0.45

Tested by

no test coverage detected