五、在jupyter中找到results文件夹,然后可以把跑的.h5结果转换为csv文件
pip install tables
import h5py
import numpy as np
import pandas as pd
filename = 'Mnist_FEDL_0.003_0_10u_20b_5_avg.h5'
f = h5py.File(filename, 'r')
# List all groups
print("Keys: %s" % f.keys())
a_group_key = list(f.keys())[0]
# Get the data
data = list(f[a_group_key])
pd.DataFrame(data).to_csv("hi0.csv")
a_group_key = list(f.keys())[0]
pd.DataFrame(data).to_csv("hi0.csv")
a_group_key = list(f.keys())[1]
pd.DataFrame(data).to_csv("hi1.csv")
a_group_key = list(f.keys())[2]
pd.DataFrame(data).to_csv("hi2.csv")
分别能得到全局准确率,训练准确率,训练损失