ie_utils.hpp
Go to the documentation of this file.
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 /**
6  * @brief A header file that provides utilities for calculating per layer theoretical statistic
7  * @file ie_utils.hpp
8  */
9 #pragma once
10 #include <unordered_map>
11 #include <string>
12 #include <cpp/ie_cnn_network.h>
13 
14 namespace InferenceEngine {
15 
16 /**
17  * @brief Contains information about floating point operations
18  * and common size of parameter blobs.
19  */
20 struct LayerComplexity {
21  /** @brief Number of floating point operations for reference implementation */
22  size_t flops;
23  /** @brief Total size of parameter blobs */
24  size_t params;
25 };
26 
27 /**
28  * @brief Computes per layer theoretical computational and memory
29  * complexity.
30  *
31  * @param network input graph
32  * @return map from layer name to layer complexity
33  */
34 std::unordered_map<std::string, LayerComplexity> getNetworkComplexity(const InferenceEngine::ICNNNetwork &network);
35 
36 } // namespace InferenceEngine
37 
size_t params
Total size of parameter blobs.
Definition: ie_utils.hpp:24
A header file that provides wrapper for ICNNNetwork object.
std::unordered_map< std::string, LayerComplexity > getNetworkComplexity(const InferenceEngine::ICNNNetwork &network)
Computes per layer theoretical computational and memory complexity.
Definition: ie_argmax_layer.hpp:11
This is the main interface to describe the NN topology.
Definition: ie_icnn_network.hpp:35
Contains information about floating point operations and common size of parameter blobs...
Definition: ie_utils.hpp:20
size_t flops
Number of floating point operations for reference implementation.
Definition: ie_utils.hpp:22