hi~ I tried to run your code with pytorch(0.4.0) and python (3.5.2),but the program reported an error:
Loading corpus...
Begin training...
main.py:108: UserWarning: torch.nn.utils.clip_grad_norm is now deprecated in favor of torch.nn.utils.clip_grad_norm_.
torch.nn.utils.clip_grad_norm(model.parameters(), args.clip)
Traceback (most recent call last):
File "main.py", line 200, in
loss_log = train(loss_log)
File "main.py", line 114, in train
cur_loss = cur_loss.cpu().numpy()[0]
IndexError: too many indices for array
I think the version is not compatible, so what's the versions of pytorch and python should be ?
hi~ I tried to run your code with pytorch(0.4.0) and python (3.5.2),but the program reported an error:
Loading corpus...
Begin training...
main.py:108: UserWarning: torch.nn.utils.clip_grad_norm is now deprecated in favor of torch.nn.utils.clip_grad_norm_.
torch.nn.utils.clip_grad_norm(model.parameters(), args.clip)
Traceback (most recent call last):
File "main.py", line 200, in
loss_log = train(loss_log)
File "main.py", line 114, in train
cur_loss = cur_loss.cpu().numpy()[0]
IndexError: too many indices for array
I think the version is not compatible, so what's the versions of pytorch and python should be ?