MCPcopy Create free account
hub / github.com/Mattdl/ContinualPrototypeEvolution / stat_summarize

Function stat_summarize

main.py:502–514  ·  view source on GitHub ↗
(stat_files)

Source from the content-addressed store, hash-verified

500
501
502def stat_summarize(stat_files):
503 print("Taking avg of {} results: {}".format(len(stat_files), stat_files))
504 res = [torch.load(x) for x in stat_files]
505
506 # Acc
507 avg_acc = [x[6][0].unsqueeze(0) for x in res]
508 print("Avg accs={}".format(avg_acc))
509 avg_acc_t = torch.cat(avg_acc)
510 mean = avg_acc_t.mean() * 100
511 std = avg_acc_t.std() * 100
512 print("Avg acc = {:.3f}+-{:.3f}".format(mean, std))
513
514 return mean, std
515
516
517if __name__ == "__main__":

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected