ThanatosShinji / onnx-tool

A parser, editor and profiler tool for ONNX models.
https://pypi.org/project/onnx-tool/
MIT License
399 stars 52 forks source link

Support for TensorRT operators #75

Closed vanlinhtruongdang closed 7 months ago

vanlinhtruongdang commented 8 months ago

Dear Author,

I am currently working on evaluating deep learning models with various architectures. I used TensorRT to perform converting and optimizing the model for deployment on edge devices. However, this framework only supports calculating the latency and MACs of the Convolutional layer, while what I need is an overview of parameters on each different type of layer like your tool provides.

I did a reversion from the TensorRT optimized model back to ONNX and used your tool to visualize. However, there are some operator that are not yet supported (e.g PointWise, Reformat, Scale, Shuffle...). For example, I'm running a test with ShuffleNet and SepViT model, the error occurred while processing the Reformat layers.

I have attached the error and model below. I hope you will check out and support some more operators from TensorRT, this will help me a lot in my research process.

ONNX Model: https://drive.google.com/drive/folders/1CRlTaSz7aJgUQEWMea1t6tVCAgJuIzxj?usp=sharing

image

ThanatosShinji commented 8 months ago

Supporting TensorRT is not this repo's goal. They are no longer standard ONNX operators even if you exported it to ONNX format. You should profile these models before TensorRT's process.

vanlinhtruongdang commented 7 months ago

Thank you for your reply!