You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
>>> import torch
>>> from torchqrnn import QRNN
>>>
>>> seq_len, batch_size, hidden_size = 7, 20, 256
>>> size = (seq_len, batch_size, hidden_size)
>>> X = torch.autograd.Variable(torch.rand(size), requires_grad=True).cuda()
>>>
>>> qrnn = QRNN(hidden_size, hidden_size, num_layers=2, dropout=0.4)
>>> qrnn.cuda()
QRNN(
(layers): ModuleList(
(0): QRNNLayer(
(linear): Linear(in_features=256, out_features=768, bias=True)
)
(1): QRNNLayer(
(linear): Linear(in_features=256, out_features=768, bias=True)
)
)
)
>>> output, hidden = qrnn(X)
/home/oeganea/.local/lib/python3.5/site-packages/torch/nn/functional.py:995: UserWarning: nn.functional.tanh is deprecated. Use torch.tanh instead.
warnings.warn("nn.functional.tanh is deprecated. Use torch.tanh instead.")
/home/oeganea/.local/lib/python3.5/site-packages/torch/nn/functional.py:1006: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/oeganea/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in __call__
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/torchqrnn/qrnn.py", line 164, in forward
input, hn = layer(input, None if hidden is None else hidden[i])
File "/home/oeganea/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in __call__
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/torchqrnn/qrnn.py", line 99, in forward
C = ForgetMult()(F, Z, hidden, use_cuda=self.use_cuda)
File "/home/oeganea/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in __call__
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/torchqrnn/forget_mult.py", line 178, in forward
if hidden_init is None: return GPUForgetMult()(f, x) if use_cuda else CPUForgetMult()(f, x)
File "/usr/local/lib/python3.5/dist-packages/torchqrnn/forget_mult.py", line 120, in forward
self.compile()
File "/usr/local/lib/python3.5/dist-packages/torchqrnn/forget_mult.py", line 102, in compile
program = Program(kernel.encode(), 'recurrent_forget_mult.cu'.encode())
File "/usr/local/lib/python3.5/dist-packages/pynvrtc/compiler.py", line 52, in __init__
include_names)
File "/usr/local/lib/python3.5/dist-packages/pynvrtc/interface.py", line 200, in nvrtcCreateProgram
c_char_p(encode_str(src)), c_char_p(encode_str(name)),
File "/usr/local/lib/python3.5/dist-packages/pynvrtc/interface.py", line 54, in encode_str
return s.encode("utf-8")
AttributeError: 'bytes' object has no attribute 'encode'
Also, QRNN fails on the AWD-LSTM-LM repo with a similar error:
File "/home/oeganea/awd-lstm-lm/model.py", line 81, in forward
raw_output, new_h = rnn(raw_output, hidden[l])
File "/home/oeganea/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in __call__
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/torchqrnn/qrnn.py", line 99, in forward
C = ForgetMult()(F, Z, hidden, use_cuda=self.use_cuda)
File "/home/oeganea/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in __call__
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/torchqrnn/forget_mult.py", line 179, in forward
return GPUForgetMult()(f, x, hidden_init) if use_cuda else CPUForgetMult()(f, x, hidden_init)
File "/usr/local/lib/python3.5/dist-packages/torchqrnn/forget_mult.py", line 120, in forward
self.compile()
File "/usr/local/lib/python3.5/dist-packages/torchqrnn/forget_mult.py", line 102, in compile
program = Program(kernel.encode(), 'recurrent_forget_mult.cu'.encode())
File "/usr/local/lib/python3.5/dist-packages/pynvrtc/compiler.py", line 52, in __init__
include_names)
File "/usr/local/lib/python3.5/dist-packages/pynvrtc/interface.py", line 200, in nvrtcCreateProgram
c_char_p(encode_str(src)), c_char_p(encode_str(name)),
File "/usr/local/lib/python3.5/dist-packages/pynvrtc/interface.py", line 54, in encode_str
return s.encode("utf-8")
AttributeError: 'bytes' object has no attribute 'encode'
Exception ignored in: <bound method Program.__del__ of <pynvrtc.compiler.Program object at 0x7f5aca839ef0>>
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/pynvrtc/compiler.py", line 56, in __del__
self._interface.nvrtcDestroyProgram(self._program)
AttributeError: 'Program' object has no attribute '_program'
Any ideas ? Thanks!
The text was updated successfully, but these errors were encountered:
I have python 3.5.2, pytorch 0.4.
Also, QRNN fails on the AWD-LSTM-LM repo with a similar error:
Any ideas ? Thanks!
The text was updated successfully, but these errors were encountered: