tensorflow 训练cifar10报错

Posted youxiaogeo

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tensorflow 训练cifar10报错相关的知识,希望对你有一定的参考价值。

1、AttributeError: ‘module‘ object has noattribute ‘random_crop‘

解决方案:

将distorted_image= tf.image.random_crop(reshaped_image, [height, width])改为:

distorted_image = tf.random_crop(reshaped_image,[height, width,3])

2、AttributeError: ‘module’ object has no attribute’per_image_whitening’
‘per_image_whitening 改为:’per_image_standardization

3、‘module‘ object has no attribute ‘image_summary‘ ---->Please switch to tf.summary.image

4、AttributeError: ‘module‘ object has no attribute ‘histogram_summary‘

AttributeError: ‘module‘ object has no attribute ‘histogram_summary‘

>> histogram_summary 改为:tf.summary.histogram
5、AttributeError: ‘module‘ object has no attribute ‘scalar_summary‘
AttributeError: ‘module‘ object has no attribute ‘scalar_summary‘

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

6、AttributeError: ‘module‘ object has no attribute ‘mul‘

 

According to the tensorflow 1.0.0 release notes,

 

tf.mul, tf.sub and tf.neg are deprecated in favor of tf.multiply, tf.subtract and tf.negative.

 

7、raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (2, 128, 1) and () are incompatible
 
 
 

 

以上是关于tensorflow 训练cifar10报错的主要内容,如果未能解决你的问题,请参考以下文章

深度学习基于tensorflow的小型物体识别训练(数据集:CIFAR-10)

Tensorflow CIFAR10 教程:确定训练过程中的 epoch 数

Tensorflow之CIFAR-10介绍

TF Boys (TensorFlow Boys ) 养成记

Tensorflow 多gpu训练

如何在 Tensorflow 上测试自己的图像到 Cifar-10 教程?