limited versions!
parent
10dc129e18
commit
dbe3638c7a
|
@ -2,6 +2,18 @@
|
|||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/cmake-build-debug/_deps/freetype-src" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/cmake-build-debug/_deps/freetype-src/subprojects/dlg" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/cmake-build-debug/_deps/imgui-src" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/cmake-build-release/_deps/freetype-src" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/cmake-build-release/_deps/freetype-src/subprojects/dlg" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/cmake-build-release/_deps/imgui-src" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/cmake-build-relwithdebinfo-addrsan/_deps/freetype-src" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/cmake-build-relwithdebinfo-addrsan/_deps/freetype-src/subprojects/dlg" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/cmake-build-relwithdebinfo-addrsan/_deps/imgui-src" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/cmake-build-relwithdebinfo/_deps/freetype-src" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/cmake-build-relwithdebinfo/_deps/freetype-src/subprojects/dlg" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/cmake-build-relwithdebinfo/_deps/imgui-src" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/lib/blt-with-graphics" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/lib/blt-with-graphics/libraries/BLT" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/lib/blt-with-graphics/libraries/BLT/libraries/parallel-hashmap" vcs="Git" />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.25)
|
||||
project(COSC-4P80-Final-Project VERSION 0.0.23)
|
||||
project(COSC-4P80-Final-Project VERSION 0.0.24)
|
||||
|
||||
option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF)
|
||||
option(ENABLE_UBSAN "Enable the ub sanitizer" OFF)
|
||||
|
|
26
graph.py
26
graph.py
|
@ -2,7 +2,7 @@ import matplotlib.pyplot as plt
|
|||
import pandas as pd
|
||||
import sys
|
||||
|
||||
def plot_stacked_graph(title, output, csv_file1, csv_file2, position, position2):
|
||||
def plot_stacked_graph(title, output, csv_file1, csv_file2, name1, name2):
|
||||
# Read CSV files
|
||||
data1 = pd.read_csv(csv_file1, header=0)
|
||||
data2 = pd.read_csv(csv_file2, header=0)
|
||||
|
@ -18,27 +18,27 @@ def plot_stacked_graph(title, output, csv_file1, csv_file2, position, position2)
|
|||
# Create the plot
|
||||
fig, ax = plt.subplots()
|
||||
|
||||
ax.plot(x1, y1, label=f"{csv_file1}")
|
||||
ax.plot(x2, y2, label=f"{csv_file2}")
|
||||
ax.plot(x1, y1, label=f"{name1}")
|
||||
ax.plot(x2, y2, label=f"{name2}")
|
||||
|
||||
if position < 2 ** 32:
|
||||
ax.axvline(x=position, color='red', linestyle='--')
|
||||
ax.text(position, ax.get_ylim()[1] * 0.95, f"Feed-forward average # of epochs", color='red', fontsize=10, ha='right', va='top', backgroundcolor='white')
|
||||
# if position < 2 ** 32:
|
||||
# ax.axvline(x=position, color='red', linestyle='--')
|
||||
# ax.text(position, ax.get_ylim()[1] * 0.95, f"Feed-forward average # of epochs", color='red', fontsize=10, ha='right', va='top', backgroundcolor='white')
|
||||
|
||||
if position2 < 2 ** 32:
|
||||
ax.axvline(x=position2, color='red', linestyle='--')
|
||||
ax.text(position2, ax.get_ylim()[1] * 0.95, f"Deep learning average # of epochs", color='red', fontsize=10, ha='right', va='top', backgroundcolor='white')
|
||||
# if position2 < 2 ** 32:
|
||||
# ax.axvline(x=position2, color='red', linestyle='--')
|
||||
# ax.text(position2, ax.get_ylim()[1] * 0.95, f"Deep learning average # of epochs", color='red', fontsize=10, ha='right', va='top', backgroundcolor='white')
|
||||
|
||||
ax.set_xlabel(x1_label)
|
||||
ax.set_ylabel(y1_label)
|
||||
# ax.legend()
|
||||
ax.set_title(title)
|
||||
ax.legend()
|
||||
ax.set_title(title, fontsize=12)
|
||||
|
||||
plt.savefig(output)
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 7:
|
||||
print("Usage: python script.py <title> <output_file> <csv_file1> <csv_file2> <position_feed_forward> <position_deep>")
|
||||
print("Usage: python script.py <title> <output_file> <csv_file1> <csv_file2> <csv1_name> <csv2_name>")
|
||||
sys.exit(1)
|
||||
|
||||
csv_file1 = sys.argv[3]
|
||||
|
@ -48,4 +48,4 @@ if __name__ == "__main__":
|
|||
position = sys.argv[5]
|
||||
position2 = sys.argv[6]
|
||||
|
||||
plot_stacked_graph(title, output, csv_file1, csv_file2, int(position), int(position2))
|
||||
plot_stacked_graph(title, output, csv_file1, csv_file2, position, position2)
|
|
@ -0,0 +1 @@
|
|||
1000,1000
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,101 @@
|
|||
Epoch,Loss
|
||||
0,0.467267
|
||||
1,0.290678
|
||||
2,0.207312
|
||||
3,0.0649596
|
||||
4,0.0599905
|
||||
5,0.0543778
|
||||
6,0.0424468
|
||||
7,0.0403263
|
||||
8,0.0378105
|
||||
9,0.0316262
|
||||
10,0.030276
|
||||
11,0.0285475
|
||||
12,0.0243477
|
||||
13,0.0233952
|
||||
14,0.0222361
|
||||
15,0.0193495
|
||||
16,0.0187022
|
||||
17,0.0179005
|
||||
18,0.0157537
|
||||
19,0.0152478
|
||||
20,0.0146454
|
||||
21,0.0129936
|
||||
22,0.0126169
|
||||
23,0.0121665
|
||||
24,0.0109912
|
||||
25,0.0106991
|
||||
26,0.0103499
|
||||
27,0.00939932
|
||||
28,0.00917552
|
||||
29,0.00890531
|
||||
30,0.00822634
|
||||
31,0.00804983
|
||||
32,0.00783543
|
||||
33,0.00727694
|
||||
34,0.00714944
|
||||
35,0.0069743
|
||||
36,0.00651646
|
||||
37,0.00638716
|
||||
38,0.0062143
|
||||
39,0.00583569
|
||||
40,0.0057501
|
||||
41,0.00563407
|
||||
42,0.00535179
|
||||
43,0.00527912
|
||||
44,0.00518645
|
||||
45,0.00492411
|
||||
46,0.00486457
|
||||
47,0.00479207
|
||||
48,0.00457332
|
||||
49,0.00452252
|
||||
50,0.0044633
|
||||
51,0.00427591
|
||||
52,0.00423684
|
||||
53,0.00419028
|
||||
54,0.00405542
|
||||
55,0.00402287
|
||||
56,0.00398389
|
||||
57,0.00388008
|
||||
58,0.00385705
|
||||
59,0.00383098
|
||||
60,0.00375437
|
||||
61,0.003736
|
||||
62,0.00371335
|
||||
63,0.00365119
|
||||
64,0.00363692
|
||||
65,0.00362008
|
||||
66,0.00356688
|
||||
67,0.00355586
|
||||
68,0.00354138
|
||||
69,0.00349546
|
||||
70,0.00348745
|
||||
71,0.0034773
|
||||
72,0.00344903
|
||||
73,0.00343734
|
||||
74,0.00342712
|
||||
75,0.0033967
|
||||
76,0.00339011
|
||||
77,0.0033799
|
||||
78,0.00335454
|
||||
79,0.00335041
|
||||
80,0.00334154
|
||||
81,0.00332021
|
||||
82,0.00331562
|
||||
83,0.00330733
|
||||
84,0.00328681
|
||||
85,0.00328304
|
||||
86,0.0032763
|
||||
87,0.00326311
|
||||
88,0.00325899
|
||||
89,0.003252
|
||||
90,0.00324033
|
||||
91,0.0032339
|
||||
92,0.00322834
|
||||
93,0.00321506
|
||||
94,0.0032241
|
||||
95,0.00323033
|
||||
96,0.0032095
|
||||
97,0.00320514
|
||||
98,0.00321329
|
||||
99,0.00318569
|
|
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,101 @@
|
|||
Epoch,Loss
|
||||
0,0.699479
|
||||
1,0.496314
|
||||
2,0.410334
|
||||
3,0.358543
|
||||
4,0.322386
|
||||
5,0.295046
|
||||
6,0.27331
|
||||
7,0.255423
|
||||
8,0.240327
|
||||
9,0.227347
|
||||
10,0.216018
|
||||
11,0.206008
|
||||
12,0.197078
|
||||
13,0.189043
|
||||
14,0.181763
|
||||
15,0.175128
|
||||
16,0.169047
|
||||
17,0.163448
|
||||
18,0.158271
|
||||
19,0.153466
|
||||
20,0.148992
|
||||
21,0.144812
|
||||
22,0.140896
|
||||
23,0.137217
|
||||
24,0.133754
|
||||
25,0.130487
|
||||
26,0.127397
|
||||
27,0.124471
|
||||
28,0.121694
|
||||
29,0.119055
|
||||
30,0.116543
|
||||
31,0.114149
|
||||
32,0.111865
|
||||
33,0.109682
|
||||
34,0.107593
|
||||
35,0.105593
|
||||
36,0.103676
|
||||
37,0.101836
|
||||
38,0.10007
|
||||
39,0.0983709
|
||||
40,0.0967364
|
||||
41,0.0951626
|
||||
42,0.0936461
|
||||
43,0.0921836
|
||||
44,0.0907725
|
||||
45,0.0894097
|
||||
46,0.088093
|
||||
47,0.08682
|
||||
48,0.0855883
|
||||
49,0.0843962
|
||||
50,0.0832418
|
||||
51,0.0821232
|
||||
52,0.0810387
|
||||
53,0.0799869
|
||||
54,0.0789662
|
||||
55,0.0779754
|
||||
56,0.077013
|
||||
57,0.0760781
|
||||
58,0.0751694
|
||||
59,0.0742859
|
||||
60,0.0734264
|
||||
61,0.0725901
|
||||
62,0.0717762
|
||||
63,0.0709837
|
||||
64,0.0702117
|
||||
65,0.0694594
|
||||
66,0.0687262
|
||||
67,0.0680115
|
||||
68,0.0673145
|
||||
69,0.0666345
|
||||
70,0.0659711
|
||||
71,0.0653235
|
||||
72,0.0646913
|
||||
73,0.064074
|
||||
74,0.063471
|
||||
75,0.0628818
|
||||
76,0.062306
|
||||
77,0.0617431
|
||||
78,0.0611928
|
||||
79,0.0606546
|
||||
80,0.0601282
|
||||
81,0.0596132
|
||||
82,0.0591092
|
||||
83,0.0586158
|
||||
84,0.0416983
|
||||
85,0.0168184
|
||||
86,0.0174127
|
||||
87,0.0173631
|
||||
88,0.0173133
|
||||
89,0.0172655
|
||||
90,0.017219
|
||||
91,0.0171735
|
||||
92,0.0171297
|
||||
93,0.0170865
|
||||
94,0.0170442
|
||||
95,0.017003
|
||||
96,0.0169629
|
||||
97,0.0169233
|
||||
98,0.0168849
|
||||
99,0.0168473
|
|
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
|
@ -0,0 +1,9 @@
|
|||
\begin{figure}
|
||||
\begin{tabular}{|c|c|c|c|}
|
||||
\hline
|
||||
Test & Correct & Incorrect & Accuracy (\%) \\
|
||||
\hline
|
||||
Feed-Forward & 9800 & 199 & 98\\
|
||||
Deep Learning & 9898 & 101 & 99\\
|
||||
\end{tabular}
|
||||
\end{figure}
|
|
@ -684,6 +684,34 @@ namespace fp
|
|||
return run_network_tests<net_type_ff>(path, "feed_forward", runs, restore);
|
||||
}
|
||||
|
||||
auto run_deep_learning_tests_v2(const std::string& path, const blt::i32 runs, const bool restore)
|
||||
{
|
||||
using namespace dlib;
|
||||
using net_type_dl = loss_multiclass_log<
|
||||
fc<10,
|
||||
relu<fc<16,
|
||||
relu<fc<16,
|
||||
max_pool<2, 2, 2, 2, relu<con<16, 5, 5, 1, 1,
|
||||
max_pool<2, 2, 2, 2, relu<con<6, 5, 5, 1, 1,
|
||||
input<matrix<blt::u8>>>>>>>>>>>>>>;
|
||||
BLT_TRACE("Running deep learning tests");
|
||||
return run_network_tests<net_type_dl>(path, "deep_learning", runs, restore);
|
||||
}
|
||||
|
||||
auto run_feed_forward_tests_v2(const std::string& path, const blt::i32 runs, const bool restore)
|
||||
{
|
||||
using namespace dlib;
|
||||
|
||||
using net_type_ff = loss_multiclass_log<
|
||||
fc<10,
|
||||
relu<fc<16,
|
||||
relu<fc<16,
|
||||
input<matrix<blt::u8>>>>>>>>;
|
||||
|
||||
BLT_TRACE("Running feed forward tests");
|
||||
return run_network_tests<net_type_ff>(path, "feed_forward", runs, restore);
|
||||
}
|
||||
|
||||
void run_mnist(const int argc, const char** argv)
|
||||
{
|
||||
binary_directory = std::filesystem::current_path();
|
||||
|
@ -756,8 +784,10 @@ namespace fp
|
|||
const auto restore = args.get<bool>("restore");
|
||||
auto path = binary_directory + args.get<std::string>("network");
|
||||
|
||||
auto [deep_stats, deep_tests] = run_deep_learning_tests(path, runs, restore);
|
||||
auto [forward_stats, forward_tests] = run_feed_forward_tests(path, runs, restore);
|
||||
// auto [deep_stats, deep_tests] = run_deep_learning_tests(path, runs, restore);
|
||||
auto [forward_stats, forward_tests] = run_feed_forward_tests_v2(path, runs, restore);
|
||||
auto [deep_stats, deep_tests] = run_deep_learning_tests_v2(path, runs, restore);
|
||||
// auto [forward_stats, forward_tests] = run_feed_forward_tests(path, runs, restore);
|
||||
|
||||
auto average_forward_size = forward_stats.average_size();
|
||||
auto average_deep_size = deep_stats.average_size();
|
||||
|
|
Loading…
Reference in New Issue