尝试CPU加载fine tune后模型预测时报Cannot use GPU错误
Created by: vForce825
环境: paddlepaddle-gpu 1.7.2.post107
相关代码: with D.guard(): ernie = ErnieModelForSequenceClassification.from_pretrained('./pretrained_model/ernie-1.0', num_labels=len(id2class)) ernie.load_dict(D.load_dygraph("./models/classification_ernie", keep_name_table=True))
报错内容: W0831 10:48:07.792364 37899 init.cc:127] Compiled with WITH_GPU, but no GPU found in runtime. 2020-08-31 10:48:07,817-INFO: pretrain dir ./pretrained_model/ernie-1.0 not in {'ernie-1.0': 'https://ernie-github.cdn.bcebos.com/model-ernie1.0.1.tar.gz', 'ernie-2.0-en': 'https://ernie-github.cdn.bcebos.com/model-ernie2.0-en.1.tar.gz', 'ernie-2.0-large-en': 'https://ernie-github.cdn.bcebos.com/model-ernie2.0-large-en.1.tar.gz', 'ernie-tiny': 'https://ernie-github.cdn.bcebos.com/model-ernie_tiny.1.tar.gz', 'ernie-gen-base-en': 'https://ernie-github.cdn.bcebos.com/model-ernie-gen-base-en.1.tar.gz', 'ernie-gen-large-en': 'https://ernie-github.cdn.bcebos.com/model-ernie-gen-large-en.1.tar.gz'}, read from local E0831 10:48:07.834282 37899 pybind.cc:1223] Cannot use GPU because there is no GPU detected on your machine.