-
Notifications
You must be signed in to change notification settings - Fork 1
/
running_exp.txt
90 lines (59 loc) · 3.34 KB
/
running_exp.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
ALL REGULAR TESTING FOR NOW
STEP 1. CREATE YOUR SPECTOGRAMS
python CreateSpectograms.py --data_path ../path/to/timit/train --noise_type noisegoeshere --num_spect numberofspects
-noise types are
babble
engine
factory1
ops
bucc
dishes
bike
tap
default specotgrams is 30
if u did 30 spectograms, your data will be in MetaLearningSpeech/spectograms_train30/noise/NOISETYPEYOUCHOSE
STEP 2. TRAIN YOUR MODELS
I HARD CODED STUFF CUZ I WAS LAZY
if you want to train a model for just ONE noise type
python lstm_mask.py --train_lr .005 --num-epochs 51 --train_all 0 --noise_type babble --num_spectograms 30 --exp_name babble --test_file path/to/TIMIT/TEST
-keep --train_all to be 0. change the noise_type, num-epochs and train_lr
--num_spectograms 30 - means that u created 30 spectograms for training set from CreateSpectograms.py
- the rest of the loading data will be found.
- change exp_name to somoething relevant. it will be the name of the training graph/model path
- most directories are split up by noise types
if u want to train a model on MULTIPLE noise types, u have to do some changing in the code....
python lstm_mask.py --train_lr .005 --num-epochs 51 --train_all 1 --num_spectograms 30 --exp_name all_train
- you change train_all 1
- you dont need to specify noise type since it will do all noise types now
- the rest is the same as before
- BUT U HAVE TO CHANGE WHICH NOISE TYPES TO TRAIN ON IN THE CODE
- LOOK UNDER MAIN
if reg_train == 1:
...
...
all_noise=['factory1','babble' ....]
THAT IS WHERE U ADD MORE NOISE TYPES. ADD WHATEVER NOISE TYPES U WANT TO TRAIN UR MODEL WITH BUT MAKE SURE THE SPECTOGRAM FILES EXIST
It will save the model in a folder exp_name
Make the exp_name give u a hint to what noise type you trained with
STEP 3. TEST YOUR MODEL
python RegLSTMTest.py --noise_type babble --noise_snr -3 --model_directory models/lstm_mask_normal_train/babble/model_lstm.h5 --exp_name allbab0 --save_audio 0
you choose what noise type to test at
what snr to test at
directory that leads directly to your model
exp_name is an attachment to the saved audio file. make it helpful
STEP 4. META TEST
SAMPLE
python MetaTest.py --test_directory /Users/tylervgina/DataSets/LDC93S1/TIMITcorpus/TIMIT/TEST --reg_model_directory models/model_lstm_factory.h5 --maml_model_directory models/good_no_dropout.h5 --maml_lr .01 --reg_lr .01 --gradient_updates 2 --noise_type bike --noise_snr -3 --batch_size 128 --frame_size 32
ALL TRAIN MODELS WILL BE IN
models/lstm_mask_normal_train/exp_name_when_training
ALl TRAINING DATA WILL BE IN SPECTOGRAMS but you shouldnt need to worry about it
Figures are in figures/train_plots/noise_types
results
- they have log files of your testing experiments as well as some saved audio files for you to listen to. the audio files will be named after exp_name during testing
WHAT WE NEED TO DO
-Train single noise/multiple noise with different number of spectograms and check testing scores to see if overfitting/underfitting
-will tell us if we need more spectograms or less
-Once we know the answer to that, train models on only one noise type/ some of the noise types/ all of the noise types
- see performance on noise types that were seen at training and not seen at training
- and check this for all SNR levels inside -6 to 6 but also outside of the range
-then MAML