aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNikhil Raj <nikhil.raj@arm.com>2021-04-02 22:04:39 +0100
committerNikhil Raj <nikhil.raj@arm.com>2021-04-16 14:27:27 +0100
commit6dd178f2395b34cfb360eabb0130c19ed258f5fa (patch)
tree6814e4729bbd1e652d8b9c18c9db28f3bc2f8a8a /tests
parented7fce413410d15c501ea52f9e6bfbbf71b3daf1 (diff)
downloadarmnn-6dd178f2395b34cfb360eabb0130c19ed258f5fa.tar.gz
IVGCVSW-5720 Remove the Caffe Parser from ArmNN
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: Ib00be204f549efa9aa5971ecf65c2dec4a10b10f
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt76
-rw-r--r--tests/CaffeAlexNet-Armnn/CaffeAlexNet-Armnn.cpp35
-rw-r--r--tests/CaffeAlexNet-Armnn/Validation.txt1000
-rw-r--r--tests/CaffeCifar10AcrossChannels-Armnn/CaffeCifar10AcrossChannels-Armnn.cpp36
-rw-r--r--tests/CaffeCifar10AcrossChannels-Armnn/Validation.txt1000
-rw-r--r--tests/CaffeInception_BN-Armnn/CaffeInception_BN-Armnn.cpp42
-rw-r--r--tests/CaffeInception_BN-Armnn/Validation.txt1000
-rw-r--r--tests/CaffeMnist-Armnn/CaffeMnist-Armnn.cpp36
-rw-r--r--tests/CaffeMnist-Armnn/Validation.txt1000
-rw-r--r--tests/CaffePreprocessor.cpp44
-rw-r--r--tests/CaffePreprocessor.hpp40
-rw-r--r--tests/CaffeResNet-Armnn/CaffeResNet-Armnn.cpp45
-rw-r--r--tests/CaffeResNet-Armnn/Validation.txt2000
-rw-r--r--tests/CaffeSqueezeNet1_0-Armnn/CaffeSqueezeNet1_0-Armnn.cpp20
-rw-r--r--tests/CaffeVGG-Armnn/CaffeVGG-Armnn.cpp37
-rw-r--r--tests/CaffeVGG-Armnn/Validation.txt1000
-rw-r--r--tests/CaffeYolo-Armnn/CaffeYolo-Armnn.cpp58
-rw-r--r--tests/ExecuteNetwork/ExecuteNetwork.cpp14
-rw-r--r--tests/ExecuteNetwork/ExecuteNetworkParams.cpp10
-rw-r--r--tests/ExecuteNetwork/ExecuteNetworkProgramOptions.cpp4
-rw-r--r--tests/ImageTensorGenerator/ImageTensorGenerator.cpp8
-rw-r--r--tests/ImageTensorGenerator/ImageTensorGenerator.hpp9
-rw-r--r--tests/InferenceModel.hpp2
-rw-r--r--tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp8
-rw-r--r--tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp6
-rw-r--r--tests/NetworkExecutionUtils/NetworkExecutionUtils.cpp3
-rw-r--r--tests/TfResNext_Quantized-Armnn/TfResNext_Quantized-Armnn.cpp4
27 files changed, 20 insertions, 7517 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 135f6497be..308b885230 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -16,70 +16,6 @@ target_include_directories(inferenceTest PRIVATE ../src/armnnUtils)
target_include_directories(inferenceTest PRIVATE ../src/backends)
target_include_directories(inferenceTest PRIVATE ../third-party/stb)
-if(BUILD_CAFFE_PARSER)
- macro(CaffeParserTest testName sources)
- add_executable_ex(${testName} ${sources})
- target_include_directories(${testName} PRIVATE ../src/armnnUtils)
- target_include_directories(${testName} PRIVATE ../src/backends)
- set_target_properties(${testName} PROPERTIES COMPILE_FLAGS "${CAFFE_PARSER_TEST_ADDITIONAL_COMPILE_FLAGS}")
-
- target_link_libraries(${testName} inferenceTest)
- target_link_libraries(${testName} armnnCaffeParser)
- target_link_libraries(${testName} armnn)
- target_link_libraries(${testName} ${CMAKE_THREAD_LIBS_INIT})
- addDllCopyCommands(${testName})
- endmacro()
-
- set(CaffeCifar10AcrossChannels-Armnn_sources
- CaffeCifar10AcrossChannels-Armnn/CaffeCifar10AcrossChannels-Armnn.cpp
- Cifar10Database.hpp
- Cifar10Database.cpp)
- CaffeParserTest(CaffeCifar10AcrossChannels-Armnn "${CaffeCifar10AcrossChannels-Armnn_sources}")
-
- set(CaffeMnist-Armnn_sources
- CaffeMnist-Armnn/CaffeMnist-Armnn.cpp
- MnistDatabase.hpp
- MnistDatabase.cpp)
- CaffeParserTest(CaffeMnist-Armnn "${CaffeMnist-Armnn_sources}")
-
- set(CaffeAlexNet-Armnn_sources
- CaffeAlexNet-Armnn/CaffeAlexNet-Armnn.cpp
- CaffePreprocessor.hpp
- CaffePreprocessor.cpp)
- CaffeParserTest(CaffeAlexNet-Armnn "${CaffeAlexNet-Armnn_sources}")
-
- set(MultipleNetworksCifar10_SRC
- MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
- Cifar10Database.hpp
- Cifar10Database.cpp)
- CaffeParserTest(MultipleNetworksCifar10 "${MultipleNetworksCifar10_SRC}")
-
- set(CaffeResNet-Armnn_sources
- CaffeResNet-Armnn/CaffeResNet-Armnn.cpp
- CaffePreprocessor.hpp
- CaffePreprocessor.cpp)
- CaffeParserTest(CaffeResNet-Armnn "${CaffeResNet-Armnn_sources}")
-
- set(CaffeVGG-Armnn_sources
- CaffeVGG-Armnn/CaffeVGG-Armnn.cpp
- CaffePreprocessor.hpp
- CaffePreprocessor.cpp)
- CaffeParserTest(CaffeVGG-Armnn "${CaffeVGG-Armnn_sources}")
-
- set(CaffeInception_BN-Armnn_sources
- CaffeInception_BN-Armnn/CaffeInception_BN-Armnn.cpp
- CaffePreprocessor.hpp
- CaffePreprocessor.cpp)
- CaffeParserTest(CaffeInception_BN-Armnn "${CaffeInception_BN-Armnn_sources}")
-
- set(CaffeYolo-Armnn_sources
- CaffeYolo-Armnn/CaffeYolo-Armnn.cpp
- YoloDatabase.hpp
- YoloDatabase.cpp
- YoloInferenceTest.hpp)
- CaffeParserTest(CaffeYolo-Armnn "${CaffeYolo-Armnn_sources}")
-endif()
-
if(BUILD_TF_PARSER)
macro(TfParserTest testName sources)
add_executable_ex(${testName} ${sources})
@@ -119,8 +55,8 @@ if(BUILD_TF_PARSER)
set(TfResNext-Armnn_sources
TfResNext_Quantized-Armnn/TfResNext_Quantized-Armnn.cpp
- CaffePreprocessor.hpp
- CaffePreprocessor.cpp)
+ ImagePreprocessor.hpp
+ ImagePreprocessor.cpp)
TfParserTest(TfResNext-Armnn "${TfResNext-Armnn_sources}")
endif()
@@ -238,7 +174,7 @@ if (BUILD_ONNX_PARSER)
OnnxParserTest(OnnxMobileNet-Armnn "${OnnxMobileNet-Armnn_sources}")
endif()
-if (BUILD_ARMNN_SERIALIZER OR BUILD_CAFFE_PARSER OR BUILD_TF_PARSER OR BUILD_TF_LITE_PARSER OR BUILD_ONNX_PARSER)
+if (BUILD_ARMNN_SERIALIZER OR BUILD_TF_PARSER OR BUILD_TF_LITE_PARSER OR BUILD_ONNX_PARSER)
set(ExecuteNetwork_sources
ExecuteNetwork/ExecuteNetwork.cpp
ExecuteNetwork/ExecuteNetworkProgramOptions.cpp
@@ -257,9 +193,6 @@ if (BUILD_ARMNN_SERIALIZER OR BUILD_CAFFE_PARSER OR BUILD_TF_PARSER OR BUILD_TF_
if (BUILD_ARMNN_SERIALIZER)
target_link_libraries(ExecuteNetwork armnnSerializer)
endif()
- if (BUILD_CAFFE_PARSER)
- target_link_libraries(ExecuteNetwork armnnCaffeParser)
- endif()
if (BUILD_TF_PARSER)
target_link_libraries(ExecuteNetwork armnnTfParser)
endif()
@@ -285,9 +218,6 @@ if(BUILD_ACCURACY_TOOL)
if (BUILD_ARMNN_SERIALIZER)
target_link_libraries(${executorName} armnnSerializer)
endif()
- if (BUILD_CAFFE_PARSER)
- target_link_libraries(${executorName} armnnCaffeParser)
- endif()
if (BUILD_TF_PARSER)
target_link_libraries(${executorName} armnnTfParser)
endif()
diff --git a/tests/CaffeAlexNet-Armnn/CaffeAlexNet-Armnn.cpp b/tests/CaffeAlexNet-Armnn/CaffeAlexNet-Armnn.cpp
deleted file mode 100644
index e14cd61e72..0000000000
--- a/tests/CaffeAlexNet-Armnn/CaffeAlexNet-Armnn.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-#include "../InferenceTest.hpp"
-#include "../CaffePreprocessor.hpp"
-#include "armnnCaffeParser/ICaffeParser.hpp"
-
-int main(int argc, char* argv[])
-{
- int retVal = EXIT_FAILURE;
- try
- {
- using DataType = float;
- using DatabaseType = CaffePreprocessor;
- using ParserType = armnnCaffeParser::ICaffeParser;
- using ModelType = InferenceModel<ParserType, DataType>;
-
- // Coverity fix: ClassifierInferenceTestMain() may throw uncaught exceptions.
- retVal = armnn::test::ClassifierInferenceTestMain<DatabaseType, ParserType>(
- argc, argv, "bvlc_alexnet_1.caffemodel", true, "data", "prob", { 0 },
- [](const char* dataDir, const ModelType &) {
- return DatabaseType(dataDir);
- });
- }
- catch (const std::exception& e)
- {
- // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
- // exception of type std::length_error.
- // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
- std::cerr << "WARNING: CaffeAlexNet-Armnn: An error has occurred when running the "
- "classifier inference tests: " << e.what() << std::endl;
- }
- return retVal;
-}
diff --git a/tests/CaffeAlexNet-Armnn/Validation.txt b/tests/CaffeAlexNet-Armnn/Validation.txt
deleted file mode 100644
index cb95f050e2..0000000000
--- a/tests/CaffeAlexNet-Armnn/Validation.txt
+++ /dev/null
@@ -1,1000 +0,0 @@
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-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-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
diff --git a/tests/CaffeCifar10AcrossChannels-Armnn/CaffeCifar10AcrossChannels-Armnn.cpp b/tests/CaffeCifar10AcrossChannels-Armnn/CaffeCifar10AcrossChannels-Armnn.cpp
deleted file mode 100644
index 7bd98f69da..0000000000
--- a/tests/CaffeCifar10AcrossChannels-Armnn/CaffeCifar10AcrossChannels-Armnn.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-#include "../InferenceTest.hpp"
-#include "../Cifar10Database.hpp"
-#include "armnnCaffeParser/ICaffeParser.hpp"
-
-int main(int argc, char* argv[])
-{
- int retVal = EXIT_FAILURE;
- try
- {
- using DataType = float;
- using DatabaseType = Cifar10Database;
- using ParserType = armnnCaffeParser::ICaffeParser;
- using ModelType = InferenceModel<ParserType, DataType>;
-
- // Coverity fix: ClassifierInferenceTestMain() may throw uncaught exceptions.
- retVal = armnn::test::ClassifierInferenceTestMain<DatabaseType, ParserType>(
- argc, argv, "cifar10_full_iter_60000.caffemodel", true, "data", "prob",
- { 0, 1, 2, 4, 7 },
- [](const char* dataDir, const ModelType&) {
- return DatabaseType(dataDir);
- });
- }
- catch (const std::exception& e)
- {
- // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
- // exception of type std::length_error.
- // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
- std::cerr << "WARNING: CaffeCifar10AcrossChannels-Armnn: An error has occurred when running "
- "the classifier inference tests: " << e.what() << std::endl;
- }
- return retVal;
-}
diff --git a/tests/CaffeCifar10AcrossChannels-Armnn/Validation.txt b/tests/CaffeCifar10AcrossChannels-Armnn/Validation.txt
deleted file mode 100644
index a7b59465eb..0000000000
--- a/tests/CaffeCifar10AcrossChannels-Armnn/Validation.txt
+++ /dev/null
@@ -1,1000 +0,0 @@
-3
-8
-8
-8
-6
-8
-5
-6
-3
-8
-0
-9
-5
-7
-9
-8
-5
-7
-8
-6
-7
-0
-8
-9
-4
-3
-3
-0
-9
-6
-6
-5
-8
-3
-9
-3
-7
-9
-9
-5
-0
-6
-7
-3
-0
-9
-3
-8
-7
-2
-9
-8
-5
-5
-8
-8
-7
-5
-5
-3
-7
-5
-2
-3
-6
-7
-8
-0
-3
-7
-0
-3
-8
-8
-0
-2
-0
-8
-5
-8
-8
-0
-1
-7
-3
-0
-3
-3
-8
-9
-0
-2
-8
-6
-7
-3
-6
-0
-0
-7
-8
-5
-6
-3
-1
-1
-3
-6
-8
-7
-5
-0
-2
-3
-0
-3
-0
-3
-7
-5
-8
-0
-1
-2
-8
-8
-8
-3
-6
-0
-4
-1
-8
-9
-1
-0
-9
-4
-2
-8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0
-8
-7
-5
-0
-8
-5
-0
-0
-8
-2
-2
-2
-8
-9
-2
-7
-2
-7
-0
-7
-2
-1
-0
-0
-0
-8
-4
-7
-9
-8
-0
-0
-7
-7
-0
-7
-8
-4
-4
-3
-5
-0
-1
-3
-7
-0
-1
-8
-1
-4
-2
-3
-8
-4
-5
-0
-7
-8
-8
-3
-0
-8
-8
-8
-8
-8
-4
-3
-6
-7
-3
-1
-8
-3
-7
-7
-5
-5
-6
-6
-5
-8
-8
-1
-6
-8
-8
-3
-3
-3
-2
-0
-1
-8
-8
-8
-0
-0
-9
-9
-3
-3
-5
-8
-3
-0
-0
-4
-2
-3
-3
-7
-3
-0
-5
-8
-8
-9
-8
-5
-4
-8
-3
-0
-8
-7
-8
-3
-9
-2
-8
-4
-7
-8
-3
-7
-8
-8
-8
-8
-3
-6
-3
-3
-8
-1
-9
-9
-4
-6
-8
-0
-0
-0
-8
-8
-9
-2
-8
-8
-8
-7
-8
-3
-1
-7
-0
-1
-5
-8
-3
-3
-3
-8
-9
-3
-8
diff --git a/tests/CaffeInception_BN-Armnn/CaffeInception_BN-Armnn.cpp b/tests/CaffeInception_BN-Armnn/CaffeInception_BN-Armnn.cpp
deleted file mode 100644
index c41d0443a9..0000000000
--- a/tests/CaffeInception_BN-Armnn/CaffeInception_BN-Armnn.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-#include "../InferenceTest.hpp"
-#include "../CaffePreprocessor.hpp"
-#include "armnnCaffeParser/ICaffeParser.hpp"
-
-int main(int argc, char* argv[])
-{
- int retVal = EXIT_FAILURE;
- try
- {
- // Coverity fix: The following code may throw an exception of type std::length_error.
- std::vector<ImageSet> imageSet =
- {
- {"shark.jpg", 3694}
- };
-
- using DataType = float;
- using DatabaseType = CaffePreprocessor;
- using ParserType = armnnCaffeParser::ICaffeParser;
- using ModelType = InferenceModel<ParserType, DataType>;
-
- // Coverity fix: ClassifierInferenceTestMain() may throw uncaught exceptions.
- retVal = armnn::test::ClassifierInferenceTestMain<DatabaseType, ParserType>(
- argc, argv, "Inception-BN-batchsize1.caffemodel", true,
- "data", "softmax", { 0 },
- [&imageSet](const char* dataDir, const ModelType&) {
- return DatabaseType(dataDir, 224, 224, imageSet);
- });
- }
- catch (const std::exception& e)
- {
- // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
- // exception of type std::length_error.
- // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
- std::cerr << "WARNING: CaffeInception_BN-Armnn: An error has occurred when running "
- "the classifier inference tests: " << e.what() << std::endl;
- }
- return retVal;
-}
diff --git a/tests/CaffeInception_BN-Armnn/Validation.txt b/tests/CaffeInception_BN-Armnn/Validation.txt
deleted file mode 100644
index f6040137d8..0000000000
--- a/tests/CaffeInception_BN-Armnn/Validation.txt
+++ /dev/null
@@ -1,1000 +0,0 @@
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
-3694
diff --git a/tests/CaffeMnist-Armnn/CaffeMnist-Armnn.cpp b/tests/CaffeMnist-Armnn/CaffeMnist-Armnn.cpp
deleted file mode 100644
index c79cb78703..0000000000
--- a/tests/CaffeMnist-Armnn/CaffeMnist-Armnn.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-#include "../InferenceTest.hpp"
-#include "../MnistDatabase.hpp"
-#include "armnnCaffeParser/ICaffeParser.hpp"
-
-int main(int argc, char* argv[])
-{
- int retVal = EXIT_FAILURE;
- try
- {
- using DataType = float;
- using DatabaseType = MnistDatabase;
- using ParserType = armnnCaffeParser::ICaffeParser;
- using ModelType = InferenceModel<ParserType, DataType>;
-
- // Coverity fix: ClassifierInferenceTestMain() may throw uncaught exceptions.
- retVal = armnn::test::ClassifierInferenceTestMain<DatabaseType, ParserType>(
- argc, argv, "lenet_iter_9000.caffemodel", true, "data", "prob",
- { 0, 1, 5, 8, 9 },
- [](const char* dataDir, const ModelType&) {
- return DatabaseType(dataDir);
- });
- }
- catch (const std::exception& e)
- {
- // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
- // exception of type std::length_error.
- // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
- std::cerr << "WARNING: CaffeMnist-Armnn: An error has occurred when running "
- "the classifier inference tests: " << e.what() << std::endl;
- }
- return retVal;
-}
diff --git a/tests/CaffeMnist-Armnn/Validation.txt b/tests/CaffeMnist-Armnn/Validation.txt
deleted file mode 100644
index 63cbca6c56..0000000000
--- a/tests/CaffeMnist-Armnn/Validation.txt
+++ /dev/null
@@ -1,1000 +0,0 @@
-7
-2
-1
-0
-4
-1
-4
-9
-5
-9
-0
-6
-9
-0
-1
-5
-9
-7
-3
-4
-9
-6
-6
-5
-4
-0
-7
-4
-0
-1
-3
-1
-3
-4
-7
-2
-7
-1
-2
-1
-1
-7
-4
-2
-3
-5
-1
-2
-4
-4
-6
-3
-5
-5
-6
-0
-4
-1
-9
-5
-7
-8
-9
-3
-7
-4
-6
-4
-3
-0
-7
-0
-2
-9
-1
-7
-3
-2
-9
-7
-7
-6
-2
-7
-8
-4
-7
-3
-6
-1
-3
-6
-9
-3
-1
-4
-1
-7
-6
-9
-6
-0
-5
-4
-9
-9
-2
-1
-9
-4
-8
-7
-3
-9
-7
-9
-4
-4
-9
-2
-5
-4
-7
-6
-7
-9
-0
-5
-8
-5
-6
-6
-5
-7
-8
-1
-0
-1
-6
-4
-6
-7
-3
-1
-7
-1
-8
-2
-0
-2
-9
-9
-5
-5
-1
-5
-6
-0
-3
-4
-4
-6
-5
-4
-6
-5
-4
-5
-1
-4
-4
-7
-2
-3
-2
-7
-1
-8
-1
-8
-1
-8
-5
-0
-8
-9
-2
-5
-0
-1
-1
-1
-0
-9
-0
-3
-1
-6
-4
-2
-3
-6
-1
-1
-1
-3
-9
-5
-2
-9
-4
-5
-9
-3
-9
-0
-3
-6
-5
-5
-7
-2
-2
-7
-1
-2
-8
-4
-1
-7
-3
-3
-8
-8
-7
-9
-2
-2
-4
-1
-5
-9
-8
-7
-2
-3
-0
-4
-4
-2
-4
-1
-9
-5
-7
-7
-2
-8
-2
-6
-8
-5
-7
-7
-9
-1
-8
-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-7
-5
-6
-4
-9
-5
-1
-3
-3
-4
-7
-8
-9
-1
-1
-6
-9
-1
-4
-4
-5
-4
-0
-6
-2
-2
-3
-1
-5
-1
-2
-0
-3
-8
-1
-2
-6
-7
-1
-6
-2
-3
-9
-0
-1
-2
-2
-0
-8
-9
diff --git a/tests/CaffePreprocessor.cpp b/tests/CaffePreprocessor.cpp
deleted file mode 100644
index 54ce833b72..0000000000
--- a/tests/CaffePreprocessor.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-#include "InferenceTestImage.hpp"
-#include "CaffePreprocessor.hpp"
-
-#include <armnn/utility/NumericCast.hpp>
-
-#include <iostream>
-#include <fcntl.h>
-#include <array>
-
-const std::vector<ImageSet> g_DefaultImageSet =
-{
- {"shark.jpg", 2}
-};
-
-CaffePreprocessor::CaffePreprocessor(const std::string& binaryFileDirectory, unsigned int width, unsigned int height,
- const std::vector<ImageSet>& imageSet)
-: m_BinaryDirectory(binaryFileDirectory)
-, m_Height(height)
-, m_Width(width)
-, m_ImageSet(imageSet.empty() ? g_DefaultImageSet : imageSet)
-{
-}
-
-std::unique_ptr<CaffePreprocessor::TTestCaseData> CaffePreprocessor::GetTestCaseData(unsigned int testCaseId)
-{
- testCaseId = testCaseId % armnn::numeric_cast<unsigned int>(m_ImageSet.size());
- const ImageSet& imageSet = m_ImageSet[testCaseId];
- const std::string fullPath = m_BinaryDirectory + imageSet.first;
-
- InferenceTestImage image(fullPath.c_str());
- image.Resize(m_Width, m_Height, CHECK_LOCATION());
-
- // The model expects image data in BGR format.
- std::vector<float> inputImageData = GetImageDataInArmNnLayoutAsFloatsSubtractingMean(ImageChannelLayout::Bgr,
- image, m_MeanBgr);
-
- // List of labels: https://gist.github.com/yrevar/942d3a0ac09ec9e5eb3a
- const unsigned int label = imageSet.second;
- return std::make_unique<TTestCaseData>(label, std::move(inputImageData));
-}
diff --git a/tests/CaffePreprocessor.hpp b/tests/CaffePreprocessor.hpp
deleted file mode 100644
index a57382e618..0000000000
--- a/tests/CaffePreprocessor.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-#pragma once
-
-#include "ClassifierTestCaseData.hpp"
-
-#include <array>
-#include <string>
-#include <vector>
-#include <memory>
-
-/// Caffe requires BGR images, not normalized, mean adjusted and resized using smooth resize of STB library
-
-using ImageSet = std::pair<const std::string, unsigned int>;
-
-class CaffePreprocessor
-{
-public:
- using DataType = float;
- using TTestCaseData = ClassifierTestCaseData<DataType>;
-
- explicit CaffePreprocessor(const std::string& binaryFileDirectory,
- unsigned int width = 227,
- unsigned int height = 227,
- const std::vector<ImageSet>& imageSet = std::vector<ImageSet>());
- std::unique_ptr<TTestCaseData> GetTestCaseData(unsigned int testCaseId);
-
-private:
- unsigned int GetNumImageElements() const { return 3 * m_Width * m_Height; }
- unsigned int GetNumImageBytes() const { return 4 * GetNumImageElements(); }
-
- std::string m_BinaryDirectory;
- unsigned int m_Height;
- unsigned int m_Width;
- // Mean value of the database [B, G, R].
- const std::array<float, 3> m_MeanBgr = {{104.007965f, 116.669472f, 122.675102f}};
- const std::vector<ImageSet> m_ImageSet;
-};
diff --git a/tests/CaffeResNet-Armnn/CaffeResNet-Armnn.cpp b/tests/CaffeResNet-Armnn/CaffeResNet-Armnn.cpp
deleted file mode 100644
index aa814ff44b..0000000000
--- a/tests/CaffeResNet-Armnn/CaffeResNet-Armnn.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-#include "../InferenceTest.hpp"
-#include "../CaffePreprocessor.hpp"
-#include "armnnCaffeParser/ICaffeParser.hpp"
-
-int main(int argc, char* argv[])
-{
- int retVal = EXIT_FAILURE;
- try
- {
- // Coverity fix: The following code may throw an exception of type std::length_error.
- std::vector<ImageSet> imageSet =
- {
- {"ILSVRC2012_val_00000018.JPEG", 21 },
- {"shark.jpg", 2}
- };
-
- armnn::TensorShape inputTensorShape({ 1, 3, 224, 224 });
-
- using DataType = float;
- using DatabaseType = CaffePreprocessor;
- using ParserType = armnnCaffeParser::ICaffeParser;
- using ModelType = InferenceModel<ParserType, DataType>;
-
- // Coverity fix: ClassifierInferenceTestMain() may throw uncaught exceptions.
- retVal = armnn::test::ClassifierInferenceTestMain<DatabaseType, ParserType>(
- argc, argv, "ResNet_50_ilsvrc15_model.caffemodel", true,
- "data", "prob", { 0, 1 },
- [&imageSet](const char* dataDir, const ModelType&) {
- return DatabaseType(dataDir, 224, 224, imageSet);
- }, &inputTensorShape);
- }
- catch (const std::exception& e)
- {
- // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
- // exception of type std::length_error.
- // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
- std::cerr << "WARNING: CaffeResNet-Armnn: An error has occurred when running "
- "the classifier inference tests: " << e.what() << std::endl;
- }
- return retVal;
-}
diff --git a/tests/CaffeResNet-Armnn/Validation.txt b/tests/CaffeResNet-Armnn/Validation.txt
deleted file mode 100644
index b3c5de80b7..0000000000
--- a/tests/CaffeResNet-Armnn/Validation.txt
+++ /dev/null
@@ -1,2000 +0,0 @@
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
-21
-2
diff --git a/tests/CaffeSqueezeNet1_0-Armnn/CaffeSqueezeNet1_0-Armnn.cpp b/tests/CaffeSqueezeNet1_0-Armnn/CaffeSqueezeNet1_0-Armnn.cpp
deleted file mode 100644
index c19abefef8..0000000000
--- a/tests/CaffeSqueezeNet1_0-Armnn/CaffeSqueezeNet1_0-Armnn.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-#include "../InferenceTest.hpp"
-#include "../CaffePreprocessor.hpp"
-#include "armnnCaffeParser/ICaffeParser.hpp"
-
-int main(int argc, char* argv[])
-{
- using DataType = float;
- using DatabaseType = CaffePreprocessor;
- using ParserType = armnnCaffeParser::ICaffeParser;
- using ModelType = InferenceModel<ParserType, DataType>;
-
- return armnn::test::ClassifierInferenceTestMain<DatabaseType, ParserType>(
- argc, argv, "squeezenet.caffemodel", true,
- "input", "prob", { 0 },
- [](const char* dataDir, const ModelType &) { return CaffePreprocessor(dataDir); });
-}
diff --git a/tests/CaffeVGG-Armnn/CaffeVGG-Armnn.cpp b/tests/CaffeVGG-Armnn/CaffeVGG-Armnn.cpp
deleted file mode 100644
index 733cc29b27..0000000000
--- a/tests/CaffeVGG-Armnn/CaffeVGG-Armnn.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-#include "../InferenceTest.hpp"
-#include "../CaffePreprocessor.hpp"
-#include "armnnCaffeParser/ICaffeParser.hpp"
-
-int main(int argc, char* argv[])
-{
- armnn::TensorShape inputTensorShape({ 1, 3, 224, 224 });
- int retVal = EXIT_FAILURE;
- try
- {
- using DataType = float;
- using DatabaseType = CaffePreprocessor;
- using ParserType = armnnCaffeParser::ICaffeParser;
- using ModelType = InferenceModel<ParserType, DataType>;
-
- // Coverity fix: ClassifierInferenceTestMain() may throw uncaught exceptions.
- retVal = armnn::test::ClassifierInferenceTestMain<DatabaseType, ParserType>(
- argc, argv, "VGG_CNN_S.caffemodel", true,
- "input", "prob", { 0 },
- [](const char* dataDir, const ModelType&) {
- return DatabaseType(dataDir, 224, 224);
- }, &inputTensorShape);
- }
- catch (const std::exception& e)
- {
- // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
- // exception of type std::length_error.
- // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
- std::cerr << "WARNING: CaffeVGG-Armnn: An error has occurred when running "
- "the classifier inference tests: " << e.what() << std::endl;
- }
- return retVal;
-}
diff --git a/tests/CaffeVGG-Armnn/Validation.txt b/tests/CaffeVGG-Armnn/Validation.txt
deleted file mode 100644
index cb95f050e2..0000000000
--- a/tests/CaffeVGG-Armnn/Validation.txt
+++ /dev/null
@@ -1,1000 +0,0 @@
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-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Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-#include "../YoloInferenceTest.hpp"
-#include "armnnCaffeParser/ICaffeParser.hpp"
-#include "armnn/TypesUtils.hpp"
-
-int main(int argc, char* argv[])
-{
- armnn::TensorShape inputTensorShape{ { 1, 3, YoloImageHeight, YoloImageWidth } };
-
- using YoloInferenceModel = InferenceModel<armnnCaffeParser::ICaffeParser,
- float>;
-
- int retVal = EXIT_FAILURE;
- try
- {
- // Coverity fix: InferenceTestMain() may throw uncaught exceptions.
- retVal = InferenceTestMain(argc, argv, { 0 },
- [&inputTensorShape]()
- {
- return make_unique<YoloTestCaseProvider<YoloInferenceModel>>(
- [&]
- (const InferenceTestOptions &commonOptions,
- typename YoloInferenceModel::CommandLineOptions modelOptions)
- {
- if (!ValidateDirectory(modelOptions.m_ModelDir))
- {
- return std::unique_ptr<YoloInferenceModel>();
- }
-
- typename YoloInferenceModel::Params modelParams;
- modelParams.m_ModelPath = modelOptions.m_ModelDir + "yolov1_tiny_voc2007_model.caffemodel";
- modelParams.m_InputBindings = { "data" };
- modelParams.m_OutputBindings = { "fc12" };
- modelParams.m_InputShapes = { inputTensorShape };
- modelParams.m_IsModelBinary = true;
- modelParams.m_ComputeDevices = modelOptions.GetComputeDevicesAsBackendIds();
- modelParams.m_VisualizePostOptimizationModel = modelOptions.m_VisualizePostOptimizationModel;
- modelParams.m_EnableFp16TurboMode = modelOptions.m_EnableFp16TurboMode;
-
- return std::make_unique<YoloInferenceModel>(modelParams,
- commonOptions.m_EnableProfiling,
- commonOptions.m_DynamicBackendsPath);
- });
- });
- }
- catch (const std::exception& e)
- {
- // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
- // exception of type std::length_error.
- // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
- std::cerr << "WARNING: CaffeYolo-Armnn: An error has occurred when running "
- "the classifier inference tests: " << e.what() << std::endl;
- }
- return retVal;
-}
diff --git a/tests/ExecuteNetwork/ExecuteNetwork.cpp b/tests/ExecuteNetwork/ExecuteNetwork.cpp
index f812e53e04..8ab286b16b 100644
--- a/tests/ExecuteNetwork/ExecuteNetwork.cpp
+++ b/tests/ExecuteNetwork/ExecuteNetwork.cpp
@@ -13,9 +13,6 @@
#if defined(ARMNN_SERIALIZER)
#include "armnnDeserializer/IDeserializer.hpp"
#endif
-#if defined(ARMNN_CAFFE_PARSER)
-#include "armnnCaffeParser/ICaffeParser.hpp"
-#endif
#if defined(ARMNN_TF_PARSER)
#include "armnnTfParser/ITfParser.hpp"
#endif
@@ -472,15 +469,6 @@ int main(int argc, const char* argv[])
return EXIT_FAILURE;
#endif
}
- else if (modelFormat.find("caffe") != std::string::npos)
- {
- #if defined(ARMNN_CAFFE_PARSER)
- return MainImpl<armnnCaffeParser::ICaffeParser, float>(ProgramOptions.m_ExNetParams, runtime);
- #else
- ARMNN_LOG(fatal) << "Not built with Caffe parser support.";
- return EXIT_FAILURE;
- #endif
- }
else if (modelFormat.find("onnx") != std::string::npos)
{
#if defined(ARMNN_ONNX_PARSER)
@@ -526,7 +514,7 @@ int main(int argc, const char* argv[])
else
{
ARMNN_LOG(fatal) << "Unknown model format: '" << modelFormat
- << "'. Please include 'caffe', 'tensorflow', 'tflite' or 'onnx'";
+ << "'. Please include 'tensorflow', 'tflite' or 'onnx'";
return EXIT_FAILURE;
}
}
diff --git a/tests/ExecuteNetwork/ExecuteNetworkParams.cpp b/tests/ExecuteNetwork/ExecuteNetworkParams.cpp
index 890ab2a658..4e3b5e313d 100644
--- a/tests/ExecuteNetwork/ExecuteNetworkParams.cpp
+++ b/tests/ExecuteNetwork/ExecuteNetworkParams.cpp
@@ -41,14 +41,6 @@ void CheckModelFormat(const std::string& modelFormat)
"built with serialization support.");
#endif
}
- else if (modelFormat.find("caffe") != std::string::npos)
- {
-#if defined(ARMNN_CAFFE_PARSER)
-#else
- throw armnn::InvalidArgumentException("Can't run model in caffe format without a "
- "built with Caffe parser support.");
-#endif
- }
else if (modelFormat.find("onnx") != std::string::npos)
{
#if defined(ARMNN_ONNX_PARSER)
@@ -83,7 +75,7 @@ void CheckModelFormat(const std::string& modelFormat)
else
{
throw armnn::InvalidArgumentException(fmt::format("Unknown model format: '{}'. "
- "Please include 'caffe', 'tensorflow', 'tflite' or 'onnx'",
+ "Please include 'tensorflow', 'tflite' or 'onnx'",
modelFormat));
}
}
diff --git a/tests/ExecuteNetwork/ExecuteNetworkProgramOptions.cpp b/tests/ExecuteNetwork/ExecuteNetworkProgramOptions.cpp
index b52adaa325..7c1db61841 100644
--- a/tests/ExecuteNetwork/ExecuteNetworkProgramOptions.cpp
+++ b/tests/ExecuteNetwork/ExecuteNetworkProgramOptions.cpp
@@ -173,12 +173,12 @@ ProgramOptions::ProgramOptions() : m_CxxOptions{"ExecuteNetwork",
cxxopts::value<std::vector<std::string>>())
("f,model-format",
- "armnn-binary, caffe-binary, caffe-text, onnx-binary, onnx-text, tflite-binary, tensorflow-binary or "
+ "armnn-binary, onnx-binary, onnx-text, tflite-binary, tensorflow-binary or "
"tensorflow-text.",
cxxopts::value<std::string>())
("m,model-path",
- "Path to model file, e.g. .armnn, .caffemodel, .prototxt, .tflite, .onnx",
+ "Path to model file, e.g. .armnn, , .prototxt, .tflite, .onnx",
cxxopts::value<std::string>(m_ExNetParams.m_ModelPath))
("i,input-name",
diff --git a/tests/ImageTensorGenerator/ImageTensorGenerator.cpp b/tests/ImageTensorGenerator/ImageTensorGenerator.cpp
index 754d980423..34dbe1e352 100644
--- a/tests/ImageTensorGenerator/ImageTensorGenerator.cpp
+++ b/tests/ImageTensorGenerator/ImageTensorGenerator.cpp
@@ -164,7 +164,7 @@ public:
("f,model-format",
"Format of the intended model file that uses the images."
"Different formats have different image normalization styles."
- "Accepted values (caffe, tensorflow, tflite)",
+ "Accepted values (tensorflow, tflite)",
cxxopts::value<std::string>(m_ModelFormat))
("o,outfile",
"Output raw tensor file path",
@@ -235,11 +235,7 @@ public:
unsigned int GetNewHeight() {return static_cast<unsigned int>(std::stoi(m_NewHeight));}
SupportedFrontend GetModelFormat()
{
- if (m_ModelFormat == "caffe")
- {
- return SupportedFrontend::Caffe;
- }
- else if (m_ModelFormat == "tensorflow")
+ if (m_ModelFormat == "tensorflow")
{
return SupportedFrontend::TensorFlow;
}
diff --git a/tests/ImageTensorGenerator/ImageTensorGenerator.hpp b/tests/ImageTensorGenerator/ImageTensorGenerator.hpp
index 4793f822fb..f2ee470a7a 100644
--- a/tests/ImageTensorGenerator/ImageTensorGenerator.hpp
+++ b/tests/ImageTensorGenerator/ImageTensorGenerator.hpp
@@ -24,14 +24,13 @@ struct NormalizationParameters
enum class SupportedFrontend
{
- Caffe = 0,
- TensorFlow = 1,
- TFLite = 2,
+ TensorFlow = 0,
+ TFLite = 1,
};
/** Get normalization parameters.
* Note that different flavours of models and different model data types have different normalization methods.
- * This tool currently only supports Caffe, TF and TFLite models
+ * This tool currently only supports TF and TFLite models
*
* @param[in] modelFormat One of the supported frontends
* @param[in] outputType Output type of the image tensor, also the type of the intended model
@@ -46,8 +45,6 @@ NormalizationParameters GetNormalizationParameters(const SupportedFrontend& mode
normParams.stddev = { 1.0, 1.0, 1.0 };
switch (modelFormat)
{
- case SupportedFrontend::Caffe:
- break;
case SupportedFrontend::TensorFlow:
case SupportedFrontend::TFLite:
default:
diff --git a/tests/InferenceModel.hpp b/tests/InferenceModel.hpp
index dca3ab2788..cab594ed48 100644
--- a/tests/InferenceModel.hpp
+++ b/tests/InferenceModel.hpp
@@ -367,7 +367,7 @@ public:
options
.allow_unrecognised_options()
.add_options()
- ("m,model-dir", "Path to directory containing model files (.caffemodel/.prototxt/.tflite)",
+ ("m,model-dir", "Path to directory containing model files (.prototxt/.tflite)",
cxxopts::value<std::string>(cLineOptions.m_ModelDir))
("c,compute", backendsMessage.c_str(),
cxxopts::value<std::vector<std::string>>(cLineOptions.m_ComputeDevices)->default_value("CpuRef"))
diff --git a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
index f8337a5286..345a0fed98 100644
--- a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
+++ b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
@@ -76,7 +76,7 @@ int main(int argc, char* argv[])
"Path to armnn format model file",
cxxopts::value<std::string>(modelPath))
("f,model-format",
- "The model format. Supported values: caffe, tensorflow, tflite",
+ "The model format. Supported values: tensorflow, tflite",
cxxopts::value<std::string>(modelFormat))
("i,input-name",
"Identifier of the input tensors in the network separated by comma with no space.",
@@ -312,11 +312,7 @@ int main(int argc, char* argv[])
const unsigned int batchSize = 1;
// Get normalisation parameters
SupportedFrontend modelFrontend;
- if (modelFormat == "caffe")
- {
- modelFrontend = SupportedFrontend::Caffe;
- }
- else if (modelFormat == "tensorflow")
+ if (modelFormat == "tensorflow")
{
modelFrontend = SupportedFrontend::TensorFlow;
}
diff --git a/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp b/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
index 456ff68e7c..9c51d3f0a7 100644
--- a/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
+++ b/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
@@ -6,7 +6,7 @@
#include "armnn/ArmNN.hpp"
#include "armnn/Utils.hpp"
#include "armnn/INetwork.hpp"
-#include "armnnCaffeParser/ICaffeParser.hpp"
+#include "armnnTfParser/TfParser.hpp"
#include "../Cifar10Database.hpp"
#include "../InferenceTest.hpp"
#include "../InferenceModel.hpp"
@@ -89,7 +89,7 @@ int main(int argc, char* argv[])
return EXIT_FAILURE;
}
- fs::path modelPath = fs::path(modelDir + "/cifar10_full_iter_60000.caffemodel");
+ fs::path modelPath = fs::path(modelDir + "/cifar10_tf.prototxt");
// Create runtime
// This will also load dynamic backend in case that the dynamic backend path is specified
@@ -123,7 +123,7 @@ int main(int argc, char* argv[])
};
std::vector<Net> networks;
- armnnCaffeParser::ICaffeParserPtr parser(armnnCaffeParser::ICaffeParser::Create());
+ armnnTfParser::ITfParserPtr parser(armnnTfParser::ITfParser::Create());
const int networksCount = 4;
for (int i = 0; i < networksCount; ++i)
diff --git a/tests/NetworkExecutionUtils/NetworkExecutionUtils.cpp b/tests/NetworkExecutionUtils/NetworkExecutionUtils.cpp
index d902d23d86..74c878304d 100644
--- a/tests/NetworkExecutionUtils/NetworkExecutionUtils.cpp
+++ b/tests/NetworkExecutionUtils/NetworkExecutionUtils.cpp
@@ -12,9 +12,6 @@
#if defined(ARMNN_SERIALIZER)
#include "armnnDeserializer/IDeserializer.hpp"
#endif
-#if defined(ARMNN_CAFFE_PARSER)
-#include "armnnCaffeParser/ICaffeParser.hpp"
-#endif
#if defined(ARMNN_TF_PARSER)
#include "armnnTfParser/ITfParser.hpp"
#endif
diff --git a/tests/TfResNext_Quantized-Armnn/TfResNext_Quantized-Armnn.cpp b/tests/TfResNext_Quantized-Armnn/TfResNext_Quantized-Armnn.cpp
index c152c0f6c2..bec2771d4b 100644
--- a/tests/TfResNext_Quantized-Armnn/TfResNext_Quantized-Armnn.cpp
+++ b/tests/TfResNext_Quantized-Armnn/TfResNext_Quantized-Armnn.cpp
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: MIT
//
#include "../InferenceTest.hpp"
-#include "../CaffePreprocessor.hpp"
+#include "../ImagePreprocessor.hpp"
#include "armnnTfParser/ITfParser.hpp"
int main(int argc, char* argv[])
@@ -21,7 +21,7 @@ int main(int argc, char* argv[])
armnn::TensorShape inputTensorShape({ 1, 3, 224, 224 });
using DataType = float;
- using DatabaseType = CaffePreprocessor;
+ using DatabaseType = ImagePreprocessor<DataType>;;
using ParserType = armnnTfParser::ITfParser;
using ModelType = InferenceModel<ParserType, DataType>;