ImportError: Please install apex to use fp16 training,apex安装失败

2022-11-01 09:19:36

今天尝试运行bert,运行报错:

You will also need to installNVIDIA Apex.

需要安装apex,按照要求安装:

git clone https://github.com/NVIDIA/apex
cd apex
pip install-v--no-cache-dir--global-option="--cpp_ext"--global-option="--cuda_ext"./

但是安装失败。

解决:

git clone https://github.com/NVIDIA/apex
cd apex
pip install./# 直接安装即可,不需要哪些参数
  • 作者:MrCharles
  • 原文链接:https://firstai.blog.csdn.net/article/details/112689347
    更新时间:2022-11-01 09:19:36