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