intel版本的教程!!我没有M1的所以没试
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