You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing around with the RNN library and got the following code:
cnn = nn.Sequential()
-- Creates a conv_block: [SpatConv, SpatMaxPool, PReLU, Dropout]
function add_conv_block(model, nFilterIn, nFilterOut, filterH, filterW, dOut,
preluLeak)
dOut = dOut or default_dropout
preluLeak = preluLeak or default_preluLeak
return model:add(nn.SpatialConvolution(nFilterIn, nFilterOut, filterW,
filterH))
:add(nn.SpatialBatchNormalization(nFilterOut))
:add(nn.SpatialDropout(dOut))
:add(nn.PReLU(preluLeak))
end
cnn:add(nn.Reshape(1,8,24))
add_conv_block(cnn, 1, 32, 2,6)
cnn:add(nn.Reshape(4256))
cnn:add(nn.Linear(4256, 2048))
-------------------------------------------------------
-- Construct the complete model
model = nn.Sequencer(
nn.Sequential()
:add(cnn)
)
model:cuda()
-------------------------------------------------------
-- Test with dummy input
x = torch.CudaTensor(10, 128, 192)
y = model:forward(x)
Running this on CPU gives me a segmentation fault. Running it on the GPU gives me the following error: cuda runtime error (77) : an illegal memory access was encountered.
After iteratively leaving out parts of the architecture, I found the culprit: nn.PReLU. Uncommenting it leads to normal behaviour. I've replaced it with LeakyReLU, which works fine. I'd like to report this issue in case it can be fixed.
The text was updated successfully, but these errors were encountered:
I've been playing around with the RNN library and got the following code:
Running this on CPU gives me a segmentation fault. Running it on the GPU gives me the following error: cuda runtime error (77) : an illegal memory access was encountered.
After iteratively leaving out parts of the architecture, I found the culprit: nn.PReLU. Uncommenting it leads to normal behaviour. I've replaced it with LeakyReLU, which works fine. I'd like to report this issue in case it can be fixed.
The text was updated successfully, but these errors were encountered: