{"action":"created","issue":{"url":"https://api.github.com/repos/szagoruyko/cifar.torch/issues/2","labels_url":"https://api.github.com/repos/szagoruyko/cifar.torch/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/szagoruyko/cifar.torch/issues/2/comments","events_url":"https://api.github.com/repos/szagoruyko/cifar.torch/issues/2/events","html_url":"https://github.com/szagoruyko/cifar.torch/issues/2","id":100297291,"number":2,"title":"CPU version","user":{"login":"srp1970","id":5780644,"avatar_url":"https://avatars.githubusercontent.com/u/5780644?v=3","gravatar_id":"","url":"https://api.github.com/users/srp1970","html_url":"https://github.com/srp1970","followers_url":"https://api.github.com/users/srp1970/followers","following_url":"https://api.github.com/users/srp1970/following{/other_user}","gists_url":"https://api.github.com/users/srp1970/gists{/gist_id}","starred_url":"https://api.github.com/users/srp1970/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srp1970/subscriptions","organizations_url":"https://api.github.com/users/srp1970/orgs","repos_url":"https://api.github.com/users/srp1970/repos","events_url":"https://api.github.com/users/srp1970/events{/privacy}","received_events_url":"https://api.github.com/users/srp1970/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-11T12:03:46Z","updated_at":"2015-08-11T19:03:54Z","closed_at":null,"body":"This looks good. How do you run this on CPU? Is this hardcoded to run only on GPUs (NVIDIA)? When I tried removing reference to CUDA and try running on CPU it gives me an error saying:\r\n\r\n/home/sanoob/torch/install/bin/luajit: ...ob/torch/install/share/lua/5.1/nn/SpatialConvolution.lua:100: bad argument #1 (field finput is not a torch.FloatTensor)\r\nstack traceback:\r\n        [C]: in function 'SpatialConvolutionMM_updateOutput'\r\n        ...ob/torch/install/share/lua/5.1/nn/SpatialConvolution.lua:100: in function 'updateOutput'\r\n        /home/sanoob/torch/install/share/lua/5.1/nn/Sequential.lua:39: in function 'updateOutput'\r\n        /home/sanoob/torch/install/share/lua/5.1/nn/Sequential.lua:39: in function 'updateOutput'\r\n        /home/sanoob/torch/install/share/lua/5.1/nn/Sequential.lua:39: in function 'forward'\r\n        train-cpu.lua:106: in function 'opfunc'\r\n        /home/sanoob/torch/install/share/lua/5.1/optim/sgd.lua:43: in function 'sgd'\r\n        train-cpu.lua:115: in function 'train'\r\n        train-cpu.lua:190: in main chunk\r\n\r\nat line \r\n\r\n      local outputs = model:forward(inputs)\r\n\r\nShould we declare inputs as FloatTensor too?"},"comment":{"url":"https://api.github.com/repos/szagoruyko/cifar.torch/issues/comments/130020145","html_url":"https://github.com/szagoruyko/cifar.torch/issues/2#issuecomment-130020145","issue_url":"https://api.github.com/repos/szagoruyko/cifar.torch/issues/2","id":130020145,"user":{"login":"szagoruyko","id":4953728,"avatar_url":"https://avatars.githubusercontent.com/u/4953728?v=3","gravatar_id":"","url":"https://api.github.com/users/szagoruyko","html_url":"https://github.com/szagoruyko","followers_url":"https://api.github.com/users/szagoruyko/followers","following_url":"https://api.github.com/users/szagoruyko/following{/other_user}","gists_url":"https://api.github.com/users/szagoruyko/gists{/gist_id}","starred_url":"https://api.github.com/users/szagoruyko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szagoruyko/subscriptions","organizations_url":"https://api.github.com/users/szagoruyko/orgs","repos_url":"https://api.github.com/users/szagoruyko/repos","events_url":"https://api.github.com/users/szagoruyko/events{/privacy}","received_events_url":"https://api.github.com/users/szagoruyko/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T19:03:54Z","updated_at":"2015-08-11T19:03:54Z","body":"The code is hardcoded to cuda because CPU would be ridiculously slow with this network. However it is very to easy to fix, just all CudaTensors have to be substituted with FloatTensors."}}