下载代码:pip install tensorflow==2.1.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
其中,对应的tensorflow版本由电脑本身CUDA决定。
电脑本身CUDA查看方法:NVIDIA控制面板→帮助→系统信息→组件
Tensorflow版本与GPU版本的对应关系:https://tensorflow.google.cn/install/source#gpu
CUDA与CUDNN下载安装教程:https://zhuanlan.zhihu.com/p/94220564
出现如下问题时:
.\bandwidthText.exe : 无法将“.\bandwidthText.exe”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写
,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ .\bandwidthText.exe
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (.\bandwidthText.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
.\加上程序名,就可运行了。
https://blog.csdn.net/qq_41683065/article/details/108702408
https://zhuanlan.zhihu.com/p/94220564
https://blog.csdn.net/weixin_38410551/article/details/103631977?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522160697952919724818036073%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=160697952919724818036073&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2alltop_click~default-1-103631977.pc_first_rank_v2_rank_v28&utm_term=RuntimeError:%20The%20Session%20graph%20is%20empty.%20%20Add%20operations%20to%20the%20graph%20before%20calling%20run().&spm=1018.2118.3001.4449