Yolov3: Cannot find --transfer in train.py and how to freeze layers except darknet backbone?

Created on 14 Jan 2020  路  4Comments  路  Source: ultralytics/yolov3

May I ask where is --transfer in train.py for transfer learning? And how to set requires_grad = False for all layers except darknet backbone?

question

Most helpful comment

@yoga-0125 to train from an existing model or backbone simply use --weights model, for example:

python3 train.py --weights darknet53.conv.74

or for better results:

python3 train.py --weights ultralytics68.pt

We've eliminated the transfer flag and do not recommend freezing any layers, as this nearly always results in worse performance.

All 4 comments

@yoga-0125 to train from an existing model or backbone simply use --weights model, for example:

python3 train.py --weights darknet53.conv.74

or for better results:

python3 train.py --weights ultralytics68.pt

We've eliminated the transfer flag and do not recommend freezing any layers, as this nearly always results in worse performance.

Thank you very much for your reply!

python3 train.py --weights ultralytics68.pt

Imagine I have new data and I'd like to improve my production model. When I use python3 train.py --weights myProductionModel.pt command, only is the darknet backbone updated?

@adrianosantospb I don't understand your question. The --weights command loads the weights you specify into the --cfg you specify. If there is a mismatch it will attempt to load all weights into layers that have matching names and shapes.

Was this page helpful?
0 / 5 - 0 ratings