apex库安装

基于 PyTorch 的混合精度训练加速神器-apex

  • cuda: 11.3
  • torch: 1.10.2

apex安装

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

Apex库出现报错'IndexError: tuple index out of range'的解决方法

if cached_x.grad_fn.next_functions[1][0].variable is not x:

修改为

if cached_x.grad_fn.next_functions[0][0].variable is not x:

然后重新安装apex

posted @ 2022-07-15 10:56  topbookcc  阅读(673)  评论(0编辑  收藏  举报
/* 鼠标点击求赞文字特效 */