audiossl
audiossl copied to clipboard
Extracting embeddings.
Hello,
Could you please provide me information on how to extract embeddings from the model?
I am working with VoxCeleb2 audio data. I am training the model from scratch and would like to extract embeddings for further processing.
Please do let me know.
Regards, Sreeni...
Hi,@Sreeni1204. Thanks for you insterest in our work!
For extracting embedding, please see example in "/audiossl/methods/atst/downstream/train_freeze.py".
pretrained_encoder = get_pretraied_encoder(args)
pretrained_module = PretrainedEncoderPLModule(pretrained_encoder,
6.,
args.n_last_blocks)
embedding = pretrained_module(input)
You may also want see extract_embedding function(also in train_freeze.py), which show how to extract all embeddings from a dataloader.
Hope this helps. If you have any further questions, please let me know.
Hello @lmaxwell thank you for the clarifications. I will go through the file, and consult you for further clarifications.
Thank you :)