mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-23 23:26:25 +01:00
Merge branch 'main' of https://github.com/julienChemillier/TIPE
This commit is contained in:
commit
60a4976dd6
@ -1,3 +1,5 @@
|
||||
#include "struct.h"
|
||||
|
||||
#ifndef DEF_TRAIN_H
|
||||
#define DEF_TRAIN_H
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "../colors.h"
|
||||
#include "include/neuron_io.h"
|
||||
#include "include/struct.h"
|
||||
|
||||
@ -254,8 +255,8 @@ Kernel* read_kernel(int type_couche, FILE* ptr) {
|
||||
nn->weights = (float**)malloc(sizeof(float*)*nn->input_units);
|
||||
nn->d_weights = (float**)malloc(sizeof(float*)*nn->input_units);
|
||||
for (int i=0; i < nn->input_units; i++) {
|
||||
nn->weights[i] = malloc(sizeof(float)*nn->output_units);
|
||||
nn->d_weights[i] = malloc(sizeof(float)*nn->output_units);
|
||||
nn->weights[i] = (float*)malloc(sizeof(float)*nn->output_units);
|
||||
nn->d_weights[i] = (float*)malloc(sizeof(float)*nn->output_units);
|
||||
for (int j=0; j < nn->output_units; j++) {
|
||||
fread(&tmp, sizeof(tmp), 1, ptr);
|
||||
nn->weights[i][j] = tmp;
|
||||
|
Loading…
Reference in New Issue
Block a user