MCPcopy Create free account
hub / github.com/ARM-software/armnn / DivFP32Test

Function DivFP32Test

delegate/test/ElementwiseBinaryTest.cpp:234–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234void DivFP32Test()
235{
236 std::vector<int32_t> input0Shape { 2, 2, 2, 2 };
237 std::vector<int32_t> input1Shape { 2, 2, 2, 2 };
238 std::vector<int32_t> expectedOutputShape { 2, 2, 2, 2 };
239
240 std::vector<float> input0Values =
241 {
242 2.f, 2.f, 2.f, 2.f, 3.f, 3.f, 3.f, 3.f,
243 4.f, 4.f, 4.f, 4.f, 5.f, 5.f, 5.f, 5.f
244
245 };
246
247 std::vector<float> input1Values =
248 {
249 1.f, 1.f, 1.f, 1.f, 2.f, 2.f, 2.f, 2.f,
250 4.f, 4.f, 4.f, 4.f, 4.f, 4.f, 4.f, 4.f
251 };
252
253 std::vector<float> expectedOutputValues =
254 {
255 2.f, 2.f, 2.f, 2.f, 1.50f, 1.50f, 1.50f, 1.50f,
256 1.f, 1.f, 1.f, 1.f, 1.25f, 1.25f, 1.25f, 1.25f
257 };
258
259 ElementwiseBinaryTest<float>(tflite::BuiltinOperator_DIV,
260 tflite::ActivationFunctionType_NONE,
261 ::tflite::TensorType_FLOAT32,
262 input0Shape,
263 input1Shape,
264 expectedOutputShape,
265 input0Values,
266 input1Values,
267 expectedOutputValues);
268}
269
270void DivBroadcastTest()
271{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected