Couldn't export Pytorch model to ONNX

Viewed 358

I’m trying to export my trained model that in .pt format to ONNX but after I execute the script the program output bunch of logging stuff like in the pic below and the converted onnx format seems not appear in my local disk I don’t know what I got wrong here?

enter image description here

1 Answers

It looks like the export went fine. There should be a file "ScaledYolo4.onnx" in the directory from where you run the script.

To make sure what directory it is, you can add this at the end of your program:

import os
print(os.getcwd())

You can also try to specify the full path instead of just "ScaledYolo4.onnx".

Edit. Add this at the end of your program and run, what do you see?

import os
print(os.getcwd())
print(os.listdir())
Related