Error while running command

i am using linux version 16 , pytorch version 0.4, and python 3.
Command that i run for training: python3 -data data/data -save_model demo-model

while training model i am getting this error:

Start training…

  • number of epochs: 13, starting from Epoch 1
  • batch size: 64

Loading train dataset from data/, number of examples: 20
/home/kamal/Desktop/Linux desktop/OpenNMT-py-master/onmt/modules/ UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
align_vectors =*targetL, sourceL))
/usr/local/lib/python3.5/dist-packages/torch/nn/modules/ UserWarning: Implicit dimension choice for log_softmax has been deprecated. Change the call to include dim=X as an argument.
input = module(input)
/home/kamal/Desktop/Linux desktop/OpenNMT-py-master/onmt/ UserWarning: invalid index of a 0-dim tensor. This will be an error in PyTorch 0.5. Use tensor.item() to convert a 0-dim tensor to a Python number
return onmt.Statistics(loss[0], non_padding.sum(), num_correct)
/home/kamal/Desktop/Linux desktop/OpenNMT-py-master/onmt/ UserWarning: torch.nn.utils.clip_grad_norm is now deprecated in favor of torch.nn.utils.clip_grad_norm_.
clip_grad_norm(self.params, self.max_grad_norm)
Traceback (most recent call last):
File “”, line 438, in
File “”, line 430, in main
train_model(model, fields, optim, data_type, model_opt)
File “”, line 252, in train_model
train_stats = trainer.train(train_iter, epoch, report_func)
File “/home/kamal/Desktop/Linux desktop/OpenNMT-py-master/onmt/”, line 178, in train
report_stats, normalization)
File “/home/kamal/Desktop/Linux desktop/OpenNMT-py-master/onmt/”, line 321, in gradient_accumulation
File “/home/kamal/Desktop/Linux desktop/OpenNMT-py-master/onmt/”, line 611, in detach
RuntimeError: Can’t detach views in-place. Use detach() instead

OpenNMT-py has not been updated to support PyTorch 0.4 yet. Try PyTorch 0.3.1 instead.

Thank u sir

i have only cpu. which file should i use form this link to install in linux

and also tell how to remove pytorch 0.4

Thank you.