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
I have donwloaded the lastest version of seq2seq, but most of the testunit in tests package can't pass
for example run the test_topkdecoder.py
Error
Traceback (most recent call last):
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
yield
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 605, in run
testMethod()
File "/home/wds/codes/pytorch-seq2seq/tests/test_topkdecoder.py", line 31, in test_k_1
output, _, other = decoder()
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 156, in forward
function=function)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 96, in forward_step
embedded = self.embedding(input_var)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/sparse.py", line 108, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/functional.py", line 1076, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected object of type torch.LongTensor but found type torch.cuda.LongTensor for argument #3 'index'
run test_decoder_rnn.py
Launching unittests with arguments python -m unittest /home/wds/codes/pytorch-seq2seq/tests/test_decoder_rnn.py in /home/wds/codes/pytorch-seq2seq/tests
Error
Traceback (most recent call last):
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
yield
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 605, in run
testMethod()
File "/home/wds/codes/pytorch-seq2seq/tests/test_decoder_rnn.py", line 53, in test_dropout_WITH_NON_ZERO_PROB
output1, _, _ = rnn()
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 156, in forward
function=function)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 96, in forward_step
embedded = self.embedding(input_var)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/sparse.py", line 108, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/functional.py", line 1076, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected object of type torch.LongTensor but found type torch.cuda.LongTensor for argument #3 'index'
Error
Traceback (most recent call last):
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
yield
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 605, in run
testMethod()
File "/home/wds/codes/pytorch-seq2seq/tests/test_decoder_rnn.py", line 41, in test_dropout_WITH_PROB_ZERO
output1, _, _ = rnn()
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 156, in forward
function=function)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 96, in forward_step
embedded = self.embedding(input_var)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/sparse.py", line 108, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/functional.py", line 1076, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected object of type torch.LongTensor but found type torch.cuda.LongTensor for argument #3 'index'
Error
Traceback (most recent call last):
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
yield
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 605, in run
testMethod()
File "/home/wds/codes/pytorch-seq2seq/tests/test_decoder_rnn.py", line 30, in test_input_dropout_WITH_NON_ZERO_PROB
output1, _, _ = rnn()
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 156, in forward
function=function)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 96, in forward_step
embedded = self.embedding(input_var)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/sparse.py", line 108, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/functional.py", line 1076, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected object of type torch.LongTensor but found type torch.cuda.LongTensor for argument #3 'index'
Error
Traceback (most recent call last):
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
yield
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 605, in run
testMethod()
File "/home/wds/codes/pytorch-seq2seq/tests/test_decoder_rnn.py", line 18, in test_input_dropout_WITH_PROB_ZERO
output1, _, _ = rnn()
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 156, in forward
function=function)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 96, in forward_step
embedded = self.embedding(input_var)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/sparse.py", line 108, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/functional.py", line 1076, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected object of type torch.LongTensor but found type torch.cuda.LongTensor for argument #3 'index'
Ran 4 tests in 3.844s
FAILED (errors=4)
Process finished with exit code 1
The text was updated successfully, but these errors were encountered:
I have donwloaded the lastest version of seq2seq, but most of the testunit in tests package can't pass
for example run the test_topkdecoder.py
Error
Traceback (most recent call last):
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
yield
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 605, in run
testMethod()
File "/home/wds/codes/pytorch-seq2seq/tests/test_topkdecoder.py", line 31, in test_k_1
output, _, other = decoder()
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 156, in forward
function=function)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 96, in forward_step
embedded = self.embedding(input_var)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/sparse.py", line 108, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/functional.py", line 1076, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected object of type torch.LongTensor but found type torch.cuda.LongTensor for argument #3 'index'
run test_decoder_rnn.py
Launching unittests with arguments python -m unittest /home/wds/codes/pytorch-seq2seq/tests/test_decoder_rnn.py in /home/wds/codes/pytorch-seq2seq/tests
Error
Traceback (most recent call last):
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
yield
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 605, in run
testMethod()
File "/home/wds/codes/pytorch-seq2seq/tests/test_decoder_rnn.py", line 53, in test_dropout_WITH_NON_ZERO_PROB
output1, _, _ = rnn()
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 156, in forward
function=function)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 96, in forward_step
embedded = self.embedding(input_var)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/sparse.py", line 108, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/functional.py", line 1076, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected object of type torch.LongTensor but found type torch.cuda.LongTensor for argument #3 'index'
Error
Traceback (most recent call last):
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
yield
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 605, in run
testMethod()
File "/home/wds/codes/pytorch-seq2seq/tests/test_decoder_rnn.py", line 41, in test_dropout_WITH_PROB_ZERO
output1, _, _ = rnn()
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 156, in forward
function=function)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 96, in forward_step
embedded = self.embedding(input_var)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/sparse.py", line 108, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/functional.py", line 1076, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected object of type torch.LongTensor but found type torch.cuda.LongTensor for argument #3 'index'
Error
Traceback (most recent call last):
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
yield
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 605, in run
testMethod()
File "/home/wds/codes/pytorch-seq2seq/tests/test_decoder_rnn.py", line 30, in test_input_dropout_WITH_NON_ZERO_PROB
output1, _, _ = rnn()
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 156, in forward
function=function)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 96, in forward_step
embedded = self.embedding(input_var)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/sparse.py", line 108, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/functional.py", line 1076, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected object of type torch.LongTensor but found type torch.cuda.LongTensor for argument #3 'index'
Error
Traceback (most recent call last):
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
yield
File "/home/wds/.conda/envs/pytorch/lib/python3.6/unittest/case.py", line 605, in run
testMethod()
File "/home/wds/codes/pytorch-seq2seq/tests/test_decoder_rnn.py", line 18, in test_input_dropout_WITH_PROB_ZERO
output1, _, _ = rnn()
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 156, in forward
function=function)
File "/home/wds/codes/pytorch-seq2seq/seq2seq/models/DecoderRNN.py", line 96, in forward_step
embedded = self.embedding(input_var)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/sparse.py", line 108, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "/home/wds/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/functional.py", line 1076, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected object of type torch.LongTensor but found type torch.cuda.LongTensor for argument #3 'index'
Ran 4 tests in 3.844s
FAILED (errors=4)
Process finished with exit code 1
The text was updated successfully, but these errors were encountered: