Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / include / ie_utils.hpp
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