-
Notifications
You must be signed in to change notification settings - Fork 2
/
check_log_diff.py
29 lines (26 loc) · 1.11 KB
/
check_log_diff.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import numpy as np
from reprod_log import ReprodDiffHelper
if __name__ == "__main__":
diff_helper = ReprodDiffHelper()
#
# info1 = diff_helper.load_info("./diff/forward_paddle.npy")
# info2 = diff_helper.load_info("./diff/forward_pytorch.npy")
# path = "./diff/forward_diff.log"
# info1 = diff_helper.load_info("./diff/loss_paddle.npy")
# info2 = diff_helper.load_info("./diff/loss_pytorch.npy")
# path = "./diff/loss_diff.log"
# #
# info1 = diff_helper.load_info("./diff/bp_align_paddle.npy")
# info2 = diff_helper.load_info("./diff/bp_align_pytorch.npy")
# path = "./diff/bp_align_diff.log"
# #
info1 = diff_helper.load_info("./diff/metric_paddle.npy")
info2 = diff_helper.load_info("./diff/metric_pytorch.npy")
path = "./diff/metric_diff.log"
#
# info1 = diff_helper.load_info("./diff/train_align_paddle.npy")
# info2 = diff_helper.load_info("./diff/train_align_pytorch.npy")
# path = "./diff/train_align_diff.log"
diff_helper.compare_info(info1, info2)
diff_helper.report(
diff_method="mean", diff_threshold=1e-1, path=path)