CNN_Nested_NER icon indicating copy to clipboard operation
CNN_Nested_NER copied to clipboard

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

Open antheaxiang opened this issue 2 years ago • 1 comments

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'.

antheaxiang avatar Mar 08 '23 12:03 antheaxiang

fp16 set to False

yhcc avatar Mar 08 '23 12:03 yhcc