blob: a6581bea5523768d9a619e9fa3b7d0547e9ae104 [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{
surmeh013537c2c2018-05-18 16:31:43 +010011 int retVal = EXIT_FAILURE;
12 try
telsoa014fcda012018-03-09 14:13:49 +000013 {
surmeh013537c2c2018-05-18 16:31:43 +010014 // Coverity fix: The following code may throw an exception of type std::length_error.
15 std::vector<ImageSet> imageSet =
16 {
17 {"shark.jpg", 3694}
18 };
19
20 // Coverity fix: ClassifierInferenceTestMain() may throw uncaught exceptions.
21 retVal = armnn::test::ClassifierInferenceTestMain<ImageNetDatabase, armnnCaffeParser::ICaffeParser>(
22 argc, argv, "Inception-BN-batchsize1.caffemodel", true,
23 "data", "softmax", { 0 },
24 [&imageSet](const char* dataDir) { return ImageNetDatabase(dataDir, 224, 224, imageSet); });
25 }
26 catch (const std::exception& e)
27 {
28 // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
29 // exception of type std::length_error.
30 // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
31 std::cerr << "WARNING: CaffeInception_BN-Armnn: An error has occurred when running "
32 "the classifier inference tests: " << e.what() << std::endl;
33 }
34 return retVal;
telsoa014fcda012018-03-09 14:13:49 +000035}