Ist es möglich, den Layer des Modells zu lesen, wenn OpenVINO™ 2022.2 verwendet wird?
Inhaltstyp: Fehlerbehebung | Artikel-ID: 000092984 | Letzte Überprüfung: 20.11.2023
Für OpenVINO™ 2022.2 befinden sich die Gewichte des Modelllayers in den konstanten Operationen des Netzwerks.
Verwenden Sie die Methode get_data(), um den Gewichtungswert vom Knoten "Konstant" in OpenVINO™ 2022.2 abzurufen:
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