tensorflow-cifar10示例报错

1:ArgumentError: argument --train_dir: conflicting option string: --train_dir

解决方法,从新开一个console

2:ArgumentError: argument --batch_size: conflicting option string: --batch_size

因为Cifar10.py 有一段代码:

tf.app.flags.DEFINE_integer('batch_size', 128,
                            """Number of images to process in a batch.""")

tf.app.flags.FLAGS中定义了batch_size

当第二遍运行cifar10.py的时候,tensorflow检测到已经存在这个参数所以报错

解决方法,从新开一个console

3:NO Modles named ’tensorflow.models.image.cifar10‘

解决方法:

这些导入的模块如果安装的tensorflow里没有自带

到https://tensorflow.googlesource.com/tensorflow/+/master/tensorflow下载(这个地址已经偏老了)

还是到github上下载比较好:https://github.com/tensorflow/tensorflow/tree/master/tensorflow

然后放到...\Anaconda\Lib\site-packages\tensorflow下

4:AttributeError: module 'tensorflow' has no attribute 'histogram_summary'

tensorflow1.0以后把summary独立出来了,xxx_summary大多数放在了tf.summary.xxx中,可以通过tf.summary.summary.

来查看,但是写的时候只写一个summary就行,比如:tf.summary.histogram

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值