AttributeError: ‘module’ object has no attribute ‘scalar_summary’
AttributeError: module ‘tensorflow’ has no attribute ‘image_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.summary.merge_all
tf.histogram_summary(var.op.name, var)改为: tf.summary.histogram
concated = tf.concat(1, [indices, sparse_labels])改为:concated = tf.concat([indices, sparse_labels], 1)
原文链接:https://blog.youkuaiyun.com/ztf312/article/details/72853691

本文详细介绍了在更新TensorFlow版本后,原有日志汇总函数如scalar_summary、image_summary等的变更情况及替代用法,帮助读者快速适配新版TensorFlow,实现模型训练过程的可视化监控。
3638

被折叠的 条评论
为什么被折叠?



