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.
I am on pytorch 1.0 and no cuda.
When I run
python main.py --epochs 750 --data data/wikitext-2 --save WT2.pt --dropouth 0.2 --seed 1882
with --cuda set to action='store_true', default=False
I get an error:
RuntimeError: t() expects a 2D tensor, but self is 1D
Full trace as under:
Loading cached dataset...
Applying weight drop of 0.5 to weight_hh_l0
Applying weight drop of 0.5 to weight_hh_l0
Applying weight drop of 0.5 to weight_hh_l0
[WeightDrop(
(module): LSTM(400, 1150)
), WeightDrop(
(module): LSTM(1150, 1150)
), WeightDrop(
(module): LSTM(1150, 400)
)]
Using []
Args: Namespace(alpha=2, batch_size=80, beta=1, bptt=70, clip=0.25, cuda=False, data='data/wikitext-2', dropout=0.4, dropoute=0.1, dropouth=0.2, dropouti=0.65, emsize=400, epochs=750, log_interval=200, lr=30, model='LSTM', nhid=1150, nlayers=3, nonmono=5, optimizer='sgd', resume='', save='WT2.pt', seed=1882, tied=True, wdecay=1.2e-06, wdrop=0.5, when=[-1])
Model total parameters: 33556078
Traceback (most recent call last):
File "main.py", line 242, in
train()
File "main.py", line 198, in train
output, hidden, rnn_hs, dropped_rnn_hs = model(data, hidden, return_h=True)
File "/home/sam/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/sam/Documents/NLP/awd-lstm-lm/model.py", line 81, in forward
raw_output, new_h = rnn(raw_output, hidden[l])
File "/home/sam/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/sam/Documents/NLP/awd-lstm-lm/weight_drop.py", line 47, in forward
return self.module.forward(*args)
File "/home/sam/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 179, in forward
self.dropout, self.training, self.bidirectional, self.batch_first)
RuntimeError: t() expects a 2D tensor, but self is 1D
This could be because of my version of pytorch.
Any suggestions?
The text was updated successfully, but these errors were encountered: