如何用tensorflow解决问题看看是否使用gpu?

问题描述 投票:0回答:1

我不知道哪些版本与带有grpcio的tensorflow和tensorflow-gpu ver 2.4.1兼容...我该怎么办?

Collecting grpcio
  Using cached grpcio-1.60.1-cp38-cp38-win_amd64.whl (3.7 MB)
Installing collected packages: grpcio
  Attempting uninstall: grpcio
    Found existing installation: grpcio 1.32.0
    Uninstalling grpcio-1.32.0:
      Successfully uninstalled grpcio-1.32.0
Successfully installed grpcio-1.60.1
ERROR: tensorflow 2.4.1 has requirement grpcio~=1.32.0, but you'll have grpcio 1.60.1 which is incompatible.
ERROR: tensorflow-gpu 2.4.1 has requirement grpcio~=1.32.0, but you'll have grpcio 1.60.1 which is incompatible.
python tensorflow deep-learning
1个回答
0
投票

你可以试试这个:

conda install cudnn

然后,测试tensorflow是否识别您的GPU:

import tensorflow as tf

tf.config.list_physical_devices()

© www.soinside.com 2019 - 2024. All rights reserved.