实用程序,用于将数据保存到cvs,作为一个易于读取和使用的tensorboard替代品
dataSaver的Python项目详细描述
数据保存器
实用程序,用于将数据保存到cvs,以便于读取和使用tensorboard的替代品。
用法
fromdataSaverimportDataSaverdataSaver=DataSaver('./somedir/filename/')# creates a file in csv format, where the keys of the dictionary are the column names and the values of the first row are the values associated with each key dataSaver.add({'ephoch':10,,'iter':200,'learningRate':0.0001,,'loss':10324}# The first call fixes the columns and only the keys that where present the first time add was called will be addeddataSaver.add({'ephoch':10,,'bananass':10324,'iter':200,'learningRate':0.0001,,'loss':10324,'bananass':10324})# collect all data in an internal array dataSaver.cacheArraydataSaver.cache({....})# Save the data collected by cache to file and empty cachedataSaver.dumpCache()