Skip to content

[core] show_graphview unable to save YOLOV8 read from ONNX

What commit version of aidge do you use

  • aidge: 0.5.0
  • aidge_backend_cpu: 0.5.0
  • aidge_backend_opencv: 0.1.5
  • aidge_core: 0.5.1
  • aidge_export_cpp: 0.2.1
  • aidge_learning: 0.2.3
  • aidge_onnx: 0.4.1

Problem description

The production of a json was expected.

It is not a regression

Reproducible example code: The script script_graphview.py with the ONNX YOLO_LARD_dataset.onnx produce this log:

(env_aidge_p10) farges@WDTIS181H:/mnt/d/farges/Documents/VBL$ python3 script_graphview.py
[NOTICE] - - model_22_Expand (Expand)
[NOTICE] - - model_22_Expand_1 (Expand)
[NOTICE] - - model_22_Expand_2 (Expand)
[NOTICE] - - model_22_Expand_3 (Expand)
[NOTICE] - - model_22_Expand_4 (Expand)
[NOTICE] - - model_22_Expand_5 (Expand)
Native operators: 609 (23 types)
- Add: 20
- Concat: 25
- ConstantOfShape: 3
- Conv2D: 29
- ConvTranspose2D: 1
- Div: 10
- Expand: 6
- Gather: 9
- Mul: 85
- PaddedConv2D: 47
- PaddedMaxPooling2D: 3
- Producer: 246
- Reshape: 11
- Resize: 2
- Shape: 9
- Sigmoid: 67
- Slice: 18
- Softmax: 1
- Split: 2
- Squeeze: 3
- Sub: 2
- Transpose: 3
- Unsqueeze: 7
Generic operators: 0 (0 types)
Native types coverage: 100.0% (23/23)
Native operators coverage: 100.0% (609/609)
Traceback (most recent call last):
  File "/mnt/d/farges/Documents/VBL/script_graphview.py", line 7, in <module>
    aidge_core.gview_to_json(model,p)
  File "/mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages/aidge_core/show_graphview.py", line 243, in gview_to_json
    graphview_dict = _create_dict(ordered_nodes, write_trainable_params_embed, write_trainable_params_ext, path_trainable_params, params_file_format)
  File "/mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages/aidge_core/show_graphview.py", line 140, in _create_dict
    node_attr_dict = _retrieve_operator_attrs(node)
  File "/mnt/d/farges/Documents/aidge/env_aidge_p10/lib/python3.10/site-packages/aidge_core/show_graphview.py", line 24, in _retrieve_operator_attrs
    node_attr_dict[key] = value.name
AttributeError: 'aidge_core.aidge_core.Tensor' object has no attribute 'name'