-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcifar10_independentStudent_0.001_plot.py
More file actions
48 lines (38 loc) · 2.41 KB
/
cifar10_independentStudent_0.001_plot.py
File metadata and controls
48 lines (38 loc) · 2.41 KB
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
42
43
44
45
46
47
48
import matplotlib.pyplot as plt
from readData import *
# cifar10
# teacher,0.01
teacher = save_data_to_list(read_data("cifar10_results/teacher"))
print("teacher: " + str(caculate_convergence_time(teacher)))
plt.plot(teacher, label="teacher")
#independent_student,0.001
path="cifar10_results/indepentStudent_lerning_rate_0.001/"
#independent_student_conv6_fc3
independent_student_conv6_fc3 = save_data_to_list(read_data(path+"independent_student_conv6_fc3_0.001"))
print("independent_student_conv6_fc3: " + str(caculate_convergence_time(independent_student_conv6_fc3)))
plt.plot(independent_student_conv6_fc3, label="independent_student_conv6_fc3")
#independent_student_conv5_fc2
independent_student_conv5_fc2 = save_data_to_list(read_data(path+"independent_student_conv5_fc2_0.001"))
print("independent_student_conv5_fc2: " + str(caculate_convergence_time(independent_student_conv5_fc2)))
plt.plot(independent_student_conv5_fc2, label="independent_student_conv5_fc2")
#independent_student_conv4_fc1
independent_student_conv4_fc1_new = save_data_to_list(read_data(path+"independent_student_conv4_fc1_0.001"))
print("independent_student_conv4_fc1_new: " + str(caculate_convergence_time(independent_student_conv4_fc1_new)))
plt.plot(independent_student_conv4_fc1_new, label="independent_student_conv4_fc1")
#independent_student_conv3_fc1
independent_student_conv3_fc1_new = save_data_to_list(read_data(path+"independent_student_conv3_fc1_0.001"))
print("independent_student_conv3_fc1_new: " + str(caculate_convergence_time(independent_student_conv3_fc1_new)))
plt.plot(independent_student_conv3_fc1_new, label="independent_student_conv3_fc1")
#independent_student_conv2_fc1
independent_student_conv2_fc1_new = save_data_to_list(read_data(path+"independent_student_conv2_fc1_0.001"))
print("independent_student_conv2_fc1_new: " + str(caculate_convergence_time(independent_student_conv2_fc1_new)))
plt.plot(independent_student_conv2_fc1_new, label="independent_student_conv2_fc1")
#independent_student_conv1_fc1
independent_student_conv1_fc1_new = save_data_to_list(read_data(path+"independent_student_conv1_fc1_0.001"))
print("independent_student_conv1_fc1_new: " + str(caculate_convergence_time(independent_student_conv1_fc1_new)))
plt.plot(independent_student_conv1_fc1_new, label="independent_student_conv1_fc1")
plt.title("Cifar10: Independent Student, Learning Rate 0.001")
plt.xlabel("epoch")
plt.ylabel("accuracy")
plt.legend().draggable()
plt.show()