falibabaei / yamnet_finetun

By incorporating these scripts into the YAMNet code (https://github.com/tensorflow/models/tree/master/research/audioset/yamnet), you can fine-tune the model.
2 stars 2 forks source link

training #1

Closed HeChengHui closed 1 month ago

HeChengHui commented 1 month ago

@falibabaei Thank you for the finetuning script.

i am currently trying to train on 2k+ 0.96s long clips with 3 classes. Am i supposed to change yamnet=yamnet_model.yamnet_frames_model_transfer(params,1) -> yamnet=yamnet_model.yamnet_frames_model_transfer(params,3)?

would softmax still be the correct activation function?

falibabaei commented 1 month ago

Hi,

Yes, the second argument is the number of classes that you have: yamnet_frames_model_transfer(params, num_classes). If you look at yamnet.py, the num_classes parameter is used to adjust the output of the softmax function.

HeChengHui commented 1 month ago

@falibabaei Thank you for the confirmation. If i want to use the trained model, do you know which part should i edit in the original yamnet file to adjust the last layer?