-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shrinkagegpu cuda command unrecognized #2
Comments
Right, sorry, I am such a clumsy beginner. As you can see, code is still torch.Tensor, when it should be cuda tensor, since we want this to run on gpu. I had used a dirty fix for that, i.e. added in optim/fista.lua, at line 55
I had forgotten about this. I will try to think of better ways to do this, that don't require changing other packages, and update my code. Thanks for reporting this.
and convert all tensors to cuda tensors, i.e. inputs and targets. |
@viorik Hi, thank you for this reply. Unfortunately, the command: /home/torch/install/share/lua/5.1/torch/Tensor.lua:241: attempt to index a nil value I must be missing something....Maybe you can post a simple test code that works for you ? |
Uploaded a demo script in demo_conv_psd_gpu. |
@viorik your example 'demo_conv_psd_gpu' is working well both ways (after commenting out line 67) |
Cool, glad to hear that. Small tip: when you use mini-batch training, keep the batch size small (e.g. 5), you will get nice looking filters faster. |
Hi, I am trying to run your demo aswell. And when I use qlua instead, I get another error when using function "dataset = getdata(filename, params.inputsize)" in line 87 How are you executing the file/which interpreter are you using? |
@Richi91, use qlua to be able to display things (image samples and learnt filters). With th that won't be possible. |
qt does not work in th. |
Thx for your answers! I guess I will figure out what caused the problem, just wanted to know if it works when you simply execute the script like "qlua demo_conv_psd_gpu.lua" in the shell? |
I suspect that this may be related to having the same file open or used by several shells. |
@Richi91, I've updated now autoencoder-data.lua. |
@Richi91 also make sure lines 58-63 are not commented. |
I gave it a go now using itorch notebook. It works OK also with qt, so you may want to consider this relatively convenient environment as well. |
The following 3 lines produces the error below.
The same file in .bin format obtained from http://cs.nyu.edu/~koray/publis/code/tr-berkeley-N5K-M56x56-lcn.bin produces the same error (also with iTorch). It's really strange that I can read all files with TH but not with qlua. don't bother with this anymore, this bug is not related to your unsupgpu module. Anyway, thanks for your help! |
I was able to solve my issue by using
instead of
|
@Richi91 good to know. Thanks. |
@viorik Hi,
I am now getting the following error:
/home/torch/install/share/lua/5.1/unsupgpu/FistaL1.lua:79: attempt to call method 'shrinkagegpu' (a nil value)
stack traceback:
/home/torch/install/share/lua/5.1/unsupgpu/FistaL1.lua: in function 'pl'
/home/torch/install/share/lua/5.1/optim/fista.lua:95: in function 'FistaLS'
/home/torch/install/share/lua/5.1/unsupgpu/FistaL1.lua:119: in function 'updateOutput'
/home/torch/install/share/lua/5.1/unsupgpu/psd.lua:52: in function 'updateOutput'
train-autoencoder-mnist.lua:274: in main chunk
It appears that this cuda command is not recognized.
BTW, the input to
code:shrinkagegpu(self.lambda/L)
in this case is:
code - torch.DoubleTensor of size 16x32x32
self.lambda - 1
L - 0.1
The text was updated successfully, but these errors were encountered: