-
Notifications
You must be signed in to change notification settings - Fork 3
/
runMIRdl.py
29 lines (25 loc) · 917 Bytes
/
runMIRdl.py
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
import MIRdl
# Input data parameters
parameters={}
parameters['dataset'] = 'GTZAN' # 'ballroom' or 'GTZAN'
parameters['frameSize'] = 2048
parameters['hopSize'] = 1024
parameters['numChannels'] = 1
parameters['windowType'] = 'blackmanharris62'
parameters['melBands'] = 40
parameters['inputFrames'] = 80
parameters['errorCode'] = 999
parameters['inputNorm'] = 'energy20Log' # 'energy','energy20Log','energyLog','log' or 'None'
# Deep Learning architecture
parameters['type'] = 'cnn1' # only 'cnn1'
parameters['task'] = 'classification' # only 'classification'
# Training parameters
parameters['trainSplit'] = 0.75
parameters['testSplit'] = 0.15
parameters['valSplit'] = 1-parameters['trainSplit']-parameters['testSplit']
parameters['num_epochs'] = 2000
parameters['batchSize'] = 500
parameters['lr'] = 0.02
parameters['momentum'] = 0.9
parameters['cost']='crossentropy' # only 'crossentropy'
MIRdl.main(parameters)