diff options
author | Nikhil Raj <nikhil.raj@arm.com> | 2021-04-19 16:59:48 +0100 |
---|---|---|
committer | Nikhil Raj <nikhil.raj@arm.com> | 2021-04-27 17:37:11 +0100 |
commit | 5d955cf70ae0c5558d4f431f0fc6bd4552cd43a5 (patch) | |
tree | 4fb59200899808b8b008d6f48322d0d799b8b631 /src/armnnTfParser/test/Squeeze.cpp | |
parent | 4a621c43174b6bdd9dc0bff839b245bc2139d6a6 (diff) | |
download | armnn-5d955cf70ae0c5558d4f431f0fc6bd4552cd43a5.tar.gz |
IVGCVSW-5721 Remove the Tensorflow Parser from ArmNN
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com>
Change-Id: Ida37d3ee3a1af0c75aa905199bd861726c646846
Diffstat (limited to 'src/armnnTfParser/test/Squeeze.cpp')
-rw-r--r-- | src/armnnTfParser/test/Squeeze.cpp | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/src/armnnTfParser/test/Squeeze.cpp b/src/armnnTfParser/test/Squeeze.cpp deleted file mode 100644 index e02a5947a5..0000000000 --- a/src/armnnTfParser/test/Squeeze.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// -// Copyright © 2017 Arm Ltd. All rights reserved. -// SPDX-License-Identifier: MIT -// - -#include <boost/test/unit_test.hpp> -#include "armnnTfParser/ITfParser.hpp" -#include "ParserPrototxtFixture.hpp" - -BOOST_AUTO_TEST_SUITE(TensorflowParser) - -template <bool withDimZero, bool withDimOne> -struct SqueezeFixture : public armnnUtils::ParserPrototxtFixture<armnnTfParser::ITfParser> -{ - SqueezeFixture() - { - m_Prototext = - "node { \n" - " name: \"graphInput\" \n" - " op: \"Placeholder\" \n" - " attr { \n" - " key: \"dtype\" \n" - " value { \n" - " type: DT_FLOAT \n" - " } \n" - " } \n" - " attr { \n" - " key: \"shape\" \n" - " value { \n" - " shape { \n" - " } \n" - " } \n" - " } \n" - " } \n" - "node { \n" - " name: \"Squeeze\" \n" - " op: \"Squeeze\" \n" - " input: \"graphInput\" \n" - " attr { \n" - " key: \"T\" \n" - " value { \n" - " type: DT_FLOAT \n" - " } \n" - " } \n" - " attr { \n" - " key: \"squeeze_dims\" \n" - " value { \n" - " list {\n"; - - if (withDimZero) - { - m_Prototext += "i:0\n"; - } - - if (withDimOne) - { - m_Prototext += "i:1\n"; - } - - m_Prototext += - " } \n" - " } \n" - " } \n" - "} \n"; - - SetupSingleInputSingleOutput({ 1, 1, 2, 2 }, "graphInput", "Squeeze"); - } -}; - -typedef SqueezeFixture<false, false> ImpliedDimensionsSqueezeFixture; -typedef SqueezeFixture<true, false> ExplicitDimensionZeroSqueezeFixture; -typedef SqueezeFixture<false, true> ExplicitDimensionOneSqueezeFixture; -typedef SqueezeFixture<true, true> ExplicitDimensionsSqueezeFixture; - -BOOST_FIXTURE_TEST_CASE(ParseImplicitSqueeze, ImpliedDimensionsSqueezeFixture) -{ - BOOST_TEST((m_Parser->GetNetworkOutputBindingInfo("Squeeze").second.GetShape() == - armnn::TensorShape({2,2}))); - RunTest<2>({ 1.0f, 2.0f, 3.0f, 4.0f }, - { 1.0f, 2.0f, 3.0f, 4.0f }); -} - -BOOST_FIXTURE_TEST_CASE(ParseDimensionZeroSqueeze, ExplicitDimensionZeroSqueezeFixture) -{ - BOOST_TEST((m_Parser->GetNetworkOutputBindingInfo("Squeeze").second.GetShape() == - armnn::TensorShape({1,2,2}))); - RunTest<3>({ 1.0f, 2.0f, 3.0f, 4.0f }, - { 1.0f, 2.0f, 3.0f, 4.0f }); -} - -BOOST_FIXTURE_TEST_CASE(ParseDimensionOneSqueeze, ExplicitDimensionOneSqueezeFixture) -{ - BOOST_TEST((m_Parser->GetNetworkOutputBindingInfo("Squeeze").second.GetShape() == - armnn::TensorShape({1,2,2}))); - RunTest<3>({ 1.0f, 2.0f, 3.0f, 4.0f }, - { 1.0f, 2.0f, 3.0f, 4.0f }); -} - -BOOST_FIXTURE_TEST_CASE(ParseExplicitDimensionsSqueeze, ExplicitDimensionsSqueezeFixture) -{ - BOOST_TEST((m_Parser->GetNetworkOutputBindingInfo("Squeeze").second.GetShape() == - armnn::TensorShape({2,2}))); - RunTest<2>({ 1.0f, 2.0f, 3.0f, 4.0f }, - { 1.0f, 2.0f, 3.0f, 4.0f }); -} - -BOOST_AUTO_TEST_SUITE_END() |