Kompilierungsfehler beim Erzeugen eines C-Programmes
Posted: Tue 22. Sep 2020, 12:27
Liebe Forumsmitglieder, Lieber Herr Jetter!
Ich möchte aus einem trainierten Netz C-Code erzeugen.
Bei diesem Netz verwende ich für die Neuronen des Hidden und Output Layers:
INPUT FUNCTION: AVG
ACTIVATION FUNCTION: LOGISTIC
Wenn ich dieses Netz kompiliere bekomme ich folgende Fehlermeldung:
||=== Build: Debug in NN_ENG1_5679_LOGAVG_202021 (compiler: GNU GCC Compiler) ===|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/main.c||In function ‘main’:|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/main.c|26|warning: ‘inputwert’ is used uninitialized in this function [-Wuninitialized]|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|38|warning: missing braces around initializer [-Wmissing-braces]|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|38|note: (near initialization for ‘NEURON_PARMS’)|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|114|warning: missing braces around initializer [-Wmissing-braces]|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|114|note: (near initialization for ‘NEURON_PARMS_HIDDEN’)|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|144|warning: missing braces around initializer [-Wmissing-braces]|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|144|note: (near initialization for ‘NEURON_PARMS_OUTPUT’)|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|150|warning: missing braces around initializer [-Wmissing-braces]|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|150|note: (near initialization for ‘NEURAL_LINK_PARMS’)|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/Neuron.c||In function ‘NeuronPropagate’:|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/Neuron.c|310|warning: implicit declaration of function ‘CalculateInputRand’ [-Wimplicit-function-declaration]|
obj/Debug/Neuron.o||In function `NeuronPropagate':|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/Neuron.c|310|undefined reference to `CalculateInputRand'|
||error: ld returned 1 exit status|
||=== Build failed: 2 error(s), 6 warning(s) (0 minute(s), 0 second(s)) ===|
Leider sind meine C-Kenntnisse bescheiden. Hat irgendwer eine Idee oder einen Hinweis für mich, wie ich das beheben kann bzw. was ich falsch mache?
Liebe Grüsse
Gianni
Ich möchte aus einem trainierten Netz C-Code erzeugen.
Bei diesem Netz verwende ich für die Neuronen des Hidden und Output Layers:
INPUT FUNCTION: AVG
ACTIVATION FUNCTION: LOGISTIC
Wenn ich dieses Netz kompiliere bekomme ich folgende Fehlermeldung:
||=== Build: Debug in NN_ENG1_5679_LOGAVG_202021 (compiler: GNU GCC Compiler) ===|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/main.c||In function ‘main’:|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/main.c|26|warning: ‘inputwert’ is used uninitialized in this function [-Wuninitialized]|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|38|warning: missing braces around initializer [-Wmissing-braces]|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|38|note: (near initialization for ‘NEURON_PARMS’)|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|114|warning: missing braces around initializer [-Wmissing-braces]|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|114|note: (near initialization for ‘NEURON_PARMS_HIDDEN’)|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|144|warning: missing braces around initializer [-Wmissing-braces]|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|144|note: (near initialization for ‘NEURON_PARMS_OUTPUT’)|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|150|warning: missing braces around initializer [-Wmissing-braces]|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/NeuralNetDef.c|150|note: (near initialization for ‘NEURAL_LINK_PARMS’)|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/Neuron.c||In function ‘NeuronPropagate’:|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/Neuron.c|310|warning: implicit declaration of function ‘CalculateInputRand’ [-Wimplicit-function-declaration]|
obj/Debug/Neuron.o||In function `NeuronPropagate':|
/home/gianni/NN/202021/NN_ENG1_5679_LOGAVG_202021/Neuron.c|310|undefined reference to `CalculateInputRand'|
||error: ld returned 1 exit status|
||=== Build failed: 2 error(s), 6 warning(s) (0 minute(s), 0 second(s)) ===|
Leider sind meine C-Kenntnisse bescheiden. Hat irgendwer eine Idee oder einen Hinweis für mich, wie ich das beheben kann bzw. was ich falsch mache?
Liebe Grüsse
Gianni