我已经成功安装了 tensorflow pip install tensorflow
并且一切都按预期进行。
我也可以使用 pip install tensorflow-gpu
成功安装 tensorflow-gpu但我无法在我的 python 脚本中导入它:
import tensorflow-gpu
File "<stdin>", line 1
import tensorflow-gpu
^
SyntaxError: invalid syntax
我已经安装了 CUDA v9.0 并运行了 Windows 10
最佳答案
pypi 上的包称为 tensorflow-gpu 但您只需使用“tensorflow”导入它
import tensorflow as tf
关于python - 我无法导入 tensorflow-gpu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53801766/