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
Traceback (most recent call last):
File "/MWPToolkit/run_mwptoolkit.py", line 26, in
run_toolkit(args.model, args.dataset, args.task_type, config_dict)
File "/MWPToolkit/mwptoolkit/quick_start.py", line 215, in run_toolkit
train_with_train_valid_test_split(config)
File "/MWPToolkit/mwptoolkit/quick_start.py", line 103, in train_with_train_valid_test_split
trainer.fit()
File "/MWPToolkit/mwptoolkit/trainer/supervised_trainer.py", line 217, in fit
valid_equ_ac, valid_val_ac, valid_total, valid_time_cost = self.evaluate(DatasetType.Valid)
File "/MWPToolkit/mwptoolkit/trainer/supervised_trainer.py", line 271, in evaluate
batch_val_ac, batch_equ_ac = self._eval_batch(batch)
File "/MWPToolkit/mwptoolkit/trainer/supervised_trainer.py", line 148, in _eval_batch
test_out, target = self.model.model_test(batch)
File "/MWPToolkit/mwptoolkit/model/Seq2Seq/transformer.py", line 154, in model_test
_, symbol_outputs, _ = self.forward(src)
File "/MWPToolkit/mwptoolkit/model/Seq2Seq/transformer.py", line 100, in forward
source_embeddings = self.in_embedder(src).to(self.device) + self.pos_embedder(src).to(self.device)
File "/root/anaconda3/envs/toolkit/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/MWPToolkit/mwptoolkit/module/Embedder/basic_embedder.py", line 32, in forward
embedding_output = self.embedder(input_seq)
File "/root/anaconda3/envs/toolkit/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/root/anaconda3/envs/toolkit/lib/python3.10/site-packages/torch/nn/modules/sparse.py", line 158, in forward
return F.embedding(
File "/root/anaconda3/envs/toolkit/lib/python3.10/site-packages/torch/nn/functional.py", line 2199, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper__index_select)
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last):
File "/MWPToolkit/run_mwptoolkit.py", line 26, in
run_toolkit(args.model, args.dataset, args.task_type, config_dict)
File "/MWPToolkit/mwptoolkit/quick_start.py", line 215, in run_toolkit
train_with_train_valid_test_split(config)
File "/MWPToolkit/mwptoolkit/quick_start.py", line 103, in train_with_train_valid_test_split
trainer.fit()
File "/MWPToolkit/mwptoolkit/trainer/supervised_trainer.py", line 217, in fit
valid_equ_ac, valid_val_ac, valid_total, valid_time_cost = self.evaluate(DatasetType.Valid)
File "/MWPToolkit/mwptoolkit/trainer/supervised_trainer.py", line 271, in evaluate
batch_val_ac, batch_equ_ac = self._eval_batch(batch)
File "/MWPToolkit/mwptoolkit/trainer/supervised_trainer.py", line 148, in _eval_batch
test_out, target = self.model.model_test(batch)
File "/MWPToolkit/mwptoolkit/model/Seq2Seq/transformer.py", line 154, in model_test
_, symbol_outputs, _ = self.forward(src)
File "/MWPToolkit/mwptoolkit/model/Seq2Seq/transformer.py", line 100, in forward
source_embeddings = self.in_embedder(src).to(self.device) + self.pos_embedder(src).to(self.device)
File "/root/anaconda3/envs/toolkit/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/MWPToolkit/mwptoolkit/module/Embedder/basic_embedder.py", line 32, in forward
embedding_output = self.embedder(input_seq)
File "/root/anaconda3/envs/toolkit/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/root/anaconda3/envs/toolkit/lib/python3.10/site-packages/torch/nn/modules/sparse.py", line 158, in forward
return F.embedding(
File "/root/anaconda3/envs/toolkit/lib/python3.10/site-packages/torch/nn/functional.py", line 2199, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper__index_select)
The text was updated successfully, but these errors were encountered: