Traceback (most recent call last):
File "main.py", line 245, in
train()
File "main.py", line 200, in train
output, hidden, rnn_hs, dropped_rnn_hs = model(data, hidden, return_h=True)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, *kwargs)
File "/home/ubuntu/model.py", line 81, in forward
raw_output, new_h = rnn(raw_output, hidden[l])
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(input, **kwargs)
File "/home/ubuntu/weight_drop.py", line 47, in forward
self._setweights()
File "/home/ubuntu/weight_drop.py", line 44, in _setweights
setattr(self.module, name_w, w)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 604, in setattr
.format(torch.typename(value), name))
TypeError: cannot assign 'torch.cuda.FloatTensor' as parameter 'weight_hh_l0' (torch.nn.Parameter or None expected)
python main.py --cuda --epochs 750 --data data/wikitext-2 --save WT2.pt --dropouth 0.2 --seed 1882
Traceback (most recent call last): File "main.py", line 245, in
train()
File "main.py", line 200, in train
output, hidden, rnn_hs, dropped_rnn_hs = model(data, hidden, return_h=True)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, *kwargs)
File "/home/ubuntu/model.py", line 81, in forward
raw_output, new_h = rnn(raw_output, hidden[l])
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(input, **kwargs)
File "/home/ubuntu/weight_drop.py", line 47, in forward
self._setweights()
File "/home/ubuntu/weight_drop.py", line 44, in _setweights
setattr(self.module, name_w, w)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 604, in setattr
.format(torch.typename(value), name))
TypeError: cannot assign 'torch.cuda.FloatTensor' as parameter 'weight_hh_l0' (torch.nn.Parameter or None expected)