From 49a2299c1c6711eac67675fd9782143cf82e9d0f Mon Sep 17 00:00:00 2001 From: augustin64 Date: Fri, 12 May 2023 16:21:14 +0200 Subject: [PATCH] Revert fd36226 for cnn/creation.c --- src/cnn/creation.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/cnn/creation.c b/src/cnn/creation.c index bca7a90..32644bf 100644 --- a/src/cnn/creation.c +++ b/src/cnn/creation.c @@ -38,7 +38,7 @@ Network* create_network(int max_size, float learning_rate, int dropout, int acti return network; } -/*Network* create_network_lenet5(float learning_rate, int dropout, int activation, int initialisation, int input_dim, int input_depth) { +Network* create_network_lenet5(float learning_rate, int dropout, int activation, int initialisation, int input_dim, int input_depth) { Network* network = create_network(8, learning_rate, dropout, activation, initialisation, input_dim, input_depth); add_convolution(network, 6, 28, activation); add_average_pooling(network, 14); @@ -48,32 +48,8 @@ Network* create_network(int max_size, float learning_rate, int dropout, int acti add_dense(network, 84, activation); add_dense(network, 10, SOFTMAX); return network; -}*/ -Network* create_network_lenet5(float learning_rate, int dropout, int activation, int initialisation, int input_dim, int input_depth) { - input_dim = 260; - input_depth = 3; - Network* network = create_network(16, learning_rate, dropout, activation, initialisation, input_dim, input_depth); - printf_warning("Creating large network"); - printf(" %d %d\n", input_dim, input_depth); - add_convolution(network, 6, 258, activation); - add_convolution(network, 16, 256, activation); - add_average_pooling(network, 64); - add_convolution(network, 16, 60, activation); - add_average_pooling(network, 30); - add_convolution(network, 16, 26, activation); - add_convolution(network, 16, 22, activation); - add_convolution(network, 16, 18, activation); - add_dense_linearisation(network, 840, activation); - add_dense(network, 520, activation); - add_dense(network, 420, activation); - add_dense(network, 320, activation); - add_dense(network, 220, activation); - add_dense(network, 120, activation); - add_dense(network, 50, SOFTMAX); - return network; } - Network* create_simple_one(float learning_rate, int dropout, int activation, int initialisation, int input_dim, int input_depth) { Network* network = create_network(3, learning_rate, dropout, activation, initialisation, input_dim, input_depth); add_dense_linearisation(network, 80, activation);