mirror of
https://github.com/augustin64/projet-tipe
synced 2025-02-02 19:39:39 +01:00
Fix Kernel size
This commit is contained in:
parent
00797ab3a8
commit
7fdd869d6e
@ -21,7 +21,7 @@ Network* create_network(int max_size, float learning_rate, int dropout, int init
|
||||
network->kernel = (Kernel**)malloc(sizeof(Kernel*)*(max_size-1));
|
||||
network->width = (int*)malloc(sizeof(int*)*max_size);
|
||||
network->depth = (int*)malloc(sizeof(int*)*max_size);
|
||||
for (int i=0; i < max_size; i++) {
|
||||
for (int i=0; i < max_size-1; i++) {
|
||||
network->kernel[i] = (Kernel*)malloc(sizeof(Kernel));
|
||||
}
|
||||
network->width[0] = input_dim;
|
||||
|
@ -101,7 +101,7 @@ void free_dense_linearisation(Network* network, int pos) {
|
||||
|
||||
void free_network_creation(Network* network) {
|
||||
free_a_cube_input_layer(network, 0, network->depth[0], network->width[0]);
|
||||
for (int i=0; i<network->max_size; i++)
|
||||
for (int i=0; i < network->max_size-1; i++)
|
||||
free(network->kernel[i]);
|
||||
free(network->width);
|
||||
free(network->depth);
|
||||
|
@ -17,7 +17,7 @@ int main() {
|
||||
printf(GREEN "OK\n" RESET);
|
||||
|
||||
printf("Architecture LeNet5:\n");
|
||||
for (int i=0; i < network->size; i++) {
|
||||
for (int i=0; i < network->size-1; i++) {
|
||||
kernel = network->kernel[i];
|
||||
if ((!kernel->cnn)&&(!kernel->nn)) {
|
||||
printf("\n==== Couche %d de type "YELLOW"Pooling"RESET" ====\n", i);
|
||||
|
Loading…
Reference in New Issue
Block a user