¿Es posible leer la capa del modelo cuando se utiliza OpenVINO™ 2022.2?
Tipo de contenido: Resolución de problemas | ID del artículo: 000092984 | Última revisión: 20/11/2023
Para OpenVINO™ 2022.2, los pesos de la capa de modelo se encuentran en las operaciones constantes de la red.
Utilice el método get_data() para recuperar el valor de pesos del nodo Constant en 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