其他分享
首页 > 其他分享> > AttributeError: 'list' object has no attribute 'value'

AttributeError: 'list' object has no attribute 'value'

作者:互联网

需要注意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)

标签:precise,run,no,attribute,self,object,ts,summary,session
来源: https://www.cnblogs.com/LexiCalibur/p/13202494.html