plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | singaxiong/SignalGraph-master | B_frame_select.m | .m | SignalGraph-master/graph/B_frame_select.m | 1,077 | utf_8 | 1f59f4e6b016ee90119561fcb7e17d2c | % select frames from the input stream
%
function grad = B_frame_select(input_layer, future_layers, curr_layer)
input = input_layer.a;
[D,T,N] = size(input);
future_grad = GetFutureGrad(future_layers, curr_layer);
words = ExtractWordsFromString_v2(curr_layer.frameSelect);
selectionType = words{1};
switch selectionTyp... |
github | singaxiong/SignalGraph-master | B_real_imag2BFweight_beamforming_power.m | .m | SignalGraph-master/graph/B_real_imag2BFweight_beamforming_power.m | 2,023 | utf_8 | fe6cf83395ed0445ef901a41c80b981d | function grad = B_real_imag2BFweight_beamforming_power(X, beamform_layer, after_power_layer, weight_layer, real_imag_weight)
% X is the multichannel complex spectrum inputs
[N,C,T,nSent] = size(X);
% Y is the beamforming's output
Y = beamform_layer.a;
% weight is the beamforming weight
weight = weight_layer.a;
% future... |
github | singaxiong/SignalGraph-master | B_permute.m | .m | SignalGraph-master/graph/B_permute.m | 332 | utf_8 | db3c6c08fb377d217aaa65eae5462060 | %
%
function [grad] = B_permute(future_layers, curr_layer)
future_grad = GetFutureGrad(future_layers, curr_layer);
%decide the permute order to undo the permutation of forward pass
permute_order = curr_layer.permute_order;
[~,reverse_permute_order] = sort(permute_order);
grad = permute(future_grad, reverse_permute_o... |
github | singaxiong/SignalGraph-master | B_LSTM_back2.m | .m | SignalGraph-master/graph/B_LSTM_back2.m | 5,937 | utf_8 | 811b80a3d0c792eedf01fa4adf8b8465 | % Implement the back propagation of an LSTM layer.
% Author: Xiong Xiao, Temasek Labs, NTU, Singapore.
% Last modified: 13 Oct 2015
%
function [grad, grad_W, grad_b] = B_LSTM(input_layer, LSTM_layer, future_layers)
input = input_layer.a;
W = LSTM_layer.W;
if strcmpi(class(input), 'gpuArray'); useGPU=1; else useGPU = 0;... |
github | singaxiong/SignalGraph-master | F_transpose.m | .m | SignalGraph-master/graph/F_transpose.m | 125 | utf_8 | abca4e955980bd2bdd9d17b6caa81061 | % repeat a matrix
%
function [output] = F_transpose(input_layer, curr_layer)
input = input_layer.a;
output = input';
end
|
github | singaxiong/SignalGraph-master | F_MVDR_spatialCov.m | .m | SignalGraph-master/graph/F_MVDR_spatialCov.m | 2,538 | utf_8 | a4e835b6d4e66f2c5876eb469bec1751 | % Estimate spatial covariance matrix for sentences using a mask. The mask
% specifies speech presense probability at all time frequency locations,
% with a 1 means speech present and 0 means speech absent.
%
function curr_layer = F_MVDR_spatialCov(input_layer, curr_layer)
input = input_layer.a;
fs = curr_layer.fs;
fre... |
github | singaxiong/SignalGraph-master | F_LSTM.m | .m | SignalGraph-master/graph/F_LSTM.m | 6,371 | utf_8 | ae4fd89cbecfbeb277172ce98d2b4567 | % Implement the forward pass of an LSTM layer.
% Author: Xiong Xiao, Temasek Labs, NTU, Singapore.
% Last modified: 13 Oct 2015
%
function [LSTM_layer] = F_LSTM(input_layer, LSTM_layer)
%
% The weight matrix of LSTM is organized as follows:
% W = [ W_cf W_hf W_xf;
% W_cc W_hc W_xc;
% W_ci W_hi W_xi;
% ... |
github | singaxiong/SignalGraph-master | DNN_cost_wrapper.m | .m | SignalGraph-master/graph/DNN_cost_wrapper.m | 666 | utf_8 | bcdfa02155fd92ff73b909492421a192 | % convert the trainable parameters in the graph into a vector such that we
% can call standard optimization packages to optimize the network
% parameters in batch mode.
%
function [cost, grad] = DNN_cost_wrapper(W, layer, data, para, mode)
% retrieve the weights from W and assign it to the correct layers
layer = NetWe... |
github | singaxiong/SignalGraph-master | F_power_spectrum_split.m | .m | SignalGraph-master/graph/F_power_spectrum_split.m | 402 | utf_8 | 6e518b9588fa93e56287839546c4430c |
function output = F_power_spectrum_split(input)
% assume the input is a 2DxT matrix of real and imaginary parts of the
% complex spectrum, where D is the number of frequency bins,
% T is the number of frames in the minibatch or utterance
% ral and imagineary parts of the complex Fourier spectrum is concatenated.
%
... |
github | singaxiong/SignalGraph-master | F_tdoa2weight.m | .m | SignalGraph-master/graph/F_tdoa2weight.m | 392 | utf_8 | ad9435397bfdb60fa9ba377f12783a7c |
function output = F_tdoa2weight(input, freq_bin)
% assume input is an array of time delay of C microphone channels.
% freq_bin is an array of center frequencies of N FFT bins.
[D,T,N] = size(input);
nCh = D+1;
delay = [zeros(1,T); input];
delay = reshape(delay, 1, nCh, T, N);
j = sqrt(-1);
output = exp(-j * bsxfun... |
github | singaxiong/SignalGraph-master | F_minmax_norm.m | .m | SignalGraph-master/graph/F_minmax_norm.m | 920 | utf_8 | b4f4fff1a3727c65dced6487d50d4fdd |
function [output,validFrameMask] = F_minmax_norm(input_layer, curr_layer)
input = input_layer.a;
[D,T,N] = size(input);
if isfield(curr_layer, 'minmax')
minmax = curr_layer.minmax;
else
minmax = [-1 1];
end
if N==1
output = MinMaxNorm(input,minmax(1), minmax(2));
validFrameMask = [];
else
[validF... |
github | singaxiong/SignalGraph-master | F_repmat.m | .m | SignalGraph-master/graph/F_repmat.m | 291 | utf_8 | e9b057f17dc81908d88ce98da59a3de8 | % repeat a matrix
%
function [output] = F_repmat(input_layer, curr_layer)
input = input_layer.a;
sourceDims = curr_layer.sourceDims;
targetDims = curr_layer.targetDims;
if length(sourceDims)==1
output = repmat(input, targetDims(1),targetDims(2));
else
% to be implemented
end
end |
github | singaxiong/SignalGraph-master | AddSpMatMat.m | .m | SignalGraph-master/graph/AddSpMatMat.m | 700 | utf_8 | 02957dfcf636093d6d1e5999df3245f9 | % This function add a full matrix with a sparse matrix
function out = AddSpMatMat(w1,spMat, w2, Mat, sp_elements_only)
[m,n] = size(spMat);
if w1==-1
spMat = -spMat;
elseif w1~=1
spMat = spMat * w1;
end
if w2==-1
Mat = -Mat;
elseif w2~=1
Mat = Mat * w2;
end
out = Mat;
if 0
idx = find(spMat);
... |
github | singaxiong/SignalGraph-master | PostprocessCostEvaluation.m | .m | SignalGraph-master/graph/PostprocessCostEvaluation.m | 1,707 | utf_8 | 53288559cac79e59c83df9d22a5694a7 | % This function postprocess gradient to undo whatever we did in
% prepareCostEvaluation, such as labelDelay, costFrameSelection, etc.
% Author: Xiong Xiao, Temasek Labs, NTU, Singapore.
% Last modified: 28 Jun 2016
%
function grad = PostprocessCostEvaluation(grad, output, mask, nSeg, nFrOrig, CostLayer)
if ~isempty(m... |
github | singaxiong/SignalGraph-master | TestDereverbNet_Regression_Rpi.m | .m | SignalGraph-master/examples/dereverb/TestDereverbNet_Regression_Rpi.m | 2,691 | utf_8 | 97f6df47f02e5757d81d2dcd639a65c3 |
function TestDereverbNet_Regression_Rpi
addpath('local');
dnn1 = load('nnet/Dereverb.noCMN.DeltaByEqn.MbSize20.U52013.771-LSTM-2048-771.L2_3E-4.LR_5E-3/nnet.itr10.LR4.39E-4.CV1630.073.mat');
dnn2 = load('nnet/DereverbMask.noCMN.DeltaByEqn.MbSize20.U52013.771-LSTM-1500-771.L2_3E-4.LR_5E-3/nnet.itr11.LR1.46E-4.CV1801.50... |
github | singaxiong/SignalGraph-master | TrainDereverbNet_Regression.m | .m | SignalGraph-master/examples/dereverb/TrainDereverbNet_Regression.m | 4,298 | utf_8 | 618a47fffd689ced65d5e8758264ba14 | % This script train an LSTM or DNN based clean speech log spectrogram
% predictor, using simulated data of Reverb challenge.
%
% Xiong Xiao, Nanyang Technological University, Singapore
% Last modified: 08 Feb 2016.
%
%clear
function TrainDereverbNet_Regression(modelType, hiddenLayerSize, hiddenLayerSizeFF, DeltaGen... |
github | singaxiong/SignalGraph-master | TrainDereverbNet_RegressionComplex.m | .m | SignalGraph-master/examples/dereverb/TrainDereverbNet_RegressionComplex.m | 4,419 | utf_8 | 6abb5763a71112ca11c0f705432c307d | % This script train an LSTM or DNN to predict complex Fourier transform
% domain temporal filters, which will be used to filter the noisy and
% reverberant Fourier coefficients to produce enhanced speech. The script
% is based on the simulated data of Reverb challenge.
%
% Xiong Xiao, Nanyang Technological University... |
github | singaxiong/SignalGraph-master | TrainDereverbNet_FilterPredictionSubnet.m | .m | SignalGraph-master/examples/dereverb/TrainDereverbNet_FilterPredictionSubnet.m | 4,609 | utf_8 | ae4cfe99c137672bfaef477c6e49420f | % This script train an LSTM or DNN to predict complex Fourier transform
% domain temporal filters, which will be used to filter the noisy and
% reverberant Fourier coefficients to produce enhanced speech. The script
% is based on the simulated data of Reverb challenge.
%
% Xiong Xiao, Nanyang Technological University... |
github | singaxiong/SignalGraph-master | ResaveWSJCAM0WAV.m | .m | SignalGraph-master/examples/dereverb/ResaveWSJCAM0WAV.m | 922 | utf_8 | 7e909e683ded47cded11de95eadac4ad | % WSJCAM0 audio files are in SPHERE format, while the rest of REVERB
% Challenge data are in wav format. To make it easier to read audio files,
% we first save the WSJCAM0 audio into wav files.
% Xiong Xiao, Nanyang Technological University, Singapore.
% Feb 9, 2017
%
function ResaveWSJCAM0WAV()
wsjcam0root = Choose... |
github | singaxiong/SignalGraph-master | TrainDereverbNet_Masking.m | .m | SignalGraph-master/examples/dereverb/TrainDereverbNet_Masking.m | 4,265 | utf_8 | 95d1e3a19866387d3d0309e4a91ca440 | % This script train an LSTM or DNN based clean speech log spectrogram
% predictor, using simulated data of Reverb challenge.
%
% Xiong Xiao, Nanyang Technological University, Singapore
% Last modified: 08 Feb 2016.
%
%clear
function TrainDereverbNet_Masking(modelType, hiddenLayerSize, hiddenLayerSizeFF, DeltaGenera... |
github | singaxiong/SignalGraph-master | TrainDereverbNet_FilterPrediction.m | .m | SignalGraph-master/examples/dereverb/TrainDereverbNet_FilterPrediction.m | 4,889 | utf_8 | cf3cd0113414e2a84d31a6f1d9746fda | % This script train an LSTM or DNN to predict complex Fourier transform
% domain temporal filters, which will be used to filter the noisy and
% reverberant Fourier coefficients to produce enhanced speech. The script
% is based on the simulated data of Reverb challenge.
%
% Xiong Xiao, Nanyang Technological University... |
github | singaxiong/SignalGraph-master | TestDereverbNet_Regression.m | .m | SignalGraph-master/examples/dereverb/TestDereverbNet_Regression.m | 4,843 | utf_8 | 5201a4d886856e1c41edabf32b9a9c33 |
function TestDereverbNet_Regression
addpath('local');
% dnn = load('nnet/Dereverb.U7861.771-LSTM-1024-257.L2_3E-4.LR_1E-2/nnet.itr6.LR9.58E-4.CV1679.563.mat');
% dnn = load('nnet/Dereverb.noCMN.U7861.771-LSTM-1024-771.L2_3E-4.LR_1E-2/nnet.itr10.LR2E-4.CV1760.704.mat');
% dnn = load('nnet/Dereverb.noCMN.DeltaByEqn.MbSi... |
github | singaxiong/SignalGraph-master | genNetworkDereverb_Gaussian.m | .m | SignalGraph-master/examples/dereverb/local/genNetworkDereverb_Gaussian.m | 7,033 | utf_8 | 6162c43e85f7ff06670748459dee9c1f | % This file create a simple regression based network for speech
% dereverberation or enhancement
%
% Created by Xiong Xiao, Temasek Laboratories, NTU, Singapore.
% Last Modified: 08 Feb 2017
%
function layer = genNetworkDereverb_Gaussian(para, stage)
para.freqBin = (0:1/para.fft_len:0.5)*2*pi; % w = 2*pi*f, where f is ... |
github | singaxiong/SignalGraph-master | genNetworkDereverb_FilterPrediction.m | .m | SignalGraph-master/examples/dereverb/local/genNetworkDereverb_FilterPrediction.m | 8,071 | utf_8 | 33e78a00471b01ebb95b239bffb0c2f5 | % This file create a simple regression based network for speech
% dereverberation or enhancement
%
% Created by Xiong Xiao, Temasek Laboratories, NTU, Singapore.
% Last Modified: 08 Feb 2017
%
function layer = genNetworkDereverb_FilterPrediction(para, type)
para.freqBin = (0:1/para.fft_len:0.5)*2*pi; % w = 2*pi*f, wher... |
github | singaxiong/SignalGraph-master | LoadWavFilter_Reverb.m | .m | SignalGraph-master/examples/dereverb/local/LoadWavFilter_Reverb.m | 3,375 | utf_8 | 6707e178580ff942674d6c4c97afc722 | % Load far talk, close talk, and frame label.
function [Data, para, vocab] = LoadWavFilter_Reverb(para, step, dataset, datatype, distance)
nCh = para.topology.useChannel;
wavlist = [];
% note that training data do not contain real recordings.
% real dev and eval data do not have clean version
for type_i = 1:length(da... |
github | singaxiong/SignalGraph-master | genNetworkDereverb_Regression.m | .m | SignalGraph-master/examples/dereverb/local/genNetworkDereverb_Regression.m | 6,187 | utf_8 | 52a210fa17183093797c9e97fc94b852 | % This file create a simple regression based network for speech
% dereverberation or enhancement
%
% Created by Xiong Xiao, Temasek Laboratories, NTU, Singapore.
% Last Modified: 08 Feb 2017
%
function layer = genNetworkDereverb_Regression(para)
para.freqBin = (0:1/para.fft_len:0.5)*2*pi; % w = 2*pi*f, where f is the n... |
github | singaxiong/SignalGraph-master | ConfigDereverbNet_Regression.m | .m | SignalGraph-master/examples/dereverb/local/ConfigDereverbNet_Regression.m | 1,808 | utf_8 | c4ff2edcba275c199f3025d3bc3f2964 | % This file serves as a template of defining the topology of the
% beamforming network with cross entropy training.
% You should create a copy for each of your experiments and name them
% differently.
%
% Created by Xiong Xiao, Temasek Laboratories, NTU, Singapore.
% Last Modified: 29 Nov 2016
%
function para = Confi... |
github | singaxiong/SignalGraph-master | genNetworkDereverb_Masking.m | .m | SignalGraph-master/examples/dereverb/local/genNetworkDereverb_Masking.m | 6,931 | utf_8 | 8343a990bbd1ff8b11f7dd8858bd955c | % This file create a simple regression based network for speech
% dereverberation or enhancement
%
% Created by Xiong Xiao, Temasek Laboratories, NTU, Singapore.
% Last Modified: 08 Feb 2017
%
function layer = genNetworkDereverb_Masking(para)
para.freqBin = (0:1/para.fft_len:0.5)*2*pi; % w = 2*pi*f, where f is the norm... |
github | singaxiong/SignalGraph-master | Build_DereverbNet_Regression.m | .m | SignalGraph-master/examples/dereverb/local/Build_DereverbNet_Regression.m | 2,470 | utf_8 | ac9c3179e28682ec4b0a5716b49db535 | % Build and initialize the computational graph for regression based speech
% enhancement/dereverberation
%
function [layer, para] = Build_DereverbNet_Regression(Data_tr, para)
para.output = 'tmp';
if para.topology.useMasking
layer = genNetworkDereverb_Masking(para.topology); % generate the network graph
else
... |
github | singaxiong/SignalGraph-master | Build_DereverbNet_Masking.m | .m | SignalGraph-master/examples/dereverb/local/Build_DereverbNet_Masking.m | 2,367 | utf_8 | 6605ae53b277026bc200c3fb399796c4 | % Build and initialize the computational graph for regression based speech
% enhancement/dereverberation
%
function [layer, para] = Build_DereverbNet_Masking(Data_tr, para)
para.output = 'tmp';
layer = genNetworkDereverb_Masking(para.topology); % generate the network graph
para.preprocessing{1} = {}; ... |
github | singaxiong/SignalGraph-master | Build_DereverbNet_FilterPrediction.m | .m | SignalGraph-master/examples/dereverb/local/Build_DereverbNet_FilterPrediction.m | 2,555 | utf_8 | 355e3ec85a980aa040786fc2516b7aa8 | % Build and initialize the computational graph for regression based speech
% enhancement/dereverberation
%
function [layer, para] = Build_DereverbNet_FilterPrediction(Data_tr, para, type)
para.output = 'tmp';
if nargin<3
type = 'fullnet';
end
layer = genNetworkDereverb_FilterPrediction(para.topology, type); % ... |
github | singaxiong/SignalGraph-master | LoadParallelWavLabel_Reverb.m | .m | SignalGraph-master/examples/dereverb/local/LoadParallelWavLabel_Reverb.m | 5,528 | utf_8 | c4b0b8c379102fb1a99f4c29881a49b2 | % Load far talk, close talk, and frame label.
function [Data, para, vocab] = LoadParallelWavLabel_Reverb(para, step, dataset, datatype, distance)
nCh = para.topology.useChannel;
wavlist = []; wavlistClean = [];
% note that training data do not contain real recordings.
% real dev and eval data do not have clean versio... |
github | singaxiong/SignalGraph-master | Build_DereverbNet_RegressionComplex.m | .m | SignalGraph-master/examples/dereverb/local/Build_DereverbNet_RegressionComplex.m | 763 | utf_8 | 0cecf692fcc5e93ec5d3eadfbc683dc1 | % Build and initialize the computational graph for regression based speech
% enhancement/dereverberation
%
function [layer, para] = Build_DereverbNet_RegressionComplex(Data_tr, para)
para.output = 'tmp';
layer = genNetworkDereverb_RegressionComplex(para.topology);
para.preprocessing{1} = {}; % opt... |
github | singaxiong/SignalGraph-master | genNetworkDereverb_RegressionComplex.m | .m | SignalGraph-master/examples/dereverb/local/genNetworkDereverb_RegressionComplex.m | 3,804 | utf_8 | 9fcca4820dd2ff9c4c96afb0d40967e8 | % This file create a simple regression based network for speech
% dereverberation or enhancement
%
% Created by Xiong Xiao, Temasek Laboratories, NTU, Singapore.
% Last Modified: 08 Feb 2017
%
function layer = genNetworkDereverb_RegressionComplex(para)
para.freqBin = (0:1/para.fft_len:0.5)*2*pi; % w = 2*pi*f, where f i... |
github | singaxiong/SignalGraph-master | GenFbankFeatures.m | .m | SignalGraph-master/examples/beamforming/GenFbankFeatures.m | 1,650 | utf_8 | 7f2b953f9209cf9d2e6ed2213cf2e8ee | % This function generate the log Mel filterbanks features of the training
% and evaluation data. Note that the filterbanks features generated here is
% slightly different from that by other toolkits, such as Kaldi.
% This recipe will always use the filterbank features generated in the same
% way as in this function, s... |
github | singaxiong/SignalGraph-master | ConfigBasicSTFT.m | .m | SignalGraph-master/examples/beamforming/lib/ConfigBasicSTFT.m | 577 | utf_8 | 1c4a89411432bd03d73c01c00f231d19 | % Add default configurations to STFT
%
% Created by Xiong Xiao, Temasek Laboratories, NTU, Singapore.
% Last Modified: 29 Jun 2016
%
function para = ConfigBasicSTFT(para)
para.topology.fs = 16000; % sampling rate
para.topology.fft_len = 512;
para.topology.nFbank = 40;
% define the parameters for extracting Fourier c... |
github | singaxiong/SignalGraph-master | LoadParallelWavLabel_CHiME4.m | .m | SignalGraph-master/examples/beamforming/lib/LoadParallelWavLabel_CHiME4.m | 6,682 | utf_8 | c3e6af65c1e30496a291f68b3846cf31 | % Load far talk, close talk, and frame label.
function [Data, para, vocab, wavlist] = LoadParallelWavLabel_CHiME4(para, step, dataset)
switch lower(dataset)
case {'dt05','et05'}
wavlist = ['../Kaldi/data/' dataset '_multi_noisy/wav.scp'];
ali_file = [para.local.aliDir '_' dataset '/ali.txt'];
c... |
github | singaxiong/SignalGraph-master | HandleSTFT.m | .m | SignalGraph-master/examples/beamforming/lib/HandleSTFT.m | 469 | utf_8 | f8c8f0c1d7e2c8f706b685bac652f97c |
function [layer, scm_idx, split] = HandleSTFT(layer, STFT_layer_idx, nPass, para)
[scm_idx, split] = GetScmLayer(layer);
bf_idx = ReturnLayerIdxByName(layer, 'Beamforming');
for i=1:nPass
if split
layer{scm_idx(i)}.prev(3) = STFT_layer_idx - scm_idx(i);
else
layer{scm_idx(i)}.prev(2) = STFT_lay... |
github | singaxiong/SignalGraph-master | BuildFbankExtractionNet.m | .m | SignalGraph-master/examples/beamforming/lib/BuildFbankExtractionNet.m | 955 | utf_8 | 222b18afdcbbf00aafd2a0bf836f735b | % Build and initialize the computational graph for extracting log Mel
% filterbank features
%
function [layer, para] = BuildFbankExtractionNet()
para.output = 'tmp';
para.IO.nStream = 1;
para.NET.sequential = 1;
para.cost_func.layer_idx = [];
para = ConfigBasicSTFT(para);
layer = genNetworkFbankExtraction(para.topolog... |
github | singaxiong/SignalGraph-master | ConvertMaskBF2Split.m | .m | SignalGraph-master/examples/beamforming/mask_prediction/local/ConvertMaskBF2Split.m | 2,090 | utf_8 | 02cad0c62d9fa3bb364cfffa889fc1eb | % The network generated by genNetworkMaskBF_CE.m only predicts speech mask.
% The function will convert the network to predict speech and noise masks
% independently.
% Currently, this function assume there is only 1 LSTM layer for mask
% prediction. Extension needed if we use multiple LSTM layers.
%
function [layer,... |
github | singaxiong/SignalGraph-master | HandleSTFTReference.m | .m | SignalGraph-master/examples/beamforming/mask_prediction/local/HandleSTFTReference.m | 478 | utf_8 | 63b04e4c0301db90cbc9356c04a8ae40 |
function [layer, scm_idx, split] = HandleSTFTReference(layer, STFT_layer_idx, nPass, para)
[scm_idx, split] = GetScmLayer(layer);
bf_idx = ReturnLayerIdxByName(layer, 'Beamforming');
for i=1:nPass
if split
layer{scm_idx(i)}.prev(3) = STFT_layer_idx - scm_idx(i);
else
layer{scm_idx(i)}.prev(2) =... |
github | singaxiong/SignalGraph-master | genNetworkMaskBF_CE.m | .m | SignalGraph-master/examples/beamforming/mask_prediction/local/genNetworkMaskBF_CE.m | 7,648 | utf_8 | ad72fb40d4f88e9e7aa645f4a8003af4 | % This file create the joint mask predicting, beamforming weight
% predicting, and acoustic model networks consists of a linked list
% of computing layers.
%
% References:
%
% Created by Xiong Xiao, Temasek Laboratories, NTU, Singapore.
% Last Modified: 08 Jul 2016
%
function layer = genNetworkMaskBF_CE(para)
para.f... |
github | singaxiong/SignalGraph-master | ConvertMaskBF2pooling.m | .m | SignalGraph-master/examples/beamforming/mask_prediction/local/ConvertMaskBF2pooling.m | 2,547 | utf_8 | 78c9253e889584b8879e29acce34493f | % The network generated by genNetworkMaskBF_CE.m always use the first
% channel to predict the mask. This function changes the network such that
% it uses all the 6 channels for mask prediction. For each channel, a
% speech and noise masks are predicted based on only the log spectrum of
% current channel. Then, the 6 s... |
github | singaxiong/SignalGraph-master | ConfigMaskBFnetCE.m | .m | SignalGraph-master/examples/beamforming/mask_prediction/local/ConfigMaskBFnetCE.m | 5,260 | utf_8 | a4d5a487e9b702aa930eb1f8baaa03cd | % This file serves as a template of defining the topology of the
% beamforming network with cross entropy training.
% You should create a copy for each of your experiments and name them
% differently.
%
% References:
% [1] Xiong Xiao, Shinji Watanabe, Hakan Erdogan, Liang Lu, John Hershey,
% Michael L. Seltzer, Guogu... |
github | singaxiong/SignalGraph-master | Build_MaskBFnet_CE.m | .m | SignalGraph-master/examples/beamforming/mask_prediction/local/Build_MaskBFnet_CE.m | 7,612 | utf_8 | 1f20ce209dabeea2d69018c0789dfaec | % Build and initialize the computational graph for mask-based beamforming
% for speech recognition.
% stage:
% 1 - only initialize mask prediction subnet
% 2 - only initiliaze mask prediction and weight prediction subnets
% 3 - initialize also the acoustic model subnet
%
function [layer, para] = Build_MaskBFnet... |
github | singaxiong/SignalGraph-master | genNetworkMVDR.m | .m | SignalGraph-master/examples/beamforming/mvdr/local/genNetworkMVDR.m | 1,656 | utf_8 | 2e2ff27f1fe3c77d4c96e6eb0f8f6a20 | % This function create a network of MVDR beamforming. You need to supply
% the noise and speech masks.
%
% Created by Xiong Xiao
% Last Modified: 30 Jun 2017
%
function layer = genNetworkMVDR(para)
para.freqBin = (0:1/para.fft_len:0.5)*2*pi; % w = 2*pi*f, where f is the normalized frequency k/N is from 0 to 0.5.
nFre... |
github | singaxiong/SignalGraph-master | TrainEnhanceNet_Masking.m | .m | SignalGraph-master/examples/enhancement/TrainEnhanceNet_Masking.m | 5,794 | utf_8 | c163d0753ae0a228dd8a8275443beec7 | % This script train an LSTM or DNN based clean speech log spectrogram
% predictor, using simulated data of Reverb challenge.
%
% Xiong Xiao, Nanyang Technological University, Singapore
% Last modified: 08 Feb 2016.
%
%clear
function TrainEnhanceNet_Masking(modelType, hiddenLayerSize, hiddenLayerSizeFF, learning_rat... |
github | singaxiong/SignalGraph-master | TrainEnhanceNet_Gaussian.m | .m | SignalGraph-master/examples/enhancement/TrainEnhanceNet_Gaussian.m | 6,226 | utf_8 | 01a08d76b6e93b43912fbd3d684a59ec | % This script train an LSTM or DNN based clean speech log spectrogram
% predictor, using simulated data of Reverb challenge.
%
% Xiong Xiao, Nanyang Technological University, Singapore
% Last modified: 08 Feb 2016.
%
%clear
function TrainEnhanceNet_Gaussian(modelType, hiddenLayerSizeShared, hiddenLayerSizeMu, hidde... |
github | singaxiong/SignalGraph-master | BatchTestEnhanceNetByCategory.m | .m | SignalGraph-master/examples/enhancement/BatchTestEnhanceNetByCategory.m | 4,792 | utf_8 | ad92d72c1890a6430ca7d89772a0135f |
function BatchTestEnhanceNetByCategory(testSet, T60, noise, SNR, DEBUG)
addpath('local');
dnn_files{1} = 'nnet/EnhanceRegression.noCMN.DeltaByEqn.MbSize40.U28539.771-LSTM-2048-771.L2_3E-4.LR_3E-3/nnet.itr37.LR1E-5.CV2453.828.mat';
dnn_files{2} = 'nnet/EnhanceRegression.noCMN.DeltaByEqn.MbSize20.U28539.771-LSTM-2048-7... |
github | singaxiong/SignalGraph-master | TrainEnhanceNet_Regression.m | .m | SignalGraph-master/examples/enhancement/TrainEnhanceNet_Regression.m | 5,657 | utf_8 | 7afce091ac7adaa42225dbf74def1c8e | % This script train an LSTM or DNN based clean speech log spectrogram
% predictor, using simulated data of Reverb challenge.
%
% Xiong Xiao, Nanyang Technological University, Singapore
% Last modified: 08 Feb 2016.
%
%clear
function TrainEnhanceNet_Regression(modelType, hiddenLayerSize, hiddenLayerSizeFF, DeltaGene... |
github | singaxiong/SignalGraph-master | Build_EnhanceNet_Masking.m | .m | SignalGraph-master/examples/enhancement/local/Build_EnhanceNet_Masking.m | 2,730 | utf_8 | c6f0e5b590d80435ff8079f6d370bfa4 | % Build and initialize the computational graph for regression based speech
% enhancement/dereverberation
%
function [layer, para] = Build_EnhanceNet_Masking(Data_tr, para)
para.output = 'tmp';
layer = genNetworkDereverb_Masking(para.topology); % generate the network graph
para.preprocessing{1} = {}; ... |
github | singaxiong/SignalGraph-master | LoadParallelWav_Libri.m | .m | SignalGraph-master/examples/enhancement/local/LoadParallelWav_Libri.m | 2,885 | utf_8 | 3075aff75c0c170f7c6b2b43d041ac3a | % Load far talk, close talk, and frame label.
function [Data, para, vocab] = LoadParallelWav_Libri(para, step, precision)
if nargin<3
precision = 'int16';
end
if isfield(para.local, 'cv_wav_root_clean')
wavlistClean = findFiles(para.local.cv_wav_root_clean, para.local.cv_wav_clean_ext);
wavlist = findFiles... |
github | singaxiong/SignalGraph-master | RunEnhanceNN.m | .m | SignalGraph-master/examples/enhancement/local/RunEnhanceNN.m | 880 | utf_8 | 30cbd8fd458cede80dc319d59beb1088 |
function [noisy, enhanced, clean, enhanced_wav, noisySTFT, mask, variance] = RunEnhanceNN(Data, layer, para)
output = FeatureTree2(Data, para, layer);
noisySTFT = gather(output{1}{1});
noisy = gather(output{1}{2});
enhanced = gather(output{1}{3});
enhanced_wav = abs2wav(exp(enhanced(1:257,:)/2)', angle(noisySTFT)',... |
github | singaxiong/SignalGraph-master | LoadWavRIRNoise_Libri.m | .m | SignalGraph-master/examples/enhancement/local/LoadWavRIRNoise_Libri.m | 2,333 | utf_8 | da3583c83217c35e5565597916be83fc | % Load far talk, close talk, and frame label.
function [Data, para] = LoadWavRIRNoise_Libri(para, step)
wavreader.name = 'wavfile';
wavreader.array = 0;
wavreader.precision = 'int16';
% load clean speech list
if isfield(para.local, 'clean_wav_files')
clean_list = para.local.clean_wav_files;
else
clean_list =... |
github | singaxiong/SignalGraph-master | Build_EnhanceNet_Regression.m | .m | SignalGraph-master/examples/enhancement/local/Build_EnhanceNet_Regression.m | 2,736 | utf_8 | 66626b9a541e5268a2a6dce0de76c5c4 | % Build and initialize the computational graph for regression based speech
% enhancement/dereverberation
%
function [layer, para] = Build_EnhanceNet_Regression(Data_tr, para)
para.output = 'tmp';
layer = genNetworkDereverb_Regression(para.topology); % generate the network graph
para.preprocessing{1} = {}; ... |
github | singaxiong/SignalGraph-master | TestEnhanceNetByCategory.m | .m | SignalGraph-master/examples/enhancement/local/TestEnhanceNetByCategory.m | 10,674 | utf_8 | 7983196d81cbc282e485e40a9f6fad4d |
function TestEnhanceNetByCategory(dnn_files, testSet, T60, noise, SNR, IsMaskNet, measures, useGPU, DEBUG)
addpath('local');
% dnn_files{1} = 'nnet/EnhanceRegression.noCMN.DeltaByEqn.MbSize40.U28539.771-LSTM-2048-771.L2_3E-4.LR_3E-3/nnet.itr37.LR1E-5.CV2453.828.mat';
% dnn_files{2} = 'nnet/EnhanceRegression.noCMN.Del... |
github | singaxiong/SignalGraph-master | Build_EnhanceNet_Gaussian.m | .m | SignalGraph-master/examples/enhancement/local/Build_EnhanceNet_Gaussian.m | 4,207 | utf_8 | d0cb00274834041101f01d9a6a3fa793 | % Build and initialize the computational graph for regression based speech
% enhancement/dereverberation
%
function [layer, para] = Build_EnhanceNet_Gaussian(Data_tr, para, stage)
para.output = 'tmp';
layer = genNetworkDereverb_Gaussian(para.topology, stage); % generate the network graph
para.preprocessing{1} = {}... |
github | singaxiong/SignalGraph-master | PrepareNetwork4Enhancement.m | .m | SignalGraph-master/examples/enhancement/local/PrepareNetwork4Enhancement.m | 1,566 | utf_8 | 8441a9a7f49d36d009ddc21274591af6 |
function [model] = PrepareNetwork4Enhancement(dnnFile, hasClean, useMasking, useGPU)
dnn = load(dnnFile);
layer = dnn.layer;
para = dnn.para;
para.local.useFileName = 1;
% para.topology.useFileName = 1;
% para.local.seglen = 100;
% para.local.segshift = 100;
para.useGPU = useGPU;
% noisy STFT
stft_idx = ReturnLayerI... |
github | singaxiong/SignalGraph-master | TestEnhanceNetByCategory.m | .m | SignalGraph-master/examples/enhancement/local/back/TestEnhanceNetByCategory.m | 9,792 | utf_8 | c83053d59787830b11baf36e0b3d506b |
function TestEnhanceNetByCategory(testSet, T60, noise, SNR, playSound)
addpath('..\..\..\..\Enhancement\Loizou\MATLAB_code\objective_measures\quality');
addpath('..\..\..\..\Enhancement\Loizou\MATLAB_code\statistical_based');
hasClean = 1;
addpath('local');
% dnn1 = load('nnet/EnhanceRegression.noCMN.DeltaByEqn.MbSiz... |
github | singaxiong/SignalGraph-master | TestEnhanceNet.m | .m | SignalGraph-master/examples/enhancement/local/back/TestEnhanceNet.m | 7,997 | utf_8 | 3207ec507ef79b288f6ed919dbb85ac0 |
function TestEnhanceNet
addpath('..\..\..\..\Enhancement\Loizou\MATLAB_code\objective_measures\quality');
addpath('..\..\..\..\Enhancement\Loizou\MATLAB_code\statistical_based');
hasClean = 1;
addpath('local');
dnn1 = load('nnet/EnhanceRegression.noCMN.DeltaByEqn.MbSize20.U28539.771-LSTM-2048-771.L2_3E-4.LR_1E-4/nnet... |
github | singaxiong/SignalGraph-master | TrainSeparationNet_MaskingMagnitude.m | .m | SignalGraph-master/examples/separation/TrainSeparationNet_MaskingMagnitude.m | 6,590 | utf_8 | 7242dc7868c9de8109a4be8ce9e95f02 | % This script train an LSTM or DNN based clean speech log spectrogram
% predictor, using simulated data of Reverb challenge.
%
% Xiong Xiao, Nanyang Technological University, Singapore
% Last modified: 08 Feb 2016.
%
%clear
function TrainSeparationNet_MaskingMagnitude(hiddenLayerSize, hiddenLayerSizeFF, learning_ra... |
github | singaxiong/SignalGraph-master | TrainSeparationNet_Masking.m | .m | SignalGraph-master/examples/separation/TrainSeparationNet_Masking.m | 6,565 | utf_8 | d09e598a1849fd920c7491167bd1cd16 | % This script train an LSTM or DNN based clean speech log spectrogram
% predictor, using simulated data of Reverb challenge.
%
% Xiong Xiao, Nanyang Technological University, Singapore
% Last modified: 08 Feb 2016.
%
%clear
function TrainSeparationNet_Masking(hiddenLayerSize, hiddenLayerSizeFF, learning_rate, nUtt4... |
github | singaxiong/SignalGraph-master | TrainSeparationNet_Regression.m | .m | SignalGraph-master/examples/separation/TrainSeparationNet_Regression.m | 6,584 | utf_8 | a89a4b6cdc1d98f0d5bc2b66372c209e | % This script train an LSTM or DNN based clean speech log spectrogram
% predictor, using simulated data of Reverb challenge.
%
% Xiong Xiao, Nanyang Technological University, Singapore
% Last modified: 08 Feb 2016.
%
%clear
function TrainSeparationNet_Regression(hiddenLayerSize, hiddenLayerSizeFF, learning_rate, nU... |
github | singaxiong/SignalGraph-master | Build_SeparationNet_Masking.m | .m | SignalGraph-master/examples/separation/local/Build_SeparationNet_Masking.m | 3,006 | utf_8 | fdffe613c078a0d50f7ef1a11a34bbe9 | % Build and initialize the computational graph for regression based speech
% enhancement/dereverberation
%
function [layer, para] = Build_SeparationNet_Masking(Data_tr, para)
para.output = 'tmp';
layer = genNetworkSeparation_Masking(para.topology); % generate the network graph
para.preprocessing{1} = {}; ... |
github | singaxiong/SignalGraph-master | LoadSeparationWav_Libri.m | .m | SignalGraph-master/examples/separation/local/LoadSeparationWav_Libri.m | 3,561 | utf_8 | 7d1fc3f8d7f4cbc060aecb5c9733969f | % Load far talk, close talk, and frame label.
function [Data, para, vocab] = LoadSeparationWav_Libri(para, step)
if isfield(para.local, 'cv_wav_root_clean')
wavlistClean = findFiles(para.local.cv_wav_root_clean, para.local.cv_wav_clean_ext);
wavlist = findFiles([para.local.cv_wav_root], 'wav');
wavIndexCle... |
github | singaxiong/SignalGraph-master | genNetworkSeparation_Regression.m | .m | SignalGraph-master/examples/separation/local/genNetworkSeparation_Regression.m | 6,777 | utf_8 | 1fec0ab573ca3f24046b13b451039214 | % This file create a simple regression based network for speech
% dereverberation or enhancement
%
% Created by Xiong Xiao, Temasek Laboratories, NTU, Singapore.
% Last Modified: 08 Feb 2017
%
function layer = genNetworkSeparation_Regression(para)
para.freqBin = (0:1/para.fft_len:0.5)*2*pi; % w = 2*pi*f, where f is the... |
github | singaxiong/SignalGraph-master | Build_SeparationNet_MaskingMagnitude.m | .m | SignalGraph-master/examples/separation/local/Build_SeparationNet_MaskingMagnitude.m | 2,829 | utf_8 | 74693f02a16d8f7207eabbcbb7f901b4 | % Build and initialize the computational graph for regression based speech
% enhancement/dereverberation
%
function [layer, para] = Build_SeparationNet_Masking(Data_tr, para)
para.output = 'tmp';
layer = genNetworkSeparation_MaskingMagnitude(para.topology); % generate the network graph
para.preprocessing{1} = {}; ... |
github | singaxiong/SignalGraph-master | genNetworkSeparation_Masking_ShareProjection.m | .m | SignalGraph-master/examples/separation/local/genNetworkSeparation_Masking_ShareProjection.m | 7,851 | utf_8 | 16e98cab0f3fcae86492e307aeca75ba | % This file create a simple regression based network for speech
% dereverberation or enhancement
%
% Created by Xiong Xiao, Temasek Laboratories, NTU, Singapore.
% Last Modified: 08 Feb 2017
%
function layer = genNetworkSeparation_Masking_ShareProjection(para)
para.freqBin = (0:1/para.fft_len:0.5)*2*pi; % w = 2*pi*f, w... |
github | singaxiong/SignalGraph-master | RunSeparationNN.m | .m | SignalGraph-master/examples/separation/local/RunSeparationNN.m | 820 | utf_8 | dccc91f33692dcdbf3be5a2d6e56c639 |
function [mixture, separated, clean, separated_wav, mixtureSTFT, mask] = RunSeparationNN(Data, layer, para)
output = FeatureTree2(Data, para, layer);
for i=1:length(output{1})
output{1}{i} = gather(output{1}{i});
end
mixtureSTFT = gather(output{1}{1});
mixture = gather(output{1}{2});
separated{1} = gather(output... |
github | singaxiong/SignalGraph-master | genNetworkSeparation_Masking.m | .m | SignalGraph-master/examples/separation/local/genNetworkSeparation_Masking.m | 7,512 | utf_8 | 4937c8cde937bd9d9ed5aa4f78cc8c2a | % This file create a simple regression based network for speech
% dereverberation or enhancement
%
% Created by Xiong Xiao, Temasek Laboratories, NTU, Singapore.
% Last Modified: 08 Feb 2017
%
function layer = genNetworkSeparation_Masking(para)
para.freqBin = (0:1/para.fft_len:0.5)*2*pi; % w = 2*pi*f, where f is the no... |
github | singaxiong/SignalGraph-master | PrepareNetwork4Separation.m | .m | SignalGraph-master/examples/separation/local/PrepareNetwork4Separation.m | 1,779 | utf_8 | 2792d42f2bf7a47581051fd7dfb83840 |
function [model] = PrepareNetwork4Separation(dnnFile, hasClean, useGPU)
dnn = load(dnnFile);
layer = dnn.layer;
para = dnn.para;
para.local.useFileName = 1;
% para.topology.useFileName = 1;
% para.local.seglen = 100;
% para.local.segshift = 100;
para.useGPU = useGPU;
% mixture STFT
stft_idx = ReturnLayerIdxByName(la... |
github | singaxiong/SignalGraph-master | Build_SeparationNet_Regression.m | .m | SignalGraph-master/examples/separation/local/Build_SeparationNet_Regression.m | 3,012 | utf_8 | 82b8b14e35991df59db21d60187202be | % Build and initialize the computational graph for regression based speech
% enhancement/dereverberation
%
function [layer, para] = Build_SeparationNet_Regression(Data_tr, para)
para.output = 'tmp';
layer = genNetworkSeparation_Regression(para.topology); % generate the network graph
para.preprocessing{1} = {}; ... |
github | singaxiong/SignalGraph-master | genNetworkSeparation_MaskingMagnitude.m | .m | SignalGraph-master/examples/separation/local/genNetworkSeparation_MaskingMagnitude.m | 5,862 | utf_8 | 3f49ca46b38d984f118fcead4834bd1e | % This file create a simple regression based network for speech
% dereverberation or enhancement
%
% Created by Xiong Xiao, Temasek Laboratories, NTU, Singapore.
% Last Modified: 08 Feb 2017
%
function layer = genNetworkSeparation_MaskingMagnitude(para)
para.freqBin = (0:1/para.fft_len:0.5)*2*pi; % w = 2*pi*f, where f ... |
github | singaxiong/SignalGraph-master | TestSeparationNetByCategory.m | .m | SignalGraph-master/examples/separation/local/TestSeparationNetByCategory.m | 3,694 | utf_8 | 8c4710a1c7d22860500675215ebe6ce6 |
function TestSeparationNetByCategory()
addpath('local');
% dnn_files{1} = 'nnet/SeparationRegression.CMN.DeltaByEqn.MbSize40.U28539.771-LSTM-2048-771.L2_0.LR_1E-3/nnet.itr19.LR1.29E-4.CV5039.393.mat';
dnn_files{1} = 'nnet/SepReg.CMN.DeltaByEqn.MbSize40.SPR0.seg100.U28539.771-LSTM-2048-771.L2_0.LR_1E-3/nnet.itr2.LR8.3... |
github | singaxiong/SignalGraph-master | TIMIT_map39to2.m | .m | SignalGraph-master/examples/classification_framewise/TIMIT_map39to2.m | 454 | utf_8 | 66121b7066d69d9c75c4041e85d7cc52 | % The mapping from 61 phones set to 48 phonse set for TIMIT. The mapping
% table is as follows:
%
% cl vcl epi --> sil
% el --> l
% en --> n
% zh --> sh
% aa --> ao
% ix --> ih
% ax --> ah
%
% Author: Xiong Xiao, NTU, Singapore
% Date: 1 Jun 2016
function phone_seq_2 = TIMIT_map39to2(phone_seq_39)
found = strcmpi(pho... |
github | singaxiong/SignalGraph-master | TIMIT_map61to48.m | .m | SignalGraph-master/examples/classification_framewise/TIMIT_map61to48.m | 959 | utf_8 | ea9fd20929cec8222d926670f02dc794 | % The mapping from 61 phones set to 48 phonse set for TIMIT. The mapping
% table is as follows:
%
% pcl tcl kcl qcl q --> cl
% bcl dcl gcl --> vcl
% h# #h pau --> sil
% ux --> uw
% axr --> er
% em --> m
% nx --> n
% eng --> ng
% hv --> hh
% ax-h --> ax
%
% Author: Xiong Xiao, NTU, Singapore
% Date: 1 Jun 2016
function... |
github | singaxiong/SignalGraph-master | TIMIT_map48to39.m | .m | SignalGraph-master/examples/classification_framewise/TIMIT_map48to39.m | 747 | utf_8 | 0331399c6fe423ca626830ce372c4b4b | % The mapping from 61 phones set to 48 phonse set for TIMIT. The mapping
% table is as follows:
%
% cl vcl epi --> sil
% el --> l
% en --> n
% zh --> sh
% aa --> ao
% ix --> ih
% ax --> ah
%
% Author: Xiong Xiao, NTU, Singapore
% Date: 1 Jun 2016
function phone_seq_39 = TIMIT_map48to39(phone_seq_48)
mapping_table = {... |
github | singaxiong/SignalGraph-master | genNetworkTemporalConvDeep.m | .m | SignalGraph-master/prototypes/genNetworkTemporalConvDeep.m | 1,980 | utf_8 | 353155580424437fb3bdcc20778d9f18 | % poolType = 'mean' or 'max'
% poolLayer = integer layer number after which we do the pooling
function layer = genNetworkTemporalConvDeep(para)
if isfield(para, 'LastActivation4MSE')==0
para.LastActivation4MSE = 'linear';
end
inputDim = double(para.inputDim);
layer{1}.name = 'Input'; % this is an input laye... |
github | singaxiong/SignalGraph-master | computeGlobalCMVN_obj.m | .m | SignalGraph-master/prototypes/computeGlobalCMVN_obj.m | 1,287 | utf_8 | e5d7987f4aaadbbe9d60a7cec8d154c3 | % given a network and some data, compute the mean and variance of the
% network output. This function is usually used to determine the global
% mean and variance normalization parameters in the preprocessing.
% Xiong Xiao
%
function [W, b] = computeGlobalCMVN_obj(Visible, nUttUsed, para, layer)
if exist('nUttUsed')==0... |
github | singaxiong/SignalGraph-master | FinishLayer.m | .m | SignalGraph-master/prototypes/FinishLayer.m | 360 | utf_8 | 8d7ac11ade26c4ef64cd7dc82ba519de | % automatically derive the list of layers that the output of the current layer goes.
function layer = FinishLayer(layer)
for i=1:length(layer); layer{i}.next = []; end
for i=length(layer):-1:1
if isfield(layer{i}, 'prev')
for j=1:length(layer{i}.prev)
layer{i+layer{i}.prev(j)}.next(end+1) = -la... |
github | singaxiong/SignalGraph-master | genNetworkLinearStructure.m | .m | SignalGraph-master/prototypes/genNetworkLinearStructure.m | 1,399 | utf_8 | 100253a2fd771ce28973d22bd8456766 | % generate a network with linear structure using descriptive config
function layer = genNetworkLinearStructure(config)
for i=1:length(config)
currConfig = config{i};
end
inputDim = double(inputDim);
inputStreamIdx = 1;
layer{1} = InputNode(inputStreamIdx,inputDim);
for i=1:length(hiddenLayerSize)
... |
github | singaxiong/SignalGraph-master | genNetworkTemporalConv.m | .m | SignalGraph-master/prototypes/genNetworkTemporalConv.m | 1,353 | utf_8 | f0ecb857ef8c92d9460cd274912edf21 | % poolType = 'mean' or 'max'
% poolLayer = integer layer number after which we do the pooling
function layer = genNetworkTemporalConv(inputDim, nFilter, filterLen, hiddenLayerSize, outputDim, costFn, LastActivation4MSE)
if nargin<7
LastActivation4MSE = 'linear';
end
inputDim = double(inputDim);
layer{1}.name = 'In... |
github | singaxiong/SignalGraph-master | FinishLayer_obj.m | .m | SignalGraph-master/prototypes/FinishLayer_obj.m | 370 | utf_8 | 2b0a1ea5b121c7671f01d2abd773f41f | % automatically derive the list of layers that the output of the current layer goes.
function layer = FinishLayer_obj(layer)
for i=1:length(layer); layer{i}.next = []; end
for i=length(layer):-1:1
if strcmpi(layer{i}.name, 'input'); continue; end
for j=1:length(layer{i}.prev)
layer{i+layer{i}.prev(j)}.... |
github | singaxiong/SignalGraph-master | computeGlobalPCA.m | .m | SignalGraph-master/prototypes/computeGlobalPCA.m | 1,428 | utf_8 | f16c87ae38b517424173cb5b278a4cdd | % given a network and some data, compute the mean and variance of the
% network output. This function is usually used to determine the global
% mean and variance normalization parameters in the preprocessing.
% Xiong Xiao
%
function [W, b] = computeGlobalPCA(Visible, nUttUsed, dimUsed, para, layer)
if exist('nUttUsed'... |
github | singaxiong/SignalGraph-master | ConnectLinearGraph.m | .m | SignalGraph-master/prototypes/ConnectLinearGraph.m | 624 | utf_8 | 792e50d1d9a64f9746fb1d8ad535cd61 | % giving an array of nodes, assume they are connected from the first node
% to the last node. Automatically derive the connections parameters and
% dimensions
function layer = ConnectLinearGraph(layer)
% generate the prev and next properties
for i=1:length(layer)
if strcmpi(class(layer{i}), 'InputNode')
%... |
github | singaxiong/SignalGraph-master | genNetworkFF_Pairwise2.m | .m | SignalGraph-master/prototypes/genNetworkFF_Pairwise2.m | 2,034 | utf_8 | 532bc4217b66ffe76dc20d8cd6d478b7 | % generate network prototype that use feedforward (FF) networks for
% predicting feature representation and frame weights. Then the feature
% representation are weighted by the frame weights and summed together to
% produce a single feature vector for each input sequence.
function [layer, WeightTyingSet] = genNetworkF... |
github | singaxiong/SignalGraph-master | genNetworkMTL_DML_CE.m | .m | SignalGraph-master/prototypes/genNetworkMTL_DML_CE.m | 993 | utf_8 | 1a9f528f2b7019ae3048b30a22ecd22f | % generate network prototype that use feedforward (FF) networks for
% predicting feature representation and frame weights. Then the feature
% representation are weighted by the frame weights and summed together to
% produce a single feature vector for each input sequence.
function [layer, WeightTyingSet] = genNetworkM... |
github | singaxiong/SignalGraph-master | genNetworkTemporalConv2.m | .m | SignalGraph-master/prototypes/genNetworkTemporalConv2.m | 1,654 | utf_8 | 74020d75660f1b2fc7b37a544c037baa | % poolType = 'mean' or 'max'
% poolLayer = integer layer number after which we do the pooling
function layer = genNetworkTemporalConv2(para)
if isfield(para, 'LastActivation4MSE')==0
para.LastActivation4MSE = 'linear';
end
inputDim = double(para.inputDim);
layer{1}.name = 'Input'; % this is an input layer
l... |
github | singaxiong/SignalGraph-master | genNetworkFF_Pairwise.m | .m | SignalGraph-master/prototypes/genNetworkFF_Pairwise.m | 2,010 | utf_8 | c2d3a7ac5bb8debd86c91a513da8274c | % generate network prototype that use feedforward (FF) networks for
% predicting feature representation and frame weights. Then the feature
% representation are weighted by the frame weights and summed together to
% produce a single feature vector for each input sequence.
function [layer, WeightTyingSet] = genNetworkF... |
github | singaxiong/SignalGraph-master | genNetworkSTFT2LogSpec.m | .m | SignalGraph-master/prototypes/genNetworkSTFT2LogSpec.m | 422 | utf_8 | 57ed6a733407a6ede9e1ea07662a2ca1 |
% create a sub network that takes in waveforms and produces fourier
% coefficients
function layer = genNetworkSTFT2LogSpec(stftLayer, useLog, logConst)
layer = stftLayer;
layer{end+1} = PowerNode(stftLayer{end}.dim(1));
if useLog
if nargin<3
logConst = 0.00;
end
layer{end+1} = LogarithmNode(layer... |
github | singaxiong/SignalGraph-master | VerifyPreprocessingTree_obj.m | .m | SignalGraph-master/prototypes/VerifyPreprocessingTree_obj.m | 325 | utf_8 | 98cb8544c1ce7ba3e24e27f3207135fa | % verify that the global MVN is correct.
% Xiong Xiao
function [processing] = VerifyPreprocessingTree_obj(layer, Visible, para, nUttUsed)
if exist('nUttUsed')==0 || isempty(nUttUsed)
nUttUsed = 500;
end
[W, b] = computeGlobalCMVN_obj(Visible, nUttUsed, para, layer);
plot(-b); hold on;
plot(1./diag(W)); hold off
... |
github | singaxiong/SignalGraph-master | genNetworkFF_WeightedAverage.m | .m | SignalGraph-master/prototypes/genNetworkFF_WeightedAverage.m | 1,729 | utf_8 | 89510b30ee47410c0d65f7c4afe5eccb | % generate network prototype that use feedforward (FF) networks for
% predicting feature representation and frame weights. Then the feature
% representation are weighted by the frame weights and summed together to
% produce a single feature vector for each input sequence.
function layer = genNetworkFF_WeightedAverage(... |
github | singaxiong/SignalGraph-master | genNetworkTemporalConvLSTM.m | .m | SignalGraph-master/prototypes/genNetworkTemporalConvLSTM.m | 396 | utf_8 | da9f67355a0fd9efe7a4055d4896240d | % poolType = 'mean' or 'max'
% poolLayer = integer layer number after which we do the pooling
function layer = genNetworkTemporalConvLSTM(para)
layer = genNetworkTemporalConv2(para);
useFirstNLayer = length(para.nFilter)*3+1;
layer = layer(1:useFirstNLayer);
paraLSTM = para;
paraLSTM.inputDim = layer{end}.dim(1);
lay... |
github | singaxiong/SignalGraph-master | computeGlobalCMVN.m | .m | SignalGraph-master/prototypes/computeGlobalCMVN.m | 1,256 | utf_8 | 9678e1a367a055ab8889774be79e90c7 | % given a network and some data, compute the mean and variance of the
% network output. This function is usually used to determine the global
% mean and variance normalization parameters in the preprocessing.
% Xiong Xiao
%
function [W, b] = computeGlobalCMVN(Visible, nUttUsed, para, layer)
if exist('nUttUsed')==0 || ... |
github | singaxiong/SignalGraph-master | ConnectGraph.m | .m | SignalGraph-master/prototypes/ConnectGraph.m | 1,516 | utf_8 | 5a5894f351280c13c4cbe1387d3201d9 | % giving an array of nodes, assume they are connected from the first node
% to the last node. Automatically derive the connections parameters and
% dimensions
function layer = ConnectGraph(layer)
% generate connections to the immediate parent nodes (prev)
for i=1:length(layer)
if strcmpi(class(layer{i}), 'InputNo... |
github | singaxiong/SignalGraph-master | genNetworkFeedForward_pool.m | .m | SignalGraph-master/prototypes/genNetworkFeedForward_pool.m | 915 | utf_8 | eb83a49827fd227ed4321a3293624e3a | % poolType = 'mean' or 'max'
% poolLayer = integer layer number after which we do the pooling
function layer = genNetworkFeedForward_pool(inputDim, hiddenLayerSize, outputDim, costFn, poolType, poolAfterNlayer, LastActivation4MSE)
if nargin<7
LastActivation4MSE = 'linear';
end
layer = genNetworkFeedForward_v2(inpu... |
github | singaxiong/SignalGraph-master | VerifyPreprocessingTree.m | .m | SignalGraph-master/prototypes/VerifyPreprocessingTree.m | 317 | utf_8 | d3e4aaedd5e7b60e5f618556d7fbfce0 | % verify that the global MVN is correct.
% Xiong Xiao
function [processing] = VerifyPreprocessingTree(layer, Visible, para, nUttUsed)
if exist('nUttUsed')==0 || isempty(nUttUsed)
nUttUsed = 500;
end
[W, b] = computeGlobalCMVN(Visible, nUttUsed, para, layer);
plot(-b); hold on;
plot(1./diag(W)); hold off
end
|
github | singaxiong/SignalGraph-master | genNetworkSTFT.m | .m | SignalGraph-master/prototypes/genNetworkSTFT.m | 585 | utf_8 | 74bc5df118d851e14b923b1b7af1d053 |
% create a sub network that takes in waveforms and produces fourier
% coefficients
function layer = genNetworkSTFT(input_idx, nCh, usedChannel, nFFT)
layer{1} = InputNode(input_idx, nCh);
nUsedChannel = length(usedChannel);
if nUsedChannel < nCh
layer{end+1} = ElementSelectNode(usedChannel);
end
featDim = nUsedC... |
github | francois-a/llsmtools-master | readtiff.m | .m | llsmtools-master/iofunc/readtiff.m | 2,822 | utf_8 | 2034b18fd357c37154f6a81467fa4064 | %[s] = readtiff(filepath) loads a tiff file or stack using libtiff
% This function is ~1.5-2x faster than imread, useful for large stacks,
% and supports a wider range of TIFF formats (see below)
%
% Inputs:
% filepath : path to TIFF file to read from
%
% Optional inputs
% range : range of pages to read from... |
github | francois-a/llsmtools-master | writetiff.m | .m | llsmtools-master/iofunc/writetiff.m | 1,981 | utf_8 | 4f832daddca9584d3f26b367ec08acc0 | %writetiff(img, filepath, varargin) writes a TIFF stack using libtiff
% Stores TIFFs as 64-bit
% Francois Aguet, 05/21/2013
function writetiff(img, filepath, varargin)
ip = inputParser;
ip.CaseSensitive = false;
ip.addParamValue('Compression', 'lzw', @(x) any(strcmpi(x, {'none', 'lzw'})));
ip.addParamValue('Mode', '... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.