torch / cutorch

A CUDA backend for Torch7
Other
336 stars 208 forks source link

"Bus error" in Tx1 #715

Closed khudkhud closed 7 years ago

khudkhud commented 7 years ago

The torch7 has been installed in TX1 ,and can do some math operations. But when I test the simple demo as follows, a 'Bus Error' happens. Is there some advice? Thank you!

require 'nn'; net = nn.Sequential() net:add(nn.SpatialConvolution(1, 6, 5, 5)) -- 1 input image channel, 6 output channels, 5x5 convolution kernel net:add(nn.ReLU()) -- non-linearity net:add(nn.SpatialMaxPooling(2,2,2,2)) -- A max-pooling operation that looks at 2x2 windows and finds the max. net:add(nn.SpatialConvolution(6, 16, 5, 5)) net:add(nn.ReLU()) -- non-linearity net:add(nn.SpatialMaxPooling(2,2,2,2)) net:add(nn.View(1655)) -- reshapes from a 3D tensor of 16x5x5 into 1D tensor of 1655 net:add(nn.Linear(1655, 120)) -- fully connected layer (matrix multiplication between input and weights) net:add(nn.ReLU()) -- non-linearity net:add(nn.Linear(120, 84)) net:add(nn.ReLU()) -- non-linearity net:add(nn.Linear(84, 10)) -- 10 is the number of outputs of the network (in this case, 10 digits) net:add(nn.LogSoftMax()) -- converts the output to a log-probability. Useful for classification problems

print('Lenet5\n' .. net:__tostring());

input = torch.rand(1,32,32) -- pass a random tensor as input to the network output = net:forward(input) print(output)

khudkhud commented 7 years ago

sorry, I should ask this question under torch7.