Skip to content
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

fix and validate reinforce.py works in gpu mode #13

Open
jtoy opened this issue Nov 27, 2017 · 1 comment
Open

fix and validate reinforce.py works in gpu mode #13

jtoy opened this issue Nov 27, 2017 · 1 comment

Comments

@jtoy
Copy link
Owner

jtoy commented Nov 27, 2017

i think the new RNN functionality kills it:
https://discuss.pytorch.org/t/training-rnn-on-gpu/3574/5

base_linkepisode: 48

1 touches in current episode <<
env.class_label: 9
Traceback (most recent call last):
File "reinforce.py", line 243, in
output = cnn_lstm(observed_touches) # Prediction
File "/home/jtoy/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 206, in call
result = self.forward(*input, **kwargs)
File "reinforce.py", line 146, in forward
rnn_out, rnn_hidden = self.rnn(inp.view(1, 1, -1), rnn_hidden)
File "/home/jtoy/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 206, in call
result = self.forward(*input, **kwargs)
File "/home/jtoy/anaconda3/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 91, in forward
output, hidden = func(input, self.all_weights, hx)
File "/home/jtoy/anaconda3/lib/python3.6/site-packages/torch/nn/_functions/rnn.py", line 343, in forward
return func(input, *fargs, **fkwargs)
File "/home/jtoy/anaconda3/lib/python3.6/site-packages/torch/autograd/function.py", line 202, in _do_forward
flat_output = super(NestedIOFunction, self)._do_forward(*flat_input)
File "/home/jtoy/anaconda3/lib/python3.6/site-packages/torch/autograd/function.py", line 224, in forward
result = self.forward_extended(*nested_tensors)
File "/home/jtoy/anaconda3/lib/python3.6/site-packages/torch/nn/_functions/rnn.py", line 285, in forward_extended
cudnn.rnn.forward(self, input, hx, weight, output, hy)
File "/home/jtoy/anaconda3/lib/python3.6/site-packages/torch/backends/cudnn/rnn.py", line 239, in forward
fn.hx_desc = cudnn.descriptor(hx)
File "/home/jtoy/anaconda3/lib/python3.6/site-packages/torch/backends/cudnn/init.py", line 304, in descriptor
descriptor.set(tensor)
File "/home/jtoy/anaconda3/lib/python3.6/site-packages/torch/backends/cudnn/init.py", line 110, in set
self, _typemap[tensor.type()], tensor.dim(),
KeyError: 'torch.FloatTensor'

@jtoy
Copy link
Owner Author

jtoy commented Nov 28, 2017

if i comment out the rnn training, then gpu mode works ,so i think it is the issue in the above pytorch link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants