
jetzt bräuchte ich zugriff auf bereits geladene trainingsdaten und steck fest.
Code: Alles auswählen
unit FANN; // << nur auszüge also die wichtigen zeilen
{$MODE Delphi}
const DLL_FILE = 'fanndouble.dll';
type
fann_type = double;
/////////////////////////////////////////////////
Fann_Type_Array = Array [0..65535] of fann_type;
PFann_Type_Array = ^Fann_Type_Array;
PPFann_Type_Array = Array [0..65535] of ^Fann_Type_Array;
/////////////////////////////////////////////////
TFann_Train_Data = packed record // liegts evtl an dem packed und den pointern ? ich counte unten i++
errno_f: cardinal;
erro_log: PFile;
errstr: PChar;
num_data: cardinal;
num_input: cardinal;
num_ouput: cardinal;
input : PPFann_Type_Array;
output: PPFann_Type_Array;
end;
.........................
Code: Alles auswählen
unit meine_dll; // << nur auszüge also die wichtigen zeilen
{$MODE Delphi}
type
/////////////////////////////////////////////////
PFann_Train_Data = ^TFann_Train_Data;
/////////////////////////////////////////////////
FNetwork = record
trn_ptr : PFann_Train_Data; // pointer to train data struct
end;
/////////////////////////////////////////////////
var
ANN : Array of FNetwork;
Code: Alles auswählen
hlp_log(fnc + ' | _aid ' + IntToStr(_aid) + ' | low_input ' + IntToStr(Low(ANN[_aid].trn_ptr.input)));
hlp_log(fnc + ' | _aid ' + IntToStr(_aid) + ' | hgh_input ' + IntToStr(High(ANN[_aid].trn_ptr.input)));
hlp_log(fnc + ' | --------------------------------------------------------------');
hlp_log(fnc + ' | _aid ' + IntToStr(_aid) + ' | low_input[0] ' + IntToStr(Low(ANN[_aid].trn_ptr.input[0]^)));
hlp_log(fnc + ' | _aid ' + IntToStr(_aid) + ' | hgh_input[0] ' + IntToStr(High(ANN[_aid].trn_ptr.input[0]^)));
hlp_log(fnc + ' | --------------------------------------------------------------');
Code: Alles auswählen
28.04.2017 16:26:36 | pca_create() | --------------------------------------------------------------
28.04.2017 16:26:36 | pca_create() | _aid 0 | low_input 0
28.04.2017 16:26:36 | pca_create() | _aid 0 | hgh_input 65535
28.04.2017 16:26:36 | pca_create() | --------------------------------------------------------------
28.04.2017 16:26:36 | pca_create() | _aid 0 | low_input[0] 0
28.04.2017 16:26:36 | pca_create() | _aid 0 | hgh_input[0] 65535
Code: Alles auswählen
28.04.2017 16:12:54 | pca_create() | --------------------------------------------------------------
28.04.2017 16:12:55 | pca_create() | j 0 | i 0 | input[0][0] 3,6729E-262
28.04.2017 16:12:55 | pca_create() | j 0 | i 1 | input[0][1] 3,6748E-262
28.04.2017 16:12:55 | pca_create() | j 1 | i 0 | input[1][0] 1,1302E-266
28.04.2017 16:12:55 | pca_create() | j 1 | i 1 | input[1][1] 1,1302E-266
ich habe die trainingsdaten structur mal komplett in ein file gespeichert, sie sind also vorhanden und sie stimmen.
Code: Alles auswählen
FloatToStr(ANN[_aid].trn_ptr^.input[j]^[i])
lieben dank
