| 54 | } |
| 55 | |
| 56 | void SerializeArgMinMaxTest(armnn::DataType dataType) |
| 57 | { |
| 58 | const std::string layerName("argminmax"); |
| 59 | const armnn::TensorInfo inputInfo({1, 2, 3}, armnn::DataType::Float32); |
| 60 | const armnn::TensorInfo outputInfo({1, 3}, dataType); |
| 61 | |
| 62 | armnn::ArgMinMaxDescriptor descriptor; |
| 63 | descriptor.m_Function = armnn::ArgMinMaxFunction::Max; |
| 64 | descriptor.m_Axis = 1; |
| 65 | |
| 66 | armnn::INetworkPtr network = armnn::INetwork::Create(); |
| 67 | armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0); |
| 68 | armnn::IConnectableLayer* const argMinMaxLayer = network->AddArgMinMaxLayer(descriptor, layerName.c_str()); |
| 69 | armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0); |
| 70 | |
| 71 | inputLayer->GetOutputSlot(0).Connect(argMinMaxLayer->GetInputSlot(0)); |
| 72 | argMinMaxLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0)); |
| 73 | |
| 74 | inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo); |
| 75 | argMinMaxLayer->GetOutputSlot(0).SetTensorInfo(outputInfo); |
| 76 | |
| 77 | armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network)); |
| 78 | CHECK(deserializedNetwork); |
| 79 | |
| 80 | LayerVerifierBaseWithDescriptor<armnn::ArgMinMaxDescriptor> verifier(layerName, |
| 81 | {inputInfo}, |
| 82 | {outputInfo}, |
| 83 | descriptor); |
| 84 | deserializedNetwork->ExecuteStrategy(verifier); |
| 85 | } |
| 86 | |
| 87 | TEST_CASE("SerializeArgMinMaxSigned32") |
| 88 | { |
no test coverage detected