TENSORFLOW1.0运行之前版本代码报错解决

1报错位置:.tf.scalar_summary('batch_loss', loss)AttributeError: 'module' object has no attribute 'scalar_summary'修改为:tf.summary.scalar('batch_loss', loss)原因:新版本做了调整

2.AttributeError: 'module' object has no attribute 'histogram_summary'修改为:tf.summary.histogram

3.tf.merge_all_summaries()改为:summary_op = tf.summaries.merge_all()

4.AttributeError: 'module' object has no attribute 'SummaryWriter':tf.train.SummaryWriter改为tf.summary.FileWriter

阅读更多
换一批

没有更多推荐了,返回首页