Comments (7)
it seems it is due to the inconsistent input_tdim
in training and inference, could you share the training script (in particular, what is the input_tdim
?). Thanks!
from ast.
Thanks for the reply. Here's the training script:
set=full
imagenetpretrain=True
if [ $set == balanced ]
then
bal=none
lr=5e-5
epoch=25
#tr_data=/data/sls/scratch/yuangong/aed-pc/src/enhance_label/datafiles_local/balanced_train_data_type1_2_mean.json
tr_data=./data/datafiles/train_data.json
lrscheduler_start=10
lrscheduler_step=5
lrscheduler_decay=0.5
wa_start=6
wa_end=25
else
bal=bal
lr=1e-5
epoch=15 #5
tr_data=./data/datafiles/train_data.json
lrscheduler_start=4 #2
lrscheduler_step=1 #1
lrscheduler_decay=0.25 #0.5
wa_start=1
wa_end=15 #5
fi
#te_data=/data/sls/scratch/yuangong/audioset/datafiles/eval_data.json
te_data=./data/datafiles/valid_data.json
freqm=48
timem=62 # 192
mixup=0
# corresponding to overlap of 6 for 16*16 patches
fstride=10
tstride=10
batch_size=4 # 12
dataset_mean=-4.2677393
dataset_std=4.5689974
audio_length=512 #1024
noise=False
from ast.
If you set audio_length=512
in training, then in inference, shouldn't the input_tdim=312
be 512?
from ast.
It works, and thanks again.
BTW, when I loaded fine-tuned weights to update audioset pretrained model, do I set audioset_pretrain=True or audioset_pretrain=False?
model = ASTModel(label_dim=class_num, fstride=10, tstride=10, input_fdim=128, input_tdim=input_tdim, **audioset_pretrain=True**, model_size='base384',verbose=False)
from ast.
I guess it doesn't matter.
You can check by
model.load_state_dict(sd, strict=True)
, so it ensures the new weight fully covers all parameters (so which initial model does not matter).
-Yuan
from ast.
Just setting strict=True
forces new weights are loaded. Thanks for the reply.
from ast.
thanks for letting me know.
- Just to clarify,
strict=True
itself does not change the loading behavior, but it will throw an error if the model parameter and the checkpoint are mismatched. If you don't see an error, that means all parameters are loaded from the checkpoint.
-Yuan
from ast.
Related Issues (20)
- For own data HOT 1
- Installing requirement and CUDA on a fresh virtual environnement HOT 1
- how to use my own dataset HOT 3
- AST Audioset Training Time and Hardware HOT 2
- seq2seq classification with AST HOT 2
- CPU memory increase while training HOT 6
- Fine tuning AST model to Music Emotion Classification Overfit HOT 2
- How can I adapt the pretrained AST model to fit my own dataset HOT 6
- ESC-50-master zip file location has changed HOT 2
- Installing requirements issues
- When I download the pretrained model with stride=16, I need to change `fstride` and `tstride` in the source code from 10 to 16. Besides these changes, what else do I need to adjust?
- Different audio sample size for fine-tuning the model gives overfitting issue HOT 1
- training MAP HOT 2
- One question regarding the linear projection of AST. HOT 1
- Inquiry Regarding Audio Spectrogram Transformer HOT 2
- self-contained Google Colab script error
- Ask for help HOT 1
- some questions when reproducing your results HOT 1
- csv error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ast.