mathworks / Baseline-MATLAB-DCASE

This repo contains an unofficial MATLAB implementation of DCASE2021 Task 1A baseline code, which is part of the DCASE challenge.
Other
0 stars 4 forks source link

Missing dependencies #1

Closed sedurCode closed 3 years ago

sedurCode commented 3 years ago

The MLX at line 119 instantiates an instances of the dlquantizer. It appears that the dlquantizer is part of the DL / GPU coder additions for Matlab Coder package, and is not native to the described dependencies i.e. Matlab Coder.

Also, it would be really handy to have annotated options for adding gpu support for training the network, please.

example:

Training Options Define the same training parameters as in the official DCASE baseline. The only known difference in the parameters in this example is that we use a much larger minibatch size.

miniBatchSize = 256; % Modified from 16 in the official baseline.
opts = trainingOptions("adam", ...
    'LearnRateSchedule',"piecewise", ... % Modified from none in the official baseline.
    'ExecutionEnvironment','cpu', ... % change to GPU if desired
    'LearnRateDropPeriod',100, ... % Modified from official baseline.
    'LearnRateDropFactor',0.5, ... % Modified from official baseline.
    'MaxEpochs',120, ... % Modified from 200 in the official baseline.
    'MiniBatchSize',miniBatchSize, ...
    'Shuffle',"every-epoch", ...
    'Plots','training-progress', ...
    'Verbose',false, ...
    'ValidationData',{testFeatures,testLabels}, ...
    'ValidationFrequency',2*floor(numel(trainLabels)/miniBatchSize));
BrianHemmat commented 3 years ago

Thanks for pointing this out! I've updated the dependencies section. Please let me know if you see other issues. Regarding the ExecutionEnvironment, the default ExecutionEnvironment is 'auto', meaning that if a viable GPU is present and you have the required toolboxes and licenses, it will be used automatically. https://www.mathworks.com/help/deeplearning/ref/trainingoptions.html#d123e115332