我在Macbook(arm64,M1芯片)上使用Tensorflow 2.4.0,在我想检查M1芯片中的图形处理器是否可以被Tensorflow使用后,我得到了这个输出:
我的代码:
import tensorflow as tf
print(tf.test.gpu_device_name())
print(tf.config.list_physical_devices('GPU'))输出:
[]看起来我的GPU不可用。我应该如何使用我的图形处理器在M1上加速训练?
发布于 2021-07-25 02:19:16
从2021年7月起,苹果provide the following instructions将安装TensorFlow2.5和tensorflow-metal插件:
创建一个新的conda environment;
conda install -c apple tensorflow-deps
python -m pip install tensorflow-metal.;然后
python -m pip install tensorflow-metal.这将使您能够访问Tensorflow中的M1图形处理器。
发布于 2021-01-17 13:50:10
您可能需要安装用于macOS 11.0+的these Tensorflow addons。
https://stackoverflow.com/questions/65757008
复制相似问题