-
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
fista.lua:61: bad argument #1 to 'resizeAs' (torch.FloatTensor expected, got torch.CudaTensor) #4
Comments
As per issue #2, there is a compatibility issue with optim/fista.lua, so I added this at line 55 in optim/fista.lua:
I still need to think of a better way to do this, so that we don't need to change fista. Does this solve the problem? |
yes that works! I also had to remove the torch.setdefaulttensortype('torch.FloatTensor') which is causing trouble as it makes fista expect a float. So your code does work on the gpu, congrats to that! Running the same conv-psd demo with and without the gpu, using batchsize of both 1 and similar settings, the pure cpu code has a steptime of 80ms, while the cuda one stays around 140ms, so actually much worse. Have you tried to benchmark the times yourself, is it maybe something I'm doing wrong on my side? If I can make the time, I'll play around with it a bit more, and see if I can speed things up a bit. |
Cool, could you close this issue then? |
running the demo_conv_psd_gpu.lua or my own code I get the following error. Seems like it still uses optim.fista in line 119
local code, h = optim.FistaLS(self.f, self.g, self.pl, self.code, self.params)
error:
The text was updated successfully, but these errors were encountered: