AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.71k stars 7.96k forks source link

Is there an Option to freeze certain layers, instead of stopbackward freezing all layers before it? #6886

Open Srinivasan95D opened 3 years ago

Srinivasan95D commented 3 years ago

i was wondering if there is an option to freeze specific layers during training. I have used Stopbackward but i'd liek to know if there is an option like noupdates for a certain layer.

Srinivasan95D commented 3 years ago

https://github.com/AlexeyAB/darknet/issues/4133#issuecomment-544730470

I think i found an answer here. setting onlyforward=1 on [conv] sections will make sure backpropagation will not happen for that layer, Hence it acts as if the layer is frozen. is this right @AlexeyAB ?