Guest User

Untitled

a guest
Mar 29th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1. IndexType, IndexType, long) [with T = float, IndexType = unsigned int, DstDim = 2, SrcDim = 2, IdxDim = -2, IndexIsMajor = true]: block: [156,0,0], thread: [30,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
  2. /pytorch/torch/lib/THC/THCTensorIndex.cu:360: void indexSelectLargeIndex(TensorInfo<T, IndexType>, TensorInfo<T, IndexType>, TensorInfo<long, IndexType>, int, int, IndexType, IndexType, long) [with T = float, IndexType = unsigned int, DstDim = 2, SrcDim = 2, IdxDim = -2, IndexIsMajor = true]: block: [156,0,0], thread: [31,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
  3. Traceback (most recent call last):
  4. File "translate.py", line 66, in <module>
  5. main()
  6. File "translate.py", line 58, in main
  7. all_hyp, all_scores = translator.translate_batch(batch)
  8. File "/home/harshil.goel/attention/transformer/Translator.py", line 62, in translate_batch
  9. enc_output, *_ = self.model.encoder(src_seq, src_pos)
  10. File "/home/harshil.goel/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 357, in __call__
  11. result = self.forward(*input, **kwargs)
  12. File "/home/harshil.goel/attention/transformer/Models.py", line 69, in forward
  13. enc_input += self.position_enc(src_pos)
  14. RuntimeError: cuda runtime error (59) : device-side assert triggered at /pytorch/torch/lib/THC/generated/../generic/THCTensorMathPointwise.cu:301
  15. harshil.goel@gnode14:~/attention$ CUDA_LAUNCH_BLOCKING=1 CUDA_VISIBLE_DEVICES=1 python3 translate.py -model trained.chkpt -vocab data/nmt.atok.low.pt -src data/nmt/test.en.atok -no_cuda
  16. [Info] Get 2000 instances from data/nmt/test.en.atok
  17. [Warning] 7 instances are trimmed to the max sentence length 50.
  18. [Info] Trained model state loaded.
  19. Traceback (most recent call last):
  20. File "translate.py", line 66, in <module>
  21. main()
  22. File "translate.py", line 58, in main
  23. all_hyp, all_scores = translator.translate_batch(batch)
  24. File "/home/harshil.goel/attention/transformer/Translator.py", line 62, in translate_batch
  25. enc_output, *_ = self.model.encoder(src_seq, src_pos)
  26. File "/home/harshil.goel/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 357, in __call__
  27. result = self.forward(*input, **kwargs)
  28. File "/home/harshil.goel/attention/transformer/Models.py", line 66, in forward
  29. enc_input = self.src_word_emb(src_seq)
  30. File "/home/harshil.goel/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 357, in __call__
  31. result = self.forward(*input, **kwargs)
  32. File "/home/harshil.goel/.local/lib/python3.5/site-packages/torch/nn/modules/sparse.py", line 103, in forward
  33. self.scale_grad_by_freq, self.sparse
  34. File "/home/harshil.goel/.local/lib/python3.5/site-packages/torch/nn/_functions/thnn/sparse.py", line 59, in forward
  35. output = torch.index_select(weight, 0, indices.view(-1))
  36. RuntimeError: index out of range at /pytorch/torch/lib/TH/generic/THTensorMath.c:277
Add Comment
Please, Sign In to add comment