ZhangGe6 / onnx-modifier

A tool to modify ONNX models in a visualization fashion, based on Netron and Flask.
MIT License
1.28k stars 157 forks source link

Persist the input shape information in visulization after `node_renamed_io` #102

Closed Lewis-Lu closed 5 months ago

Lewis-Lu commented 5 months ago

This an observation during the modification, as I changed the input node name, the shape info disappeared in the panel. It should be persistent.

modify_info as follows: test.zip

{'node_states': {'onnx::Unsqueeze_0': 'Exist', 'onnx::Unsqueeze_1': 'Exist', '/Unsqueeze': 'Exist', '/Unsqueeze_1': 'Deleted', '/Softmax': 'Exist', '/Slice': 'Exist', '/Mul': 'Exist', 'out_20': 'Exist'}, 'node_renamed_io': {'onnx::Unsqueeze_0': {'onnx::Unsqueeze_0': 'depth'}, '/Unsqueeze_1': {'onnx::Unsqueeze_0': 'depth'}, 'onnx::Unsqueeze_1': {'onnx::Unsqueeze_1': 'img_feature'}, '/Unsqueeze': {'onnx::Unsqueeze_1': 'img_feature'}, '/Softmax': {'/Unsqueeze_1_output_0': 'depth'}}, 'node_changed_attr': {}, 'added_node_info': {}, 'added_outputs': {}, 'added_inputs': {}, 'rebatch_info': {}, 'changed_initializer': {}, 'postprocess_args': {'shapeInf': False, 'cleanUp': False}}

I'm not that familiar with the front-end part, so maybe anyone could provide the solution faster.

Best, Lewis

ZhangGe6 commented 5 months ago

@Lewis-Lu Thanks for reporting. This issue has been fixed.