You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the YOLOv5 issues and found no similar bug report.
YOLOv5 Component
Training
Bug
The change made in #6019 currently not working when I specified single integer.
When specified single integer value, the freeze value is created as a list of single integer: e.g. [10]. Therefore, the train.py code only freezes the 11th layer, remaining other former layers 0, .., 9 are ignored.
👋 Hello @bilzard, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.
If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.
If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.
YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.
changed the title [-]--freeze option don't work as expected[/-][+]--freeze option when specified single integer don't work as expected[/+]on Dec 20, 2021
Personally, I prefer keeping specification 1 and give up 2 because specification 1 is simple.
But I don't know if there are the cases when freezing only middle layers or latter layers.
Since specification 1 is just a syntax sugar, keeping spec 2 might be better.
changed the title [-]--freeze option when specified single integer don't work as expected[/-][+]--freeze option when specified single integer doen't work as expected[/+]on Dec 20, 2021
changed the title [-]--freeze option when specified single integer doen't work as expected[/-][+]--freeze option doen't work as expected[/+]on Dec 20, 2021
Docker – sudo docker pull ultralytics/yolov5:latest to update your image
Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀!
Activity
github-actions commentedon Dec 20, 2021
👋 Hello @bilzard, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.
If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.
If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.
For business inquiries or professional support requests please visit https://ultralytics.com or email Glenn Jocher at glenn.jocher@ultralytics.com.
Requirements
Python>=3.6.0 with all requirements.txt installed including PyTorch>=1.7. To get started:
$ git clone https://github.com/ultralytics/yolov5 $ cd yolov5 $ pip install -r requirements.txtEnvironments
YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
Status
If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.
[-]--freeze option don't work as expected[/-][+]--freeze option when specified single integer don't work as expected[/+]bilzard commentedon Dec 20, 2021
I read the initial issue.
#6001 (comment)
I think meeting both specifications 1, 2 is difficult:
Because when specifying single integer, the program can't distinguish the two cases: 1) freeze only layer 10 and 2) freeze layer from 0 to 9.
I think there are two solutions:
a) give up specification 1 or 2
b) separate option for specification 1 to 2. e.g:
--freeze-up-to 10and--freeze 0 1 2bilzard commentedon Dec 20, 2021
Personally, I prefer keeping specification 1 and give up 2 because specification 1 is simple.
But I don't know if there are the cases when freezing only middle layers or latter layers.
Since specification 1 is just a syntax sugar, keeping spec 2 might be better.
[-]--freeze option when specified single integer don't work as expected[/-][+]--freeze option when specified single integer doen't work as expected[/+][-]--freeze option when specified single integer doen't work as expected[/-][+]--freeze option doen't work as expected[/+]glenn-jocher commentedon Dec 20, 2021
@bilzard thanks for the bug report! I'm able to reproduce. Will push a fix.
`--freeze` fix
`--freeze` fix (#6044)
glenn-jocher commentedon Dec 20, 2021
@bilzard good news 😃! Your original issue may now be fixed ✅ in PR #6044. To receive this update:
git pullfrom within youryolov5/directory orgit clone https://github.com/ultralytics/yolov5againmodel = torch.hub.load('ultralytics/yolov5', 'yolov5s', force_reload=True)sudo docker pull ultralytics/yolov5:latestto update your imageThank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀!
bilzard commentedon Dec 20, 2021
@glenn-jocher Thank you for the quick reply.
I checked the PR. It works most of the cases, but I think this solution is insufficient.
How do the user specify to freeze only one layer? See, layer 0 only?
glenn-jocher commentedon Dec 21, 2021
@bilzard good question! Layer 0 freeze is not supported currently. I'll take a look and see if I can add support for this use case.
Update Neuralmagic-YoloV5 integration to v6.1 (#29)
`--freeze` fix (ultralytics#6044)
`--freeze` fix (#6044)
`--freeze` fix (#6044)