Megvii-BaseDetection / YOLOX

YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with MegEngine, ONNX, TensorRT, ncnn, and OpenVINO supported. Documentation: https://yolox.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

torch2trt 转换问题

chennaikai11 opened this issue · comments

我在使用torch2trt转我的yolox模型的时候,原本可以转,但是我是用repvggblock替换原本的cspblock的时候,torch2trt就会失效,不会出现任何错误而是直接中止转换。就像这样(yolox) R:\YOLOX>python tool/trt.py --onlypth
2023-12-07 20:53:47.909 | INFO | main:main:63 - loaded checkpoint done.
[12/07/2023-20:53:50] [TRT] [I] [MemUsageChange] Init CUDA: CPU +776, GPU +0, now: CPU 13024, GPU 2274 (MiB)

(yolox) R:\YOLOX>。但是使用pth to onnx 再从onnx to engine是可行的,但是不会生成model_trt文件。能否告知一下为什么torch2trt不支持repvggblock。或者能提供一个调用python api的推理脚本吗,方便使用engine文件。十分感谢大佬!