20.11
CaffeCifar10AcrossChannels-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 "../Cifar10Database.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 =
Cifar10Database
;
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,
"cifar10_full_iter_60000.caffemodel"
,
true
,
"data"
,
"prob"
,
22
{ 0, 1, 2, 4, 7 },
23
[](
const
char
* dataDir,
const
ModelType&) {
24
return
DatabaseType(dataDir);
25
});
26
}
27
catch
(
const
std::exception& e)
28
{
29
// Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
30
// exception of type std::length_error.
31
// Using stderr instead in this context as there is no point in nesting try-catch blocks here.
32
std::cerr <<
"WARNING: CaffeCifar10AcrossChannels-Armnn: An error has occurred when running "
33
"the classifier inference tests: "
<< e.what() << std::endl;
34
}
35
return
retVal;
36
}
InferenceModel
Definition:
InferenceModel.hpp:323
armnnCaffeParser::ICaffeParser
Definition:
ICaffeParser.hpp:24
armnn::DataType
DataType
Definition:
Types.hpp:32
Cifar10Database
Definition:
Cifar10Database.hpp:12
main
int main(int argc, char *argv[])
Definition:
CaffeCifar10AcrossChannels-Armnn.cpp:9
ICaffeParser.hpp
tests
CaffeCifar10AcrossChannels-Armnn
CaffeCifar10AcrossChannels-Armnn.cpp
Generated on Wed Nov 25 2020 09:59:14 for ArmNN by
1.8.13