【colab pytorch】FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy


目前colab的tensorflow版本是1.15.0,運行時會提醒你要更新為2.x版本的,使用以下命令進行更新:

!pip uninstall tensorflow

!pip install tensorflow==2.0.0-alpha0

再運行時就會報:

FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy

這是由於tensorflow版本和numpy版本不兼容導致:

我tensorflow版本是2.0.0,numpy版本是1.17.4

使用:

!pip show numpy可以查看numpy的版本

然后執行:

!pip install numpy==1.14.0

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM