soundnet icon indicating copy to clipboard operation
soundnet copied to clipboard

Error when trying to evaluate a new dataset: CUDNN_STATUS_BAD_PARAM

Open thisisjl opened this issue 7 years ago • 7 comments

Hi, thanks for releasing this code.

I want to evaluate SoundNet with another dataset. I have created text files for training and testing that contain a column for the full path to the WAV files and another column for their class. All the audio files are the same length.

I have modified the eval_dcase.lua script to read these text files and expect the duration of the files.

When I run it, I get the following error:

/home/jdieza15/torch/install/bin/luajit: /home/jdieza15/torch/install/share/lua/5.1/nn/Container.lua:67: 
In 25 module of nn.Sequential:
In 1 module of nn.ConcatTable:
/home/jdieza15/torch/install/share/lua/5.1/cudnn/init.lua:162: Error in CuDNN: CUDNN_STATUS_BAD_PARAM (cudnnGetConvolutionNdForwardOutputDim)
stack traceback:
	[C]: in function 'error'
	/home/jdieza15/torch/install/share/lua/5.1/cudnn/init.lua:162: in function 'errcheck'
	...torch/install/share/lua/5.1/cudnn/SpatialConvolution.lua:140: in function 'createIODescriptors'
	...torch/install/share/lua/5.1/cudnn/SpatialConvolution.lua:188: in function <...torch/install/share/lua/5.1/cudnn/SpatialConvolution.lua:186>
	[C]: in function 'xpcall'
	/home/jdieza15/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
	.../jdieza15/torch/install/share/lua/5.1/nn/ConcatTable.lua:11: in function <.../jdieza15/torch/install/share/lua/5.1/nn/ConcatTable.lua:9>
	[C]: in function 'xpcall'
	/home/jdieza15/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
	...e/jdieza15/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
	eval_urbansound8k.lua:64: in function 'read_dataset'
	eval_urbansound8k.lua:115: in main chunk
	[C]: in function 'dofile'
	...za15/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
	[C]: at 0x00405d50

WARNING: If you see a stack trace below, it doesn't point to the place where this error occurred. Please use only the one above.
stack traceback:
	[C]: in function 'error'
	/home/jdieza15/torch/install/share/lua/5.1/nn/Container.lua:67: in function 'rethrowErrors'
	...e/jdieza15/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
	eval_urbansound8k.lua:64: in function 'read_dataset'
	eval_urbansound8k.lua:115: in main chunk
	[C]: in function 'dofile'
	...za15/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
	[C]: at 0x00405d50

This is the code in line 64: net:forward(snd:view(1,1,-1,1):cuda())

I never used lua before, so I do not know how to interpret this error. Is it related to my installation of CuDNN or I am doing something wrong when running the code?

Thanks

thisisjl avatar May 31 '17 12:05 thisisjl

How long is the waveform you are using as input? I think it might be too small, and this error is complaining that the dimensionality of the hidden units are too small at this point in the network (likely becoming 0).

cvondrick avatar May 31 '17 17:05 cvondrick

The waveforms are 4 seconds long

thisisjl avatar May 31 '17 17:05 thisisjl

As a quick work around, try repeating it a few times. I think the SoundNet model we release requires at least a 5 second input.

cvondrick avatar May 31 '17 21:05 cvondrick

Okay, I will do that. Thank you very much!

Do you think it would make a difference if, instead of repeating the audio, I center it around zeros to a certain duration?

thisisjl avatar Jun 01 '17 06:06 thisisjl

I have repeated the audio files up to 10 seconds, but now I get the error Contiguous.lua:4: attempt to index local 'input' (a nil value).

See the full stack trace:

/home/jdieza15/torch/install/bin/luajit: /home/jdieza15/torch/install/share/lua/5.1/nn/Container.lua:67: 
In 28 module of nn.Sequential:
In 3 module of nn.ParallelTable:
In 1 module of nn.Sequential:
...e/jdieza15/torch/install/share/lua/5.1/nn/Contiguous.lua:4: attempt to index local 'input' (a nil value)
stack traceback:
        ...e/jdieza15/torch/install/share/lua/5.1/nn/Contiguous.lua:4: in function <...e/jdieza15/torch/install/share/lua/5.1/nn/Contiguous.lua:3>
        [C]: in function 'xpcall'
        /home/jdieza15/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
        ...e/jdieza15/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function <...e/jdieza15/torch/install/share/lua/5.1/nn/Sequential.lua:41>
        [C]: in function 'xpcall'
        /home/jdieza15/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
        ...dieza15/torch/install/share/lua/5.1/nn/ParallelTable.lua:12: in function <...dieza15/torch/install/share/lua/5.1/nn/ParallelTable.lua:10>
        [C]: in function 'xpcall'
        /home/jdieza15/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
        ...e/jdieza15/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
        eval_urbansound8k.lua:64: in function 'read_dataset'
        eval_urbansound8k.lua:115: in main chunk
        [C]: in function 'dofile'
        ...za15/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
        [C]: at 0x00405d50

WARNING: If you see a stack trace below, it doesn't point to the place where this error occurred. Please use only the one above.
stack traceback:
        [C]: in function 'error'
        /home/jdieza15/torch/install/share/lua/5.1/nn/Container.lua:67: in function 'rethrowErrors'
        ...e/jdieza15/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
        eval_urbansound8k.lua:64: in function 'read_dataset'
        eval_urbansound8k.lua:115: in main chunk
        [C]: in function 'dofile'
        ...za15/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
        [C]: at 0x00405d50

Any help is very appreciated

thisisjl avatar Jun 01 '17 08:06 thisisjl

Is the problem solved yet? I'm having the same issues here. Many thanks!

JianCao92 avatar Sep 28 '17 22:09 JianCao92

Hi.. I am also having the same problem. Any update?

ghost avatar Oct 30 '17 18:10 ghost