blob: 904a5f2b828fa36f0c5151575fd0dfe9965f7f04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
// Copyright (C) 2018 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
/**
* @brief This is a header file for the ICNNNetworkStats class
* @file ie_icnn_network_stats.hpp
*/
#pragma once
#include <string>
#include <memory>
#include <limits>
#include <vector>
#include <map>
#include "details/ie_irelease.hpp"
namespace InferenceEngine {
class NetworkNodeStats;
using NetworkNodeStatsPtr = std::shared_ptr<NetworkNodeStats>;
using NetworkNodeStatsWeakPtr = std::weak_ptr<NetworkNodeStats>;
using NetworkStatsMap = std::map<std::string, NetworkNodeStatsPtr>;
/**
* @class ICNNNetworkStats
* @brief This is the interface to describe the NN topology scoring statistics
*/
class ICNNNetworkStats : public details::IRelease {
public:
virtual void setNodesStats(const NetworkStatsMap& stats) = 0;
virtual const NetworkStatsMap& getNodesStats() const = 0;
virtual bool isEmpty() const = 0;
};
class NetworkNodeStats {
public:
NetworkNodeStats() { }
explicit NetworkNodeStats(int statCount) {
float mn = (std::numeric_limits<float>::max)();
float mx = (std::numeric_limits<float>::min)();
for (int i = 0; i < statCount; i++) {
_minOutputs.push_back(mn);
_maxOutputs.push_back(mx);
}
}
public:
std::vector<float> _minOutputs;
std::vector<float> _maxOutputs;
};
} // namespace InferenceEngine
|