1、AttributeError: ‘module’ object has noattribute ‘random_crop’
tf.scalar_summary(loss.op.name,loss)
改为tf.summary.scalar(loss.op.name, loss)即可
2、AttributeError: ‘module’ object has no attribute’per_image_whitening’
float_image = tf.image.per_image_whitening(distorted_image)=float_image = tf.image.per_image_standardization(distorted_image)
3、AttributeError: module ‘tensorflow’ has no attribute ‘image_summary’
tf.image_aummary(‘images’, images)=tf.summary.image(‘images’, images)
4、AttributeError: module ‘tensorflow’ has no attribute ‘histogram_summary’
tf.summary.histogram(tensor_name + ‘/activa