Giter Site home page Giter Site logo

Comments (5)

HugoBothaMD avatar HugoBothaMD commented on August 20, 2024 1

@sreenivasaupadhyaya @Mortyzhou-Shef-BIT
Hi there,
I agree SSAST is a cool modeling approach. However, it is not my repo/project and I do not have bandwidth to help you on your use case. Commenting out the lines above as suggested by @YuanGongND worked for my use case. Probably best to close this thread as resolved.
Hugo

from ssast.

YuanGongND avatar YuanGongND commented on August 20, 2024

I am wondering if modifying these two lines and using finetuningavgtok as the task in forward could help your application (basically comment out the mlp head)?

x = torch.mean(x[:, self.cls_token_num:, :], dim=1)
x = self.mlp_head(x)
return x

Btw, I would suggest first trying the original inference code to see if the prediction accuracy is as expected and then extract the embedding. This helps avoid mistakes in the inference pipeline (e.g., input normalization, model parallelization, etc).

-Yuan

from ssast.

HugoBothaMD avatar HugoBothaMD commented on August 20, 2024

Perfect, thanks so much.

I ended up defining 'finetuningavgtok_embed' as basically 'finetuningavgtok' but with the last line commented as another task option in ASTModel. Not sure if that will be better or if the one with the last two lines commented, as you suggested, would be better. But regardless, some options for embeddings to test!

Hugo

from ssast.

sreenivasaupadhyaya avatar sreenivasaupadhyaya commented on August 20, 2024

Hi @HugoBothaMD , I am also interested to use the encoder part of this model for audio event classification task. It would be of great help if you could guide me how i could make use of the model/code in this repo for my application. I would like to have the below setup.

I would like to generate the embeddings for my audio events of 1 second duration.
def get_embeddings_ssast(audio_event):
#define the ssast model
#load pretrained weights
#create a alternate model which returns the embeddings
#generate the embeddings
#return the mebeddings

I would like to use these embeddings as input features in my classifier.

from ssast.

Mortyzhou-Shef-BIT avatar Mortyzhou-Shef-BIT commented on August 20, 2024

Hi @HugoBothaMD , I am also interested to use the encoder part of this model for audio event classification task. It would be of great help if you could guide me how i could make use of the model/code in this repo for my application. I would like to have the below setup.

I would like to generate the embeddings for my audio events of 1 second duration. def get_embeddings_ssast(audio_event): #define the ssast model #load pretrained weights #create a alternate model which returns the embeddings #generate the embeddings #return the mebeddings

I would like to use these embeddings as input features in my classifier.

Hii, Do you finish it? Thank you

from ssast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.