首页 > 编程知识 正文

macos tensorflow gpu,mac tensorflow gpu

时间:2023-05-05 21:05:05 阅读:275746 作者:3931

intel版本的教程!!我没有M1的所以没试

官方教程链接https://developer.apple.com/metal/tensorflow-plugin/

1.安装虚拟环境

在这里我使用conda,也可以用其他的

conda create -n tf-metal-2.6 python=3.8 2.激活虚拟环境 conda activate tf-metal-2.6 3.安装tensorflow-macos和tensorflow-metal  pip install tensorflow-macos tensorflow-metal

如果你是macOS12,可能识别不到你的型号,报错not a supported wheel on this platform

前面加上SYSTEM_VERSION_COMPAT=0 

SYSTEM_VERSION_COMPAT=0 pip install tensorflow-macos tensorflow-metal 至此,大功告成!!

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。