Hi! I am trying to convert an .onnx file to .har using the hailosdkclient with this code! But got this error
AttributeError: ‘NoneType’ object has no attribute ‘in_valid_subgraph’
Additionally, I used Netron to analyze the nodes of my .onnx model. Thanks in advance!
from hailo_sdk_client import ClientRunner
onnx_model_name = ‘c’
onnx_path = ‘/home/alx/c2.onnx’
har_path = ‘/home/alx/c2.har’
chosen_hw_arch = ‘hailo8l’
runner = ClientRunner(hw_arch=chosen_hw_arch)
hn, npz = runner.translate_onnx_model(
onnx_path, onnx_model_name,
start_node_names=[‘images’],
end_node_names=[‘/model.22/dfl/Reshape_1, /model.22/Sigmoid’ ],
net_input_shapes={‘images’: [1, 3, 640, 640]})
runner.save_har(har_path)
print(f"Model successfully translated and saved as {har_path}")