surmeh01 | bceff2f | 2018-03-29 16:29:27 +0100 | [diff] [blame] | 1 | // |
| 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 "../Cifar10Database.hpp" |
| 7 | #include "armnnTfParser/ITfParser.hpp" |
| 8 | |
| 9 | int main(int argc, char* argv[]) |
| 10 | { |
| 11 | armnn::TensorShape inputTensorShape({ 1, 32, 32, 3 }); |
surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame^] | 12 | |
| 13 | int retVal = EXIT_FAILURE; |
| 14 | try |
| 15 | { |
| 16 | // Coverity fix: ClassifierInferenceTestMain() may throw uncaught exceptions. |
| 17 | retVal = armnn::test::ClassifierInferenceTestMain<Cifar10Database, armnnTfParser::ITfParser>( |
| 18 | argc, argv, "cifar10_tf.prototxt", false, |
| 19 | "data", "prob", { 0, 1, 2, 4, 7 }, |
| 20 | [](const char* dataDir) { return Cifar10Database(dataDir, true); }, |
| 21 | &inputTensorShape); |
| 22 | } |
| 23 | catch (const std::exception& e) |
| 24 | { |
| 25 | // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an |
| 26 | // exception of type std::length_error. |
| 27 | // Using stderr instead in this context as there is no point in nesting try-catch blocks here. |
| 28 | std::cerr << "WARNING: TfCifar10-Armnn: An error has occurred when running " |
| 29 | "the classifier inference tests: " << e.what() << std::endl; |
| 30 | } |
| 31 | return retVal; |
surmeh01 | bceff2f | 2018-03-29 16:29:27 +0100 | [diff] [blame] | 32 | } |