Slow TemporalConvolution

12 wyświetleń
Przejdź do pierwszej nieodczytanej wiadomości

Alexey Voropaev

nieprzeczytany,
29 wrz 2016, 10:13:0029.09.2016
do torch7
Hi!

I have audio signal with 120000 samples and 16 channels.  I want to process this signal using 1D convolution network. I do it using following code (simplified):

require 'cunn';
torch
.setdefaulttensortype('torch.FloatTensor')
cutorch
.setDevice(2)

net
= nn.Sequential()
net
:add(nn.TemporalConvolution(16, 16, 17))
net = net:cuda()

input = torch.rand(120000, 16):cuda()
local tic = torch.tic()
output = net:forward(input)
print( torch.toc(tic) )
print( output:size() )

In this example I have forward pass time about 1.25s on Titan X.  In my opinion this time is extremely high.

This time depends on input tensor size (2.54s for 240000x16)  and does not depend on kernel size at all.

I think that the problem is in memory management, but I can't recognize where. Could you help me find the problem?

Thanks in advance.
Odpowiedz wszystkim
Odpowiedz autorowi
Przekaż
Nowe wiadomości: 0