转自 https://blog.csdn.net/hang__xiu2016acm/article/details/78061699
报错:
tf.scalar_summary(l.op.name + ' (raw)', l)
AttributeError: 'module' object has no attribute 'scalar_summary'
解决:
tf.scalar_summary('images', images)改为:tf.summary.scalar('images', images)
tf.image_summary('images', images)改为:tf.summary.image('images', images)
类似的有:
tf.train.SummaryWriter改为:tf.summary.FileWriter
tf.merge_all_summaries()改为:summary_op = tf.summaries.merge_all()
tf.histogram_summary(var.op.name, var)改为: tf.summaries.histogram()
concated = tf.concat(1, [indices, sparse_labels])改为:concated = tf.concat([indices, sparse_labels], 1)
Tensorflow中废弃的API及替代
tf.mul tf.sub tf.neg 已经废弃
分别可用tf.multiply tf.subtract tf.negative替代