Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.
- /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.
- Traceback (most recent call last):
- File "translate.py", line 66, in <module>
- main()
- File "translate.py", line 58, in main
- all_hyp, all_scores = translator.translate_batch(batch)
- File "/home/harshil.goel/attention/transformer/Translator.py", line 62, in translate_batch
- enc_output, *_ = self.model.encoder(src_seq, src_pos)
- File "/home/harshil.goel/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 357, in __call__
- result = self.forward(*input, **kwargs)
- File "/home/harshil.goel/attention/transformer/Models.py", line 69, in forward
- enc_input += self.position_enc(src_pos)
- RuntimeError: cuda runtime error (59) : device-side assert triggered at /pytorch/torch/lib/THC/generated/../generic/THCTensorMathPointwise.cu:301
- 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
- [Info] Get 2000 instances from data/nmt/test.en.atok
- [Warning] 7 instances are trimmed to the max sentence length 50.
- [Info] Trained model state loaded.
- Traceback (most recent call last):
- File "translate.py", line 66, in <module>
- main()
- File "translate.py", line 58, in main
- all_hyp, all_scores = translator.translate_batch(batch)
- File "/home/harshil.goel/attention/transformer/Translator.py", line 62, in translate_batch
- enc_output, *_ = self.model.encoder(src_seq, src_pos)
- File "/home/harshil.goel/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 357, in __call__
- result = self.forward(*input, **kwargs)
- File "/home/harshil.goel/attention/transformer/Models.py", line 66, in forward
- enc_input = self.src_word_emb(src_seq)
- File "/home/harshil.goel/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 357, in __call__
- result = self.forward(*input, **kwargs)
- File "/home/harshil.goel/.local/lib/python3.5/site-packages/torch/nn/modules/sparse.py", line 103, in forward
- self.scale_grad_by_freq, self.sparse
- File "/home/harshil.goel/.local/lib/python3.5/site-packages/torch/nn/_functions/thnn/sparse.py", line 59, in forward
- output = torch.index_select(weight, 0, indices.view(-1))
- RuntimeError: index out of range at /pytorch/torch/lib/TH/generic/THTensorMath.c:277
Add Comment
Please, Sign In to add comment