neuron : add set_neurons to manage transfert learning
This commit is contained in:
+2
-1
@@ -9,12 +9,13 @@ YTESTDIR=$(ROOTPROJECTDIR)/ytest_t
|
||||
YPERMDIR=$(ROOTPROJECTDIR)/ypermutation_t
|
||||
|
||||
TENSDIR=$(ROOTPROJECTDIR)/tensor_t
|
||||
LISTDIR=$(ROOTPROJECTDIR)/list_t
|
||||
|
||||
NEURODIR=$(ROOT_DIR)
|
||||
DIMDIR=$(ROOTPROJECTDIR)/dimension_t
|
||||
|
||||
#CFLAGS=-I$(INCLUDE_DIR) -I$(YPERMDIR)/src -I$(YTESTDIR)/include_ytest/include -I$(DIMDIR)/src -I$(TENSDIR)/src #"-D DEBUG=1"
|
||||
INCLUDE=-I$(NEURODIR)/src -I$(YPERMDIR)/src -I$(DIMDIR)/src -I$(TENSDIR)/src #"-D DEBUG=1"
|
||||
INCLUDE=-I$(NEURODIR)/src -I$(YPERMDIR)/src -I$(DIMDIR)/src -I$(TENSDIR)/src -I$(LISTDIR)/src #"-D DEBUG=1"
|
||||
#LDFLAGS=-L$(YTESTDIR) -lytest -lOpenCL -lm -lpthread
|
||||
#CFLAGS= -Wall -Werror -fpic $(INCLUDE)
|
||||
CFLAGS= -Wall -Werror -fpic $(INCLUDE)
|
||||
|
||||
@@ -1033,7 +1033,15 @@ size_t learning_cloneuronset_##type(cloneuronset_##type *clnrnst, data_set_##typ
|
||||
return nbreps;\
|
||||
} \
|
||||
\
|
||||
|
||||
\
|
||||
GEN_LIST_ALL(ptr_set_NEURONS_##type)\
|
||||
GEN_FUNC_PTR_LIST_FREE(ptr_set_NEURONS_##type){\
|
||||
ptr_set_NEURONS_##type p_s_nn = (struct set_neurons_##type *)arg;\
|
||||
free_config_layers(p_s_nn->pconf);\
|
||||
free_neurons_##type(p_s_nn->base);\
|
||||
free(p_s_nn);\
|
||||
}\
|
||||
\
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
//#include "tools_t/tools_t.h"
|
||||
#include "tensor_t/tensor_t.h"
|
||||
#include "list_t/list_t.h"
|
||||
|
||||
extern bool randomizeInitWeight;
|
||||
|
||||
@@ -124,6 +125,20 @@ typedef struct cloneuronset_##type cloneuronset_##type;\
|
||||
void free_cloneuronset_##type(cloneuronset_##type *clnrnst);\
|
||||
cloneuronset_##type * create_cloneuronset_from_base_conf_##type(neurons_##type *base, config_layers *conf, size_t nb_clone);\
|
||||
size_t learning_cloneuronset_##type(cloneuronset_##type *clnrnst, data_set_##type *dataset, bool (*condition)(type, size_t));\
|
||||
\
|
||||
\
|
||||
\
|
||||
struct set_neurons_##type{\
|
||||
struct config_layers *pconf;\
|
||||
struct neurons_##type *base;\
|
||||
ssize_t score;\
|
||||
};\
|
||||
typedef struct set_neurons_##type * ptr_set_NEURONS_##type;\
|
||||
\
|
||||
GENERATE_LIST_ALL(ptr_set_NEURONS_##type)\
|
||||
GEN_HEAD_PTR_LIST(ptr_set_NEURONS_##type)\
|
||||
\
|
||||
|
||||
|
||||
GEN_NEURON_(TYPE_FLOAT)
|
||||
GEN_NEURON_(TYPE_DOUBLE)
|
||||
|
||||
@@ -443,8 +443,12 @@ j=0;\
|
||||
if(dim) free_dimension(dim);\
|
||||
if(l_p) free_list_perm_in_dim(l_p);\
|
||||
\
|
||||
}while(0);
|
||||
|
||||
}while(0);\
|
||||
\
|
||||
\
|
||||
\
|
||||
\
|
||||
\
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user