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
Hi
Thank you for sharing the code. However, when I tried to test the repo with "python preprocess.py" and " python train.py --weights --cuda", the first one worked well and generated processed data, whereas the second reported the error as follows:
[Epoch 1]: 0%| | 0/1 [00:00<?, ?it/s]Traceback (most recent call last):
File "train.py", line 93, in train(parse_args())
File "train.py", line 81, in train loss = sgns(iword, owords)
File "/home/weixin/anaconda2/envs/p3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 325, in call
result = self.forward(*input, **kwargs)
File "/home/weixin/Downloads/pytorch-sgns-master/model.py", line 70, in forward
ivectors = self.embedding.forward_i(iword).unsqueeze(2)
File "/home/weixin/Downloads/pytorch-sgns-master/model.py", line 42, in forward_i
return self.ivectors(v)
File "/home/weixin/anaconda2/envs/p3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 325, in call
result = self.forward(*input, **kwargs)
File "/home/weixin/anaconda2/envs/p3/lib/python3.6/site-packages/torch/nn/modules/sparse.py", line 103, in forward
self.scale_grad_by_freq, self.sparse
RuntimeError: save_for_backward can only save input or output tensors, but argument 0 doesn't satisfy this condition
I am quite new to Pytorch so any idea what might go wrong?
Many thanks.
The text was updated successfully, but these errors were encountered:
Hi, thanks for the reply. The pytorch version is 0.3.0.post4.
The error does look similar to the post. Should I wrap the Tensors in the Variables?
Many thanks.
Hi
Thank you for sharing the code. However, when I tried to test the repo with "python preprocess.py" and " python train.py --weights --cuda", the first one worked well and generated processed data, whereas the second reported the error as follows:
I am quite new to Pytorch so any idea what might go wrong?
Many thanks.
The text was updated successfully, but these errors were encountered: