Skip to content
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

没有独立显卡的mac电脑,怎么运行代码呀,改成cpu了还一直报错 #6

Open
antheaxiang opened this issue Mar 8, 2023 · 1 comment

Comments

@antheaxiang
Copy link

Traceback (most recent call last):
File "/Users/ekko/begin/CNN_Nested_NER-master/train.py", line 204, in
progress_bar='rich')
File "/Users/ekko/begin/CNN_Nested_NER-master/fastNLP_10/core/controllers/trainer.py", line 492, in init
**kwargs
File "/Users/ekko/begin/CNN_Nested_NER-master/fastNLP_10/core/drivers/choose_driver.py", line 37, in choose_driver
return initialize_torch_driver(driver, device, model, **kwargs)
File "/Users/ekko/begin/CNN_Nested_NER-master/fastNLP_10/core/drivers/torch_driver/initialize_torch_driver.py", line 86, in initialize_torch_driver
return TorchSingleDriver(model, device, **kwargs)
File "/Users/ekko/begin/CNN_Nested_NER-master/fastNLP_10/core/drivers/torch_driver/single_device.py", line 60, in init
super(TorchSingleDriver, self).init(model, fp16=fp16, torch_kwargs=torch_kwargs, **kwargs)
File "/Users/ekko/begin/CNN_Nested_NER-master/fastNLP_10/core/drivers/torch_driver/torch_driver.py", line 62, in init
self.auto_cast, _grad_scaler = _build_fp16_env(dummy=not self.fp16)
File "/Users/ekko/begin/CNN_Nested_NER-master/fastNLP_10/core/drivers/torch_driver/utils.py", line 174, in _build_fp16_env
raise RuntimeError("Pytorch is not installed in gpu version, please use device='cpu'.")
RuntimeError: Pytorch is not installed in gpu version, please use device='cpu'.

@yhcc
Copy link
Owner

yhcc commented Mar 8, 2023

fp16 set to False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants