YuanGongND / ast

Code for the Interspeech 2021 paper "AST: Audio Spectrogram Transformer".
BSD 3-Clause "New" or "Revised" License
1.17k stars 221 forks source link

Create inference.py #20

Closed JeffC0628 closed 3 years ago

JeffC0628 commented 3 years ago

a simple inference script for single audio, heavily base on demo.py and traintest.py

YuanGongND commented 3 years ago

Thanks Jeff,

I think it is a great contribution. As I said in the issue, I suggest using audioset_pretrain=True to use the pretrained model rather than manually load_state_dict. But I can understand you want to offer flexibility on which model to load and it should be fine if your task's input length is also 1024.

-Yuan