Invalid training data. Responses must be nonempty.
古いコメントを表示
Hello,
I am trying to build simple network which will recognize gender from voice. I have many records. I read them in DataStore but I cant get them in sequenceInputLayer. I tried everything. I know that my Neural network will maybe not work because of layers, but I only want to strat it and than I will make it accurate. Every record is longer than 6000 samples.
I gives me this error:
Error using trainNetwork (line 183)
Invalid training data. Responses must be nonempty.
Error in Program2 (line 31)
net = trainNetwork(audioTrain,layers, options)
clc;
close all;
clear all;
net = network
audio = audioDatastore(fullfile('E:\Projekt\M or F'), ...
'IncludeSubfolders',true, ...
'FileExtension', '.wav', ...
'LabelSource','foldernames');
labelCount = countEachLabel(audio)
numTrainFiles = 1000;
[audioTrain,audioValidation] = splitEachLabel(audio,numTrainFiles,'randomize');
layers = [ ...
sequenceInputLayer(6000)
fullyConnectedLayer(10)
softmaxLayer
classificationLayer];
options = trainingOptions("adam", ...
"MaxEpochs",4, ...
"MiniBatchSize",256, ...
"Plots","training-progress", ...
"Verbose",false, ...
"Shuffle","every-epoch", ...
"LearnRateSchedule","piecewise", ...
"LearnRateDropFactor",0.1, ...
"LearnRateDropPeriod",1, ...
'ValidationFrequency',100);
net = trainNetwork(audioTrain,layers, options)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で AI for Signals についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!