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?
@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.
Most helpful comment
@yoga-0125 to train from an existing model or backbone simply use
--weights model, for example:or for better results:
We've eliminated the transfer flag and do not recommend freezing any layers, as this nearly always results in worse performance.