ArmNN
NotReleased
CaffeAlexNet-Armnn.cpp
Go to the documentation of this file.
1
//
2
// Copyright © 2017 Arm Ltd. All rights reserved.
3
// SPDX-License-Identifier: MIT
4
//
5
#include "../InferenceTest.hpp"
6
#include "../CaffePreprocessor.hpp"
7
#include "
armnnCaffeParser/ICaffeParser.hpp
"
8
9
int
main
(
int
argc,
char
* argv[])
10
{
11
int
retVal = EXIT_FAILURE;
12
try
13
{
14
using
DataType
= float;
15
using
DatabaseType =
CaffePreprocessor
;
16
using
ParserType =
armnnCaffeParser::ICaffeParser
;
17
using
ModelType =
InferenceModel<ParserType, DataType>
;
18
19
// Coverity fix: ClassifierInferenceTestMain() may throw uncaught exceptions.
20
retVal = armnn::test::ClassifierInferenceTestMain<DatabaseType, ParserType>(
21
argc, argv,
"bvlc_alexnet_1.caffemodel"
,
true
,
"data"
,
"prob"
, { 0 },
22
[](
const
char
* dataDir,
const
ModelType &) {
23
return
DatabaseType(dataDir);
24
});
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: CaffeAlexNet-Armnn: An error has occurred when running the "
32
"classifier inference tests: "
<< e.what() << std::endl;
33
}
34
return
retVal;
35
}
InferenceModel
Definition:
InferenceModel.hpp:316
ICaffeParser.hpp
CaffePreprocessor
Definition:
CaffePreprocessor.hpp:18
main
int main(int argc, char *argv[])
Definition:
CaffeAlexNet-Armnn.cpp:9
armnn::DataType
DataType
Definition:
Types.hpp:32
armnnCaffeParser::ICaffeParser
Definition:
ICaffeParser.hpp:24
tests
CaffeAlexNet-Armnn
CaffeAlexNet-Armnn.cpp
Generated on Fri Mar 13 2020 16:06:59 for ArmNN by
1.8.13