WeidiXie / VGG-Speaker-Recognition

Utterance-level Aggregation For Speaker Recognition In The Wild
362 stars 98 forks source link

how to implement a transfer learning solution for classification problems? #44

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi, I want to train some layers and leave the others frozen (Dont have to train the entire model) I dont know how I can adjust it "python main.py --net resnet34s --batch_size 160 --gpu 2,3 --lr 0.001 --warmup_ratio 0.1 --optimizer adam --epochs 128 --multiprocess 8 --loss softmax --data_path ../path_to_voxceleb2:" ??

WeidiXie commented 4 years ago

You need to go to the model.py, and make all layers "trainable=False".

This is not a specific problem about this code, please check Keras documentation.