python tensorflow 安装

我是先下载tensorflow-1.5.0rc1-cp36-cp36m-win32.whl,再执行命令行安装的

下载地址:https://pypi.python.org/pypi/tensorflow/1.5.0rc1

1
pip install tensorflow - 1.5 . 0rc1 - cp36 - cp36m - win32.whl

pip安装报错:is not a supported wheel on this platform

https://www.cnblogs.com/nice-forever/p/5371906.html

缺少模块

numpy

cv2

注:需要在管理员模式运行

TensorFlow不同版本引起的错误:

前4个是 V0.11 的API 用在 V1.0 的错误

1. AttributeError: 'module' object has no attribute 'merge_all_summaries'

>> tf.merge_all_summaries() 改为:summary_op = tf.summary.merge_all()

2. AttributeError: 'module' object has no attribute 'SummaryWriter'

>> tf.train.SummaryWriter 改为:tf.summary.FileWriter

3. AttributeError: 'module' object has no attribute 'scalar_summary'

>> tf.scalar_summary 改为:tf.summary.scalar

4. AttributeError: 'module' object has no attribute 'histogram_summary'

>> histogram_summary 改为:tf.summary.histogram
 
下边这个是 V1.0 的API 用在 V0.11 的错误
File "dis-alexnet_benchmark.py", line 110, in alexnet_v2
    biases_initializer=tf.zeros_initializer(),
TypeError: zeros_initializer() takes at least 1 argument (0 given)
>> 将 biases_initializer=tf.zeros_initializer() 改为:biases_initializer=tf.zeros_initializer
 
 

干货 win10安装TensorFlow填坑笔记:http://blog.csdn.net/chewinggum/article/details/70373098

【TensorFlow】Windows10 64 位下安装 TensorFlow - 官方原生支持:http://blog.csdn.net/u010099080/article/details/53418159

Windows下安装tensorflow步骤:http://blog.csdn.net/chongtong/article/details/53905625?locationNum=6&fps=1

TensorFlow 安装教程:http://blog.csdn.net/bitcarmanlee/article/details/52749488

学习

猜你喜欢

转载自www.cnblogs.com/shuimuqingyang/p/9903942.html