load JapaneseVowelsTrain
layers = [ ...
sequenceInputLayer(12)
convolution2dLayer([1 3],3,'Stride',[1 1]);
reluLayer();
fullyConnectedLayer(9)
softmaxLayer
classificationLayer]
maxEpochs = 150;
miniBatchSize = 27;
options=trainingOptions('sgdm','MaxEpochs',maxEpochs,...
'MiniBatchSize',miniBatchSize);
CNNConvnet = trainNetwork(X,Y,layers,options)
load JapaneseVowelsTest
miniBatchSize = 27;
YPred = classify(CNNConvnet,XTest,...
'MiniBatchSize',miniBatchSize);
acc = sum(YPred == YTest)./numel(YTest)