需要注意self.session.run输出的格式,如下代码会报错
precise_summary = self.session.run([ts.precise_summary],
{ts.x: xs, ts.y: ys})
writer.add_summary(precise_summary, epoch)
AttributeError: 'list' object has no attribute 'value'
如下代码运行正常
precise_summary = self.session.run(ts.precise_summary,
{ts.x: xs, ts.y: ys})
writer.add_summary(precise_summary, epoch)