We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Python 3.8.10 ark-nlp 0.0.6
设置cpu无法生效
model = Task(dl_module, optimizer, 'lsce', device='cpu')
The text was updated successfully, but these errors were encountered:
将'ark_nlp.factory.task.base._task.Task'中的初始化方法
if device is None: if torch.cuda.is_available(): if cuda_device == -1: self.device = torch.device("cuda") else: self.device = torch.device(f"cuda:{cuda_device}") else: self.device = "cpu"
改为
self.device = device if self.device is None: if torch.cuda.is_available(): if cuda_device == -1: self.device = torch.device("cuda") else: self.device = torch.device(f"cuda:{cuda_device}") else: self.device = "cpu"
Sorry, something went wrong.
fix(task): 修复环境为GPU时,无法使用CPU的问题
70d5d4d
Closes #29
Successfully merging a pull request may close this issue.
Environment info
### Information
设置cpu无法生效
model = Task(dl_module, optimizer, 'lsce', device='cpu')
The text was updated successfully, but these errors were encountered: