提交 654b535a 编写于 作者: B baiyfbupt

fix ce

上级 239247da
...@@ -7,12 +7,12 @@ from kpi import CostKpi, DurationKpi, AccKpi ...@@ -7,12 +7,12 @@ from kpi import CostKpi, DurationKpi, AccKpi
#### NOTE kpi.py should shared in models in some way!!!! #### NOTE kpi.py should shared in models in some way!!!!
train_cost_kpi = CostKpi('train_cost', 0.2, 0, actived=True) train_cost_kpi = CostKpi('train_cost', 0.02, 0, actived=True)
test_acc_kpi = AccKpi('test_acc', 0.01, 0, actived=True) test_acc_kpi = AccKpi('test_acc', 0.01, 0, actived=True)
train_speed_kpi = AccKpi('train_speed', 1, 0, actived=True) train_speed_kpi = AccKpi('train_speed', 0.1, 0, actived=True)
train_cost_card4_kpi = CostKpi('train_cost_card4', 0.2, 0, actived=True) train_cost_card4_kpi = CostKpi('train_cost_card4', 0.02, 0, actived=True)
test_acc_card4_kpi = AccKpi('test_acc_card4', 0.01, 0, actived=True) test_acc_card4_kpi = AccKpi('test_acc_card4', 0.01, 0, actived=True)
train_speed_card4_kpi = AccKpi('train_speed_card4', 1, 0, actived=True) train_speed_card4_kpi = AccKpi('train_speed_card4', 0.1, 0, actived=True)
tracking_kpis = [ tracking_kpis = [
train_cost_kpi, train_cost_kpi,
......
...@@ -233,14 +233,14 @@ def train(args, ...@@ -233,14 +233,14 @@ def train(args,
if devices_num == 1: if devices_num == 1:
print("kpis train_cost %s" % train_avg_loss) print("kpis train_cost %s" % train_avg_loss)
print("kpis test_acc %s" % mean_map) print("kpis test_acc %s" % mean_map)
print("kpis train_speed %s" % (total_time / epocs)) print("kpis train_speed %s" % (epocs / total_time))
else: else:
print("kpis train_cost_card%s %s" % print("kpis train_cost_card%s %s" %
(devices_num, train_avg_loss)) (devices_num, train_avg_loss))
print("kpis test_acc_card%s %s" % print("kpis test_acc_card%s %s" %
(devices_num, mean_map)) (devices_num, mean_map))
print("kpis train_speed_card%s %f" % print("kpis train_speed_card%s %f" %
(devices_num, total_time / test_epocs)) (devices_num, test_epocs / total_time))
if pass_id % 10 == 0 or pass_id == num_passes - 1: if pass_id % 10 == 0 or pass_id == num_passes - 1:
save_model(str(pass_id), train_prog) save_model(str(pass_id), train_prog)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册