Files
openvino/model-optimizer/extensions/analysis/nodes.py
Alexey Suhov 6478f1742a Align copyright notice in python scripts (CVS-51320) (#4974)
* Align copyright notice in python scripts (CVS-51320)
2021-03-26 17:54:28 +03:00

21 lines
719 B
Python

# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from mo.graph.graph import Graph
from mo.utils.model_analysis import AnalyzeAction
class IntermediatesNodesAnalysis(AnalyzeAction):
"""
The analyser gets node names, their shapes and values (if possible) of all nodes in the model.
"""
def analyze(self, graph: Graph):
outputs_desc = dict()
for node in graph.get_op_nodes():
outputs_desc[node.name] = {'shape': node.soft_get('shape', None),
'data_type': None,
'value': None,
}
return {'intermediate': outputs_desc}, None