OpenVINO™ 2022.2 を使用するときにモデルのレイヤーを読み取ることは可能ですか?
コンテンツタイプ: トラブルシューティング | 記事 ID: 000092984 | 最終改訂日: 2023/11/20
OpenVINO™ 2022.2 では、モデル レイヤーのウェイトはネットワークの [定数] 操作にあります。
get_data() メソッドを使用して、OpenVINO™ 2022.2 の定数ノードから重みの値を取得します。
from openvino.inference_engine import IECore
import ngraph as ng
ie = IECore()
path_xml="<model_name>.xml"
path_bin="<model_name>.bin"
net = ie.read_network(model=path_xml, weights=path_bin)
func = ng.function_from_cnn(net)
ops = func.get_ops()
print(ops[14]) #Print the node attributes for the specific node index
print(ops[14].get_data()) #Specific Constant operations layer, all weights are located in the Constant operations