Exporting torchscript model with tracing fails but scripting works

35 views Asked by At

I am having trouble exporting the detectron 2 model in tracing mode. However it works well with scripting mode.

(detectron2) D:\AI\Research\YOLOV8>python detectron2\\tools\\deploy\\export_model.py --config-file n_o\\config.yaml --output n_o --export-method tracing --format torchscript MODEL.WEIGHTS n_o\\model_final.pth MODEL.DEVICE cuda

It provides me an error that my_custom_val is not registered. However I have cross checked it and visualise it as well.

(detectron2) D:\AI\Research\YOLOV8>python D:\\AI\\Research\\detectron2\\tools\\deploy\\export_model.py --config-file n_o\\config.yaml --output n_o --export-method scripting --format torchscript MODEL.WEIGHTS n_o\\model_final.pth MODEL.DEVICE cuda

The above command works fine for me.

0

There are 0 answers