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)
上一篇:在Pytorch中显示网络每层的输出特征图大小、参数、显存占用、参数量的工具---pytorch-summary


下一篇:tensorboard使用(tensorboard 显示No histogram data was found.)