-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
42 lines (38 loc) · 1.42 KB
/
main.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
30
31
32
33
34
35
36
37
38
39
40
41
from generator import generator
from sort_data import sort_data, output_result
if __name__ == '__main__':
model_path = "model/mnist_lenet5.h5"
save_path = "result_of_kill_number/"
generator(0, 0.05)
sort_data(model_path, "save_mutation_GF_0.05", save_path+"lenet5-gf-0.05.npz")
print("ratio=0.05, GF")
output_result(save_path+"lenet5-gf-0.05.npz")
# print()
# generator(0, 0.03)
# sort_data(model_path, "save_mutation_GF_0.03", save_path + "lenet5-gf-0.03.npz")
# print("ratio=0.03, GF")
# output_result(save_path + "lenet5-gf-0.03.npz")
#
# print()
# generator(0, 0.01)
# sort_data(model_path, "save_mutation_GF_0.01", save_path + "lenet5-gf-0.01.npz")
# print("ratio=0.01, GF")
# output_result(save_path + "lenet5-gf-0.01.npz")
#
# print()
# generator(1, 0.05)
# sort_data(model_path, "save_mutation_WS_0.05", save_path + "lenet5-ws-0.05.npz")
# print("ratio=0.05, WS")
# output_result(save_path + "lenet5-ws-0.05.npz")
#
# print()
# generator(1, 0.03)
# sort_data(model_path, "save_mutation_WS_0.03", save_path + "lenet5-ws-0.03.npz")
# print("ratio=0.03, WS")
# output_result(save_path + "lenet5-ws-0.03.npz")
#
# print()
# generator(1, 0.01)
# sort_data(model_path, "save_mutation_WS_0.01", save_path + "lenet5-ws-0.01.npz")
# print("ratio=0.01, WS")
# output_result(save_path + "lenet5-ws-0.01.npz")