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

Inconsistent model output format after PR #6292 #7031

Closed
2 tasks done
MrinalJain17 opened this issue Mar 18, 2022 · 1 comment · Fixed by #7032
Closed
2 tasks done

Inconsistent model output format after PR #6292 #7031

MrinalJain17 opened this issue Mar 18, 2022 · 1 comment · Fixed by #7032
Labels
bug Something isn't working

Comments

@MrinalJain17
Copy link
Contributor

MrinalJain17 commented Mar 18, 2022

Search before asking

  • I have searched the YOLOv5 issues and found no similar bug report.

YOLOv5 Component

Export

Bug

Based on this return statement in TFModel, the output of a TF saved_model was/should be a tensor. https://github.com/ultralytics/yolov5/blob/master/models/tf.py#L368

However, after the changes introduced in #6292, the TF saved_model returns the said tensor wrapped in a list.

  1. This breaks compatibility across TF saved_models exported before and after the change.
  2. Moreover, the output of a saved model is either a tensor (if keras=True) or the tensor wrapped in a list keras=False (now default).

Environment

YOLOv5 Latest
OS: Ubuntu, Windows
Python: 3.9
TensorFlow: 2.7

Minimal Reproducible Example

No response

Additional

#7032 attempts to solve all these issues.

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@MrinalJain17 MrinalJain17 added the bug Something isn't working label Mar 18, 2022
@glenn-jocher
Copy link
Member

@MrinalJain17 thanks for the PR! I will take a look there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants