安装 pytorch-lightning 的坑

安装pytorch-lightning的坑

  1. 不能直接使用pip install pytorch-lightning ,这样会直接替换掉原来torch的版本。
    torch安装方式一定要与pytorch-lightning安装方式一致。
    应该:pip install pytorch-lightning==版本名

  2. 使用pip install pytorch-lightning == 1.0.0 安装版本过低会导致错误:TypeError: init() got an unexpected keyword argument ‘任意值’

解决方案:pip install pytorch-lightning==1.2.0

你可能感兴趣的:(pytorch,pytorch,python,bug)