YuanGongND / ast

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

the problems when run ast_models.py #1

Closed ctwgL closed 3 years ago

ctwgL commented 3 years ago

Hello, when I run the ast_models.py, the folowing problem occured. image

YuanGongND commented 3 years ago

Hi there,

I just ran the ast_models.py in my environment but was not able to reproduce it. Could you please elaborate on how you ran the code (i.e., directly run ast_models.py or call it from another script? Have you changed anything of ast_models.py)? Thanks!

Yuan

ctwgL commented 3 years ago

I just directly run the ast_models.py, Because I just want to test the pretrained AudioSet model, so I delete the code when audioset_pretrain == False. I will test it again tomarrow.

YuanGongND commented 3 years ago

Oh, you should not delete the code when audioset_pretrain==False, because when you set audioset_pretrain=True, it will initialize an AST model without pretraining and then load the weights. So please keep the ASTModel class unchanged and test again. Let me know if the problem is still there.

-Yuan