AlexeyAB / darknet

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

Train only the first layers #7919

Open ilya71ru opened 3 years ago

ilya71ru commented 3 years ago

Is it possible to train only the first layers? I know that there is a freezing of layers and training only the last ones, but I would like not to change the last ones and throw the error to the first layers and only change them. I want to train yolo for thermal imaging images. Now yolo works on them, but not very well, I have a dataset of thermal images and having retrained the first layers, I thought to adjust it for this task. Is it possible and do you think it will work, or do you still need to retrain the last layers for this?

lsd1994 commented 2 years ago

You can change this loop when i==0 don't call update_gpu. https://github.com/AlexeyAB/darknet/blob/b8dceb7ed055b1ab2094bdbd0756b61473db3ef6/src/network_kernels.cu#L285 But I guess the result is bad.