We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
YOLOv5x SavedModel format is over a 2GB TF limit:
TensorFlow SavedModel: export failure: Message third_party.py.keras.protobuf.SavedMetadata exceeds maximum protobuf size of 2GB: 2283672738
First noted in #251 (comment)
@zldrobit could you help on this?
Colab Notebook https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb
In Colab notebook after running Setup cell: https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb
!python export.py --weights yolov5x.pt --img 640 --include saved_model
See tensorflow/tensorflow#45041 for the official TF issue
The text was updated successfully, but these errors were encountered:
@glenn-jocher I can confirm the problem with your provided notebook. I also found some links about the 2GB size limit: https://stackoverflow.com/a/42906762/3036450, tensorflow/tensorflow#4291 and https://stackoverflow.com/questions/59558170/tensorflow-graph-bigger-than-2gb. According to those links, we should not break the 2GB limit of protobuf. One way to get a saved model smaller than 2GB is wrap the yolov5x pb model (~350MB) in a saved model format.
EDIT: The exported pb model is 90% smaller than the saved_model.
Sorry, something went wrong.
@glenn-jocher I sent a PR to address this issue, but it breaks backward compatibility for saved_model export. Here's a notebook for validation.
glenn-jocher
Successfully merging a pull request may close this issue.
Search before asking
YOLOv5 Component
Export
Bug
YOLOv5x SavedModel format is over a 2GB TF limit:
First noted in #251 (comment)
@zldrobit could you help on this?
Environment
Colab Notebook
https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb
Minimal Reproducible Example
In Colab notebook after running Setup cell:
https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb
Additional
See tensorflow/tensorflow#45041 for the official TF issue
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: