error in autoencoder function

2 ビュー (過去 30 日間)
ali okumus
ali okumus 2020 年 5 月 19 日
Hello Everyone ,
i am trying to create speaker identification system with autoencoder and Neural Network .First i am trying to create dataset funciton with voice files.
the code is :
function [xTrainVoices,tTrain]= create_voice_data()
xTrainVoices={};
tTrain=[];
file_num=0;
file_extension='.flac';
voice_folder='ali\';
voice_folder_content=dir([voice_folder,'*',file_extension]);
file_number = size(voice_folder_content,1);
for k=1:file_number
file_name=[voice_folder,voice_folder_content(k,1).name];
Ivoice=audioread(file_name);
xTrainVoices{k}=Ivoice;
end
file_num=file_num+file_number;
tTrain=zeros(file_number,2);
tTrain(:,1)=1;
% HUseyinin sesinin veri setine eklenmesi
file_extension='.flac';
voice_folder='huseyin\';
voice_folder_content=dir([voice_folder,'*',file_extension]);
file_number = size(voice_folder_content,1);
for k=1:file_number
file_name=[voice_folder,voice_folder_content(k,1).name];
Ivoice=audioread(file_name);
xTrainVoices{file_num+k}=Ivoice;
end
file_num=file_num+file_number;
Lbanana=zeros(file_number,2);
Lvoice(:,2)=1;
tTrain=[tTrain;Lvoice];
save voice_dataset_auto;
when i try to use this function with autoencoder on thic code:
load ses_veriseti_auto;
hiddenSize1 = 20;
autoenc1 = trainAutoencoder(xTrainVoices,hiddenSize1, ...
'MaxEpochs',200, ...
'L2WeightRegularization',0.004, ...
'SparsityRegularization',4, ...
'SparsityProportion',0.15, ...
'ScaleData', false);
feat1 = encode(autoenc1,xTrainVoices);
ı got this error:
Error using Autoencoder>iConvertToDouble (line 922)
Training data for an autoencoder must either be a matrix, or a cell array of equal size images.
Error in Autoencoder.train (line 510)
[X,visualizationDimensions, trainedOnImages] = iConvertToDouble(X);
Error in trainAutoencoder (line 109)
autoenc = Autoencoder.train(X, autonet, paramsStruct.UseGPU);
Error in denemeautoencoder (line 3)
autoenc1 = trainAutoencoder(xTrainVoices,hiddenSize1, ...
i dont know how to fix this...
any help will be appreciated..

回答 (0 件)

カテゴリ

Help Center および File ExchangePattern Recognition and Classification についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by