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
When I run the sequencer-test.sh,I got the following error.It seems like the variable outputs is empty. sequencer-test.sh start Starting test data translation /home/xiaoyawang/miniconda3/envs/py36/lib/python3.6/site-packages/torchtext/legacy/data/field.py:353: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor). var = torch.tensor(arr, dtype=self.dtype, device=device) Traceback (most recent call last): File "translate.py", line 35, in <module> main(opt) File "translate.py", line 20, in main attn_debug=opt.attn_debug File "/home/xiaoyawang/sequencer/src/lib/OpenNMT-py/onmt/translate/translator.py", line 210, in translate batch, data, attn_debug, fast=self.fast File "/home/xiaoyawang/sequencer/src/lib/OpenNMT-py/onmt/translate/translator.py", line 354, in translate_batch return self._translate_batch(batch, data) File "/home/xiaoyawang/sequencer/src/lib/OpenNMT-py/onmt/translate/translator.py", line 666, in _translate_batch batch, data_type) File "/home/xiaoyawang/sequencer/src/lib/OpenNMT-py/onmt/translate/translator.py", line 364, in _run_encoder src, src_lengths) File "/home/xiaoyawang/miniconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/xiaoyawang/sequencer/src/lib/OpenNMT-py/onmt/encoders/rnn_encoder.py", line 55, in forward emb = self.embeddings(src) File "/home/xiaoyawang/miniconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/xiaoyawang/sequencer/src/lib/OpenNMT-py/onmt/modules/embeddings.py", line 205, in forward source = self.make_embedding(source) File "/home/xiaoyawang/miniconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/xiaoyawang/miniconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/container.py", line 119, in forward input = module(input) File "/home/xiaoyawang/miniconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/xiaoyawang/sequencer/src/lib/OpenNMT-py/onmt/modules/util_class.py", line 31, in forward return torch.cat(outputs, 2) TypeError: expected Tensor as element 0 in argument 0, but got NoneType sequencer-test.sh done
The text was updated successfully, but these errors were encountered:
When I run the sequencer-test.sh,I got the following error.It seems like the variable outputs is empty.
sequencer-test.sh start Starting test data translation /home/xiaoyawang/miniconda3/envs/py36/lib/python3.6/site-packages/torchtext/legacy/data/field.py:353: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor). var = torch.tensor(arr, dtype=self.dtype, device=device) Traceback (most recent call last): File "translate.py", line 35, in <module> main(opt) File "translate.py", line 20, in main attn_debug=opt.attn_debug File "/home/xiaoyawang/sequencer/src/lib/OpenNMT-py/onmt/translate/translator.py", line 210, in translate batch, data, attn_debug, fast=self.fast File "/home/xiaoyawang/sequencer/src/lib/OpenNMT-py/onmt/translate/translator.py", line 354, in translate_batch return self._translate_batch(batch, data) File "/home/xiaoyawang/sequencer/src/lib/OpenNMT-py/onmt/translate/translator.py", line 666, in _translate_batch batch, data_type) File "/home/xiaoyawang/sequencer/src/lib/OpenNMT-py/onmt/translate/translator.py", line 364, in _run_encoder src, src_lengths) File "/home/xiaoyawang/miniconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/xiaoyawang/sequencer/src/lib/OpenNMT-py/onmt/encoders/rnn_encoder.py", line 55, in forward emb = self.embeddings(src) File "/home/xiaoyawang/miniconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/xiaoyawang/sequencer/src/lib/OpenNMT-py/onmt/modules/embeddings.py", line 205, in forward source = self.make_embedding(source) File "/home/xiaoyawang/miniconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/xiaoyawang/miniconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/container.py", line 119, in forward input = module(input) File "/home/xiaoyawang/miniconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/xiaoyawang/sequencer/src/lib/OpenNMT-py/onmt/modules/util_class.py", line 31, in forward return torch.cat(outputs, 2) TypeError: expected Tensor as element 0 in argument 0, but got NoneType sequencer-test.sh done
The text was updated successfully, but these errors were encountered: