15 explicit GetInputsOutputsMainFixture(
const std::string& inputs,
const std::string& outputs)
20 "operator_codes": [ { "builtin_code": "AVERAGE_POOL_2D" }, { "builtin_code": "CONV_2D" } ], 25 "shape": [ 1, 1, 1, 1 ] , 28 "name": "OutputTensor", 37 "shape": [ 1, 2, 2, 1 ] , 40 "name": "InputTensor", 59 "builtin_options_type": "Pool2DOptions", 67 "fused_activation_function": "NONE" 69 "custom_options_format": "FLEXBUFFERS" 75 "shape": [ 1, 3, 3, 1 ], 78 "name": "ConvInputTensor", 85 "shape": [ 1, 1, 1, 1 ], 88 "name": "ConvOutputTensor", 97 "shape": [ 1, 3, 3, 1 ], 100 "name": "filterTensor", 116 "builtin_options_type": "Conv2DOptions", 121 "fused_activation_function": "NONE" 123 "custom_options_format": "FLEXBUFFERS" 128 "description": "Test Subgraph Inputs Outputs", 132 { "data": [ 2,1,0, 6,2,1, 4,1,2 ], }, 142 struct GetEmptyInputsOutputsFixture : GetInputsOutputsMainFixture
144 GetEmptyInputsOutputsFixture() : GetInputsOutputsMainFixture(
"[ ]",
"[ ]") {}
147 struct GetInputsOutputsFixture : GetInputsOutputsMainFixture
149 GetInputsOutputsFixture() : GetInputsOutputsMainFixture(
"[ 1 ]",
"[ 0 ]") {}
155 m_GraphBinary.size());
157 CHECK_EQ(0, tensors.size());
163 m_GraphBinary.size());
165 CHECK_EQ(0, tensors.size());
171 m_GraphBinary.size());
173 CHECK_EQ(1, tensors.size());
174 CheckTensors(tensors[0], 4, { 1, 2, 2, 1 }, tflite::TensorType::TensorType_UINT8, 1,
175 "InputTensor", { -1.2f }, { 25.5f }, { 0.25f }, { 10 });
181 m_GraphBinary.size());
183 CHECK_EQ(1, tensors.size());
184 CheckTensors(tensors[0], 4, { 1, 1, 1, 1 }, tflite::TensorType::TensorType_UINT8, 0,
185 "OutputTensor", { 0.0f }, { 255.0f }, { 1.0f }, { 0 });
191 m_GraphBinary.size());
193 CHECK_EQ(2, tensors.size());
194 CheckTensors(tensors[0], 4, { 1, 3, 3, 1 }, tflite::TensorType::TensorType_UINT8, 0,
195 "ConvInputTensor", { }, { }, { 1.0f }, { 0 });
196 CheckTensors(tensors[1], 4, { 1, 3, 3, 1 }, tflite::TensorType::TensorType_UINT8, 2,
197 "filterTensor", { 0.0f }, { 255.0f }, { 1.0f }, { 0 });
203 m_GraphBinary.size());
205 CHECK_EQ(1, tensors.size());
206 CheckTensors(tensors[0], 4, { 1, 1, 1, 1 }, tflite::TensorType::TensorType_UINT8, 1,
207 "ConvOutputTensor", { 0.0f }, { 511.0f }, { 2.0f }, { 0 });
210 TEST_CASE(
"GetInputsNullModel")
215 TEST_CASE(
"GetOutputsNullModel")
223 m_GraphBinary.size());
230 m_GraphBinary.size());
237 m_GraphBinary.size());
244 m_GraphBinary.size());
bool ReadStringToBinary()
std::vector< TensorRawPtr > TensorRawPtrVector
TEST_CASE_FIXTURE(ClContextControlFixture, "CopyBetweenNeonAndGpu")