读取并导出Tensorboard中数据

Tensorboard 方便而美丽,但是可远观不可亵玩有点不爽,还是数据落在自己手里比较踏实

参考:https://blog.csdn.net/nima1994/article/details/82844988#commentBox

可以方便地读取Tensorboard数据

上代码

from tensorboard.backend.event_processing import event_accumulator

#加载日志数据
ea=event_accumulator.EventAccumulator('events.out.tfevents.1550994567.vvd-Inspiron-7557') 
ea.Reload()
print(ea.scalars.Keys())

val_psnr=ea.scalars.Items('val_psnr')
print(len(val_psnr))
print([(i.step,i.value) for i in val_psnr])

输出:

['val_loss', 'val_psnr', 'loss', 'psnr', 'lr']
29
[(0, 33.70820617675781), (1, 34.52505874633789), (2, 34.26629638671875), (3, 35.47195053100586), (4, 35.45940017700195), (5, 35.336708068847656), (6, 35.467647552490234), (7, 35.919857025146484), (8, 35.29727554321289), (9, 35.63655471801758), (10, 36.219871520996094), (11, 36.178646087646484), (12, 35.93777847290039), (13, 35.587406158447266), (14, 36.198944091796875), (15, 36.241966247558594), (16, 36.379913330078125), (17, 36.28306198120117), (18, 36.03053665161133), (19, 36.20806121826172), (20, 36.21710968017578), (21, 36.42262268066406), (22, 36.00306701660156), (23, 36.4374885559082), (24, 36.163787841796875), (25, 36.53673553466797), (26, 35.99557113647461), (27, 36.96220016479492), (28, 36.63676452636719)]

 

你可能感兴趣的:(深度学习,Python,TensorFlow)