win10+vs2015+cuda10.0+cudnn7.6+anaconda3(python3.7)+tensorflow_gpu1.13.1+pycharm(我的电脑配置:i79700k+1070

win10+vs2015+cuda10.0+cudnn7.6+anaconda3(python3.7)+tensorflow_gpu1.13.1+pycharm(我的电脑配置:i79700k+1070Ti)
提醒:安装之前先查看自己显卡对应的版本,一般安装过程都大同小异!!!!
(1)下载cuda10.0 cuda10.0下载地址
(2)下载cudnn7.6 cudnn下载地址
(3)下载Git,后面能用到 Git下载地址
(4)下载anaconda3 地址
2.安装
(1)vs2015
(2)cuda+cudnn安装 这儿给出别人弄的,这两个安装比较简单,但是记得把cudnn路径添加到系统变量里面
(3)Git安装按照默认步骤来就行,但是要在系统变量下添加路径,我的是:C:\Program Files\Git\bin
(4)anaconda3安装按照默认路径来,以免出现错误,网上有安装教程,自己找
(5)tensorflow_gpu1.13.1安装:
打开开始菜单中 adaconda3文件夹下Anaconda Prompt 程序,输入:

conda create -n tensorflow-gpu python=3.7

输入y回车,接着输入:

conda activate tensorflow-gpu
pip install tensorflow-gpu==1.13.1

如果出现pip版本老旧,更新pip然后再重新安装tensorflow-gpu,同上

python -m pip install –upgrade pip

按照以上步骤安装应该是可以成功的,本人中间没有出现错误,测试是否安装成功,代码如下
在这里插入图片描述
要在该状态下输入python (如果没有先win键+R,输入cmd,再输入activate tensorflow_gpu)

import tensorflow as tf

tf.enable_eager_execution()
print(tf.__version__)
hello = tf.constant("hello tensorflow")
print(hello.numpy())

至此,tensorflow-gpu安装成功
(6)安装imgaug

conda install -c  conda-forge shapely
pip install imgaug

(7)安装pycocotools
方法一:

pip install cython
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI

方法二

git clone https://github.com/pdollar/coco.git
cd coco/PythonAPI
# install pycocotools locally
python setup.py build_ext --inplace
 
# install pycocotools to the Python site-packages
python setup.py build_ext install

(第二种方法我没有成功)

方法三

pip install pycocotools -i https://pypi.tuna.tsinghua.edu.cn/simple

(8)pycharm安装,环境要添加tensorflow-gpu下的python.exe
参考博客:
https://www.gongyesheji.org/?p=951
https://blog.csdn.net/qq_31119155/article/details/83992500
https://blog.csdn.net/doudou_here/article/details/87855273
https://blog.csdn.net/li528405176/article/details/83154062
https://blog.csdn.net/Xiongchao99/article/details/79778046
https://blog.csdn.net/xiaomifanhxx/article/details/84325174
https://blog.csdn.net/qq_36810544/article/details/83582397

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
自编译tensorflow: 1.python3.5,tensorflow1.12; 2.支持cuda10.0,cudnn7.3.1,TensorRT-5.0.2.6-cuda10.0-cudnn7.3; 3.支持mkl,无MPI; 软硬件硬件环境:Ubuntu16.04,GeForce GTX 1080 配置信息: hp@dla:~/work/ts_compile/tensorflow$ ./configure WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown". You have bazel 0.19.1 installed. Please specify the location of python. [Default is /usr/bin/python]: /usr/bin/python3 Found possible Python library paths: /usr/local/lib/python3.5/dist-packages /usr/lib/python3/dist-packages Please input the desired Python library path to use. Default is [/usr/local/lib/python3.5/dist-packages] Do you wish to build TensorFlow with XLA JIT support? [Y/n]: XLA JIT support will be enabled for TensorFlow. Do you wish to build TensorFlow with OpenCL SYCL support? [y/N]: No OpenCL SYCL support will be enabled for TensorFlow. Do you wish to build TensorFlow with ROCm support? [y/N]: No ROCm support will be enabled for TensorFlow. Do you wish to build TensorFlow with CUDA support? [y/N]: y CUDA support will be enabled for TensorFlow. Please specify the CUDA SDK version you want to use. [Leave empty to default to CUDA 10.0]: Please specify the location where CUDA 10.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: /usr/local/cuda-10.0 Please specify the cuDNN version you want to use. [Leave empty to default to cuDNN 7]: 7.3.1 Please specify the location where cuDNN 7 library is installed. Refer to README.md for more details. [Default is /usr/local/cuda-10.0]: Do you wish to build TensorFlow with TensorRT support? [y/N]: y TensorRT support will be enabled for TensorFlow. Please specify the location where TensorRT is installed. [Default is /usr/lib/x86_64-linux-gnu]:/home/hp/bin/TensorRT-5.0.2.6-cuda10.0-cudnn7.3/targets/x86_64-linux-gnu Please specify the locally installed NCCL version you want to use. [Default is to use https://github.com/nvidia/nccl]: Please specify a list of comma-separated Cuda compute capabilities you want to build with. You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus. Please note that each additional compute capability significantly increases your build time and binary size. [Default is: 6.1,6.1,6.1]: Do you want to use clang as CUDA compiler? [y/N]: nvcc will be used as CUDA compiler. Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]: Do you wish to build TensorFlow with MPI support? [y/N]: No MPI support will be enabled for TensorFlow. Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native -Wno-sign-compare]: Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: Not configuring the WORKSPACE for Android builds. Preconfigured Bazel build configs. You can use any of the below by adding "--config=" to your build command. See .bazelrc for more details. --config=mkl # Build with MKL support. --config=monolithic # Config for mostly static monolithic build. --config=gdr # Build with GDR support. --config=verbs # Build with libverbs support. --config=ngraph # Build with Intel nGraph support. --config=dynamic_kernels # (Experimental) Build kernels into separate shared objects. Preconfigured Bazel build configs to DISABLE default on features: --config=noaws # Disable AWS S3 filesystem support. --config=nogcp # Disable GCP support. --config=nohdfs # Disable HDFS support. --config=noignite # Disable Apacha Ignite support. --config=nokafka # Disable Apache Kafka support. --config=nonccl # Disable NVIDIA NCCL support. Configuration finished 编译: hp@dla:~/work/ts_compile/tensorflow$ bazel build --config=opt --config=mkl --verbose_failures //tensorflow/tools/pip_package:build_pip_package 卸载已有tensorflow: hp@dla:~/temp$ sudo pip3 uninstall tensorflow 安装自己编译的成果: hp@dla:~/temp$ sudo pip3 install tensorflow-1.12.0-cp35-cp35m-linux_x86_64.whl
安装和配置Anaconda3PyCharmCUDA 10.1、cuDNN 7.6TensorFlow 2.2的步骤如下: 1. 首先,下载并安装Anaconda3。访问Anaconda官方网站,并下载适合您操作系统的安装程序。运行安装程序,按照提示进行安装。 2. 安装完成后,打开终端或命令提示符,并创建一个新的Anaconda环境。运行以下命令: ``` conda create -n env_name python=3.7 ``` 将"env_name"替换为您想要的环境名称。 3. 激活新创建的环境。运行以下命令: ``` conda activate env_name ``` 4. 下载并安装PyCharm。访问JetBrains官方网站,下载适合您操作系统的PyCharm安装程序。运行安装程序,按照提示进行安装。 5. 下载并安装CUDA 10.1。访问NVIDIA官方网站,下载与您的显卡和操作系统兼容的CUDA 10.1安装程序。运行安装程序,按照提示进行安装。 6. 下载并安装cuDNN 7.6。访问NVIDIA官方网站,并下载与您的CUDA版本和操作系统兼容的cuDNN 7.6库。将cuDNN文件解压缩到CUDA安装目录中。 7. 配置PyCharm以使用Anaconda环境。打开PyCharm并导航到"Settings" > "Project Interpreter"。单击右上角的设置图标,并选择"Add"。在打开的窗口中,选择"Conda Environment" > "Existing environment"。在"Interpreter"字段中,选择Anaconda环境的路径。 8. 在PyCharm安装TensorFlow 2.2。返回"Settings" > "Project Interpreter",并单击右下角的"+"按钮。在搜索栏中输入"tensorflow",并选择TensorFlow包。单击"Install"按钮,完成安装。 9. 现在,您已成功安装和配置Anaconda3PyCharmCUDA 10.1、cuDNN 7.6TensorFlow 2.2。您可以开始使用TensorFlow进行深度学习任务。 请注意,安装和配置步骤可能因操作系统和版本而异。建议在查找和安装这些软件时参考官方文档和教程。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值