keras-yolo3 icon indicating copy to clipboard operation
keras-yolo3 copied to clipboard

Which layers of the model are finetuned?

Open ManjeeraJagiri opened this issue 6 years ago • 3 comments

I understand when we set 'by_name=True', only those layers with same names will be loaded with weights and the rest finetuned. But can I know which section of layers exactly in yolo.py will be finetuned? And where are we initializing the weights of these layers? Thanks!

    if os.path.exists(saved_weights_name): 
        print("\nLoading pretrained weights.\n")
        template_model.load_weights(saved_weights_name)
    else:
        template_model.load_weights("backend.h5", by_name=True)

ManjeeraJagiri avatar May 24 '18 10:05 ManjeeraJagiri

Hello,have you figure out this problem?

yuyijie1995 avatar May 31 '18 13:05 yuyijie1995

@yuyijie1995 , Nope. I haven't

ManjeeraJagiri avatar Jun 06 '18 12:06 ManjeeraJagiri

I am inspecting the backend.h5 file, found 249 variables of yolo inside the h5 file. only 10 variables are missed, they are ['conv_81', 'input_3', 'input_2', 'conv_93', 'input_4', 'conv_105', 'input_5', 'yolo_layer_1', 'yolo_layer_2', 'yolo_layer_3']. besides the input layer(for input) and yolo layer(for caculating loss). only conv_81, _93, _105 are missed, they are the last conv layers which have the specific num_classes outputs, maybe only finetune these layers

XiaoSX avatar Oct 30 '20 10:10 XiaoSX