how to train a 3D input matrix using back propagation neural network?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
nada fady
am 2 Jun. 2016
Kommentiert: rania said
am 29 Sep. 2016
Hi, Iam working on speech restoration, I used MFCC to extract the features for original and distorted sound.I wont to train a neural network to restore the speech. I have 51 audio clip, so the output I get from MFCC is a 12*34*51 matrix for original sound (12 is the number of MFCC coefficients for each frame, 34 is the number of frames for each audio clip, and 51 is the number of audio clip). and I get a 12*15*51 matrix for distorted sound (the number of frames is differ from the number of frames in original sound because I used a time shrinking method for distort the audio speech). so i have a 12*15*51 as an input matrix for neural network,and a 12*34*51 as an output or target matrix. can you help me to write a back propagation neural network code to train my data? please I am vary need to help. my code for getting the MFCC coefficients is:
% Clean-up MATLAB's environment
close all;clear all;clc
% Define variables
fs=8000;
Tw = 0.032; % analysis frame duration in seconds
Ts = 0.01; % analysis frame shift in seconds
n = Tw*fs; % length of frame in samples
inc= Ts*fs; % frame increment in samples
w ='M'; % Hamming window in time domain
nc =12; % number of cepstral coefficients excluding 0'th coefficient
p = 70; % number of filters in filterbank
fl =0; % low end of the lowest filter as a fraction of fs
fh = 0.5; % high end of highest filter as a fraction of fs
mfcc =[];
d_mfcc=[];
%loud the audio files
[files path]=uigetfile('.wav','Please select files','multiselect','on');
for i=1:size(files,2)
[s,fs] = audioread([path files{i}]); % Read speech samples, sampling rate and precision from file
s=s(1:2900); %use the same no. of samples for all files
[c_origin,tc_origin]=melcepst(s,fs,w,nc,p,n,inc,fl,fh); %find the MFCC coefficients
mfcc_origin = c_origin'; %find the inverse of MFCC coefficients
mfcc(:,:,i)= mfcc_origin %this is a 12*34*51 target matrix
s_distorted= ifft(fft(s),length(s)/2); %distort the audio signal using time shrinking
[c_distorted,tc_distorted]=melcepst(s_distorted,fs,w,nc,p,n,inc,fl,fh);
mfcc_distorted = c_distorted';
d_mfcc(:,:,i)=mfcc_distorted %this is a 12*15*51 input matrix
end
%so how to train this data using a back propagation neural network?
1 Kommentar
Akzeptierte Antwort
Greg Heath
am 3 Jun. 2016
1. Of course there is a problem.
EACH of the N I-dimensional input vectors creates ONE O-dimensional output vector.
So, think about what the target of each input column should be.
2. NEWFF is an obsolete function but is still available. However, well before it became obsolete, the syntax was changed.
3. Therefore use the HELP and DOC commands to find the syntax to use with your MATLAB version:
help newff
doc newff
Hope this helps.
Thank you for formally accepting my answer
Greg
5 Kommentare
Greg Heath
am 3 Jun. 2016
I =15, N=612, and O = 34, N = 612
should not throw an error.
The question is: if you think in terms of vectors does I = 15 --> O = 34 make any kind of sense to you?
Greg
Weitere Antworten (1)
Greg Heath
am 3 Jun. 2016
[ I N ] = size(input) % [180, 51]
[ O N ] = size(target) % [408, 51]
Hope this helps.
Greg
2 Kommentare
Greg Heath
am 5 Jun. 2016
I am confused w.r.t. all of the posts in this thread:
Bottom line:
The 2nd dimension of the input and target matrices must be the same.
Greg
Siehe auch
Kategorien
Mehr zu Time-Frequency Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!