Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to Tensorflow problems #610

Open
zlelik opened this issue Nov 13, 2024 · 0 comments
Open

Export to Tensorflow problems #610

zlelik opened this issue Nov 13, 2024 · 0 comments

Comments

@zlelik
Copy link

zlelik commented Nov 13, 2024

I am trying to export *.pt model to tensorflow like this
python export.py --weights yolov9-e-converted.pt --include saved_model

and I am getting this error

TensorFlow SavedModel: export failure ❌ 1.7s: cannot import name 'C3' from 'models.common' (/root/conversion/yolov9/models/common.py)

python export.py --weights yolov9-e-converted.pt --include pb
fails with another error

TensorFlow SavedModel: export failure ❌ 5.1s: cannot import name 'C3' from 'models.common' (/root/conversion/yolov9/models/common.py)
TensorFlow GraphDef: starting export with tensorflow 2.18.0...
TensorFlow GraphDef: export failure ❌ 0.0s: 'NoneType' object has no attribute 'inputs'

python export.py --weights yolov9-e-converted.pt --include tfjs
fails with this error

TensorFlow SavedModel: export failure ❌ 1.7s: cannot import name 'C3' from 'models.common' (/root/conversion/yolov9/models/common.py)

TensorFlow GraphDef: starting export with tensorflow 2.18.0...
TensorFlow GraphDef: export failure ❌ 0.0s: 'NoneType' object has no attribute 'inputs'

tensorflow.python.framework.errors_impl.NotFoundError: yolov9-e-converted.pb; No such file or directory
TensorFlow.js: export failure ❌ 4.5s: [Errno 2] No such file or directory: 'yolov9-e-converted_web_model/model.json'

But
python export.py --weights yolov9-e-converted.pt --include onnx
works fine and produces file yolov9-e-converted.onnx file.

I do not need speed or GPU. I just need to convert it and if it takes 2 days to convert, I am fine. I need to do it once.
or maybe I am doing something completely wrong and using export.py in a wrong way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant