diff options
author | Jim Flynn <jim.flynn@arm.com> | 2019-02-18 10:42:32 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2019-02-18 10:42:32 +0000 |
commit | 2ee88dfe7096f8f571ae7be9cbf0f49ededd89af (patch) | |
tree | 85f3188cdf268842d9dc293bb1aced01188d6016 /src/armnn/test/QuantizerTest.cpp | |
parent | aa80d8a9f334254188aa244d3a438846f3996177 (diff) | |
download | armnn-2ee88dfe7096f8f571ae7be9cbf0f49ededd89af.tar.gz |
IVGCVSW-2626 Add Quantization of ResizeBilinear Layer
Change-Id: I0daffd23f32cc094d8309aed822cc46bb2aaa46f
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/armnn/test/QuantizerTest.cpp')
-rw-r--r-- | src/armnn/test/QuantizerTest.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/armnn/test/QuantizerTest.cpp b/src/armnn/test/QuantizerTest.cpp index 1f6537d16a..21ac3e66ec 100644 --- a/src/armnn/test/QuantizerTest.cpp +++ b/src/armnn/test/QuantizerTest.cpp @@ -1120,5 +1120,38 @@ BOOST_AUTO_TEST_CASE(QuantizeSplitter) VisitLayersTopologically(quantizedNetwork.get(), validator); } +BOOST_AUTO_TEST_CASE(QuantizeResizeBilinear) +{ + class TestResizeBilinearQuantization : public TestLeakyReLuActivationQuantization + { + public: + void VisitResizeBilinearLayer(const IConnectableLayer* layer, + const ResizeBilinearDescriptor& resizeDescriptor, + const char* name = nullptr) override + { + CheckForwardedQuantizationSettings(layer); + } + }; + + INetworkPtr network = INetwork::Create(); + + TensorShape shape{1U}; + TensorInfo info(shape, DataType::Float32); + + IConnectableLayer* activation = CreateStartOfLeakyReluNetwork(network.get(), info); + + // Add the layer under test + ResizeBilinearDescriptor descriptor; + descriptor.m_TargetHeight = 3; + descriptor.m_TargetWidth = 3; + IConnectableLayer* spaceToBatch = network->AddResizeBilinearLayer(descriptor); + + CompleteLeakyReluNetwork(network.get(), activation, spaceToBatch, info); + + auto quantizedNetwork = INetworkQuantizer::Create(network.get())->ExportNetwork(); + TestResizeBilinearQuantization validator; + VisitLayersTopologically(quantizedNetwork.get(), validator); +} + BOOST_AUTO_TEST_SUITE_END() } // namespace armnn |