Skip to content

lanhongvp/OnnxTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Onnx Tools Collection

Infer ONNX model's tensor shapes on demand

Usage

Take Yolov2 as an example, we can use this command to get any tensor's shape as you want.

  • Singe tensor support

    • python .\get_val_info.py -im "..\\models\\yolov2.onnx" -om "..\\models\\yolov2_marked.onnx" -tn convolution2d_1_output -iv "None=1"
  • Multiple tensors support

    • python .\get_val_info.py -im "..\\models\\yolov2.onnx" -om "..\\models\\yolov2_marked.onnx" -tn convolution2d_1_output convolution2d_2_output -iv "None=1"

Todo

  • Loop body shape inference support
  • Support read data from disk to run the onnx model, then get related tensor shape.

About

Inference ONNX model's tensor shapes on demand

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages