tensorflow配置

1、镜像源

镜像源设置

conda config --add channels 	
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --add channels 
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels 
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
conda config --add channels 	
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
conda config --add channels 		
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
conda config --add channels
conda config --set show_channel_urls yes

其他相关命令

	conda config --remove channels
	conda config --show

2、python环境

创建基于python3.6版本的环境

      conda create -n tf-cpu python=3.6
      conda create -n tf-gpu python=3.6

激活刚刚创建的环境

       conda activate tf-cpu 
       conda activate tf-gpu

3、关于环境的相关指令

	conda env remove tfgpu
	conda remove -n 环境名  --all
	conda install numpy//矩阵运行库
 删除你的环境 
	conda env remove tfgpu
查看安装的环境
	conda env list//

4、安装tensorflow

由于tensorflow1.6支持python3.6版本,但是需要升级python中的pip版本:

         python -m pip install --upgrade pip

下面开始直接进行安装tensorflow:

       cpu版本: 
		conda install tensorflow 
		 pip install tensorflow


       gpu版本:
		conda install tensorflow-gpu=1.14

		pip install  -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==1.14

5、测试

python
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

6、其他相关问题解决办法

驱动官网
	https://www.geforce.cn/drivers
	tensorflow 安装过程(转载)
	https://blog.csdn.net/qq_26917649/article/details/79657030

windows下CUDA的卸载以及安装
	https://blog.csdn.net/m0_37605642/article/details/99100924

Anaconda An HTTP error occurred when trying to retrieve this URL.HTTP errors are often intermittent,
在学习TensorFlow时,需要下载tensorflow-gpu 第三方库,始终卡在了cudatoolkit
	https://blog.csdn.net/u013985879/article/details/82818822

YOLOv3目标检测有了TensorFlow实现,可用自己的数据来训练
	https://mp.weixin.qq.com/s/cq7g1-4oFTftLbmKcpi_aQ?client=tim&ADUIN=1990521580&ADSESSION=1587038662&ADTAG=CLIENT.QQ.5603_.0&ADPUBNO=26933

Python安装tensorflow执行时出现问题
	https://www.cnblogs.com/ziyu-trip/p/12663978.html?tdsourcetag=s_pctim_aiomsg


https://blog.csdn.net/qq_41627235/article/details/87692748?depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-4&utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-4

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn opencv-python

依赖包安装

	pip install 
	pip install numpy==1.16.0
	pip install Pillow
	pip install scipy==1.1.0
	pip install tensorflow-gpu==1.12.0
	pip install wget
	pip install seaborn
	pip install mayavi


	pip install numpy==1.15.1
	pip install Pillow==5.3.0
	pip install scipy==1.1.0
	pip install tensorflow-gpu==1.11.0
	pip install wget==3.2
	pip install seaborn==0.9.0
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值