Commit 49b46021 authored by Hannah MUCKENHIRN's avatar Hannah MUCKENHIRN

Removed commented lines

parent 5bd99a6e
......@@ -54,8 +54,6 @@ end
dirname=dirname .. modelID .. "_"
os.execute("mkdir -v " .. params.save .. "/" .. dirname)
--params.nvalid=193404 --AVspoofPA eval:48896 -- AVspoofLA:25636 -- ASVspoof 193404
-- DATASET
......@@ -66,7 +64,6 @@ configValid.datafile=params2.data
configValid.labelfile=params2.label
configValid.pathfile=params2.path
configValid.vadfile= params2.VAD
--configValid.nData=params.nvalid
configValid.feat="wav"
configValid.nSamplePerFrame=160 -- 10ms @ 16kHz
configValid.norm=params.norm
......@@ -91,12 +88,6 @@ nInput=validSet.nInput
nOutput=2;
print(nInput .. " samples for each example");
-- TEST
--os.execute("ls " .. params.save .. "/" .. dirname)
--lfs.mkdir(params.save .. "/" .. dirname)
seq=torch.Tensor(nInput,1):fill(0);
......@@ -112,7 +103,6 @@ print("number of utterances: " .. validSet.nData)
for i = 1,validSet.nData do
print(i)
local nbVoicedFrames=0
local score=0
target=validSet:get_label(c)
......
......@@ -37,11 +37,11 @@ cmd=torch.CmdLine();
cmd:option('-Lr',0.0001,'Learning rate');
cmd:option('-maxIter',50,'Max Iteration');
cmd:option('-context',15,'Number of context frames');
cmd:option('-nhu1',20,'Number of hidden units of conv1');
cmd:option('-nf1',20,'Number of hidden units of conv1');
cmd:option('-kW1',300,'kernel width of conv1');
cmd:option('-dW1',100,'kernel shift of conv1');
cmd:option('-arch','','conv1');
cmd:option('-clNhu',0,'Number of hidden units of MLP')
cmd:option('-nhu',0,'Number of hidden units of MLP')
cmd:option('-trainData',"",'File containing data of training set')
cmd:option('-trainLabel',"",'File containing labels of training set')
......@@ -131,20 +131,20 @@ if params.arch=="cnnMLP" then
local nout1= math.floor((nInput-params.kW1)/params.dW1)+1
net:add(nn.TemporalConvolution(1,params.nhu1,params.kW1,params.dW1));
net:add(nn.Reshape(nout1*params.nhu1));
net:add(nn.TemporalConvolution(1,params.nf1,params.kW1,params.dW1));
net:add(nn.Reshape(nout1*params.nf1));
net:add(nn.HardTanh());
net:add(nn.Linear(nout1*params.nhu1,params.clNhu));
net:add(nn.Linear(nout1*params.nf1,params.nhu));
net:add(nn.HardTanh());
net:add(nn.Linear(params.clNhu,nOutput));
net:add(nn.Linear(params.nhu,nOutput));
elseif params.arch=="cnnSLP" then
local nout1= math.floor((nInput-params.kW1)/params.dW1)+1
net:add(nn.TemporalConvolution(1,params.nhu1,params.kW1,params.dW1));
net:add(nn.Reshape(nout1*params.nhu1));
net:add(nn.TemporalConvolution(1,params.nf1,params.kW1,params.dW1));
net:add(nn.Reshape(nout1*params.nf1));
net:add(nn.HardTanh());
net:add(nn.Linear(nout1*params.nhu1,nOutput));
net:add(nn.Linear(nout1*params.nf1,nOutput));
else
error("Architecture not recognized")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment