Maze / EEGNetTraining.m
nevermore-kang's picture
Upload folder using huggingface_hub
273f88a verified
raw
history blame contribute delete
No virus
449 Bytes
function trainedNet = EEGNetTraining(data, labels, layers)
options = trainingOptions('sgdm', ...
'InitialLearnRate',0.001, ...
'MaxEpochs',100, ...
'MiniBatchSize',1, ...
'Shuffle','every-epoch', ...
'Verbose',false, ...
'Plots','none');
% data = dlarray(data, 'SSCB');
data = permute(data, [2 3 4 1]);
labels = categorical(labels)';
trainedNet = trainNetwork(data, labels, layers, options);
end