-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about CPU or GPU error #9
Comments
I haven't met this problem before. The recent version of pytorch adopt two different ways for different backends: You can debug based on your pytorch version and the backend used (torch.backends.cudnn.enabled). |
what is your pytorch version?Thanks |
1.10.0 and 1.10.1 works for me. |
My pytorch is also 1.10.0,What is your ctcdecode version? |
The version has been presented in Readme, it seems like you did not install ctcdecoder successfully. |
I ran your code and found the following error, where are the parameters put into the GPU?
Traceback (most recent call last):
File "main.py", line 218, in
processor.start()
File "main.py", line 46, in start
seq_train(self.data_loader['train'], self.model, self.optimizer,self.device, epoch, self.recoder)
File "/home/quchunguang/sunday/CSLR/seq_scripts.py", line 24, in seq_train
loss = model.criterion_calculation(ret_dict, label, label_lgt)
File "/home/quchunguang/sunday/CSLR/slr_network.py", line 96, in criterion_calculation
label_lgt.cpu().int()).mean()
File "/home/quchunguang/anaconda3/envs/tf/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/quchunguang/anaconda3/envs/tf/lib/python3.6/site-packages/torch/nn/modules/loss.py", line 1295, in forward
self.zero_infinity)
File "/home/quchunguang/anaconda3/envs/tf/lib/python3.6/site-packages/torch/nn/functional.py", line 1767, in ctc_loss
zero_infinity)
RuntimeError: Tensor for argument #2 'targets' is on CPU, but expected it to be on GPU (while checking arguments for ctc_loss_gpu)
The text was updated successfully, but these errors were encountered: