blob: b859042935b4af7902d7d7d3af8cb695bed84bf8 [file] [log] [blame]
telsoa014fcda012018-03-09 14:13:49 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// See LICENSE file in the project root for full license information.
4//
5#include "../InferenceTest.hpp"
6#include "../ImageNetDatabase.hpp"
7#include "armnnCaffeParser/ICaffeParser.hpp"
8
9int main(int argc, char* argv[])
10{
11 armnn::TensorShape inputTensorShape({ 1, 3, 224, 224 });
surmeh013537c2c2018-05-18 16:31:43 +010012 int retVal = EXIT_FAILURE;
13 try
14 {
15 // Coverity fix: ClassifierInferenceTestMain() may throw uncaught exceptions.
16 retVal = armnn::test::ClassifierInferenceTestMain<ImageNetDatabase, armnnCaffeParser::ICaffeParser>(
17 argc, argv, "VGG_CNN_S.caffemodel", true,
18 "input", "prob", { 0 },
19 [](const char* dataDir) { return ImageNetDatabase(dataDir, 224, 224); },
20 &inputTensorShape);
21 }
22 catch (const std::exception& e)
23 {
24 // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
25 // exception of type std::length_error.
26 // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
27 std::cerr << "WARNING: CaffeVGG-Armnn: An error has occurred when running "
28 "the classifier inference tests: " << e.what() << std::endl;
29 }
30 return retVal;
telsoa014fcda012018-03-09 14:13:49 +000031}