GithubHelp home page GithubHelp logo

Comments (4)

YuanGongND avatar YuanGongND commented on August 16, 2024

Hi there,

The norm stats are just the mean/std of the dataset, we calculate it using this script. Note that when we calculate the stats, the impact of mixup, SpecAug has already been considered, so you can see we input the audio_conf to the dataloader, which contains mixup, SpecAug information.

-Yuan

from ast.

joewale avatar joewale commented on August 16, 2024

Thanks for your quick reply. I have understand how to do.
Another question: audio_conf I used should be the same as it used in pretrained model ? I use the pretrained model as follows: https://www.dropbox.com/s/cv4knew8mvbrnvq/audioset_0.4593.pth?dl=1

from ast.

YuanGongND avatar YuanGongND commented on August 16, 2024

Hi there,

Only num_mel_bins of audio_conf needs to be the same as the pretrained model.

num_mel_bins: must be 128 to use the pretrained model.
target_length: no need/ should not be the same with the pretrained model, it should be the temporal frame length of your dataset, e.g., if your audios are 1s, target_length should be 100.
freqm and timem: no need/should not be same with the pretrained model, we suggest to mask a reasonable portion, but not all your data, e.g., if your target_length is 100, we suggest to set timem with 24.
mixup: no need/should not be the same with the pretrained model, depend if you want to use mixup for your training.
dataset: should not be the same as the pretrained model, but notice this is used here and there in traintest.py and run.py for loss function/evaluation strategy flags, please take a look and make modifications.
mean and std: better to use the stats of your dataset, but it might be OK to just reuse the AudioSet stats.
noise: depends on if you want to augment noise during training.

By the way, it is highly recommended to set audioset_pretrain=True and set input_tdim as your input length (in frames) when you initialize the AST model to use the pretrained model rather than manually use load_state_dict because the first will automatically adjust the positional embeddings for your input length, which is important.

-Yuan

from ast.

joewale avatar joewale commented on August 16, 2024

Thanks, I have a try by your good advice.

from ast.

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.