【发布时间】:2021-03-04 08:41:40
【问题描述】:
我有一个使用 BertModel.from_pretrained('test_model') 保存的变形金刚模型
我已经使用 google colab 的 GPU 训练了这个模型
然后,我想用BertModel.from_pretrained('test_model/')打开它
但我的本地 PC 中没有 GPU。我明白了:
/home/seiji/.local/lib/python3.8/site-packages/torch/cuda/__init__.py:52: UserWarning: CUDA initialization: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx (Triggered internally at /pytorch/c10/cuda/CUDAFunctions.cpp:100.)
return torch._C._cuda_getDeviceCount() > 0
我该怎么办?我不知道如何使用 CPU 打开它。有可能吗?
【问题讨论】:
标签: python nlp huggingface-transformers