tinn icon indicating copy to clipboard operation
tinn copied to clipboard

output functions

Open letarg0 opened this issue 6 years ago • 3 comments

Is posssible to create a autput function in C? For example I learn my network and need embeding this function to my program in C is possible to save in file a C function (pieces of program) with all variables, bies etc. only one big function

letarg0 avatar Apr 09 '18 08:04 letarg0

The best way to do this is probably to simply export your trained network to a TINN file with the xtsave() function. You can then package this file with your application. When you want to use the network, use the xtload() function. This will make your source much neater than defining a function that contains every weight for the network.

tsandstr avatar Apr 09 '18 13:04 tsandstr

Thats correct. just xtsave() it and xtload() it next time. You can use xtpredict() all you like with the loaded network. I do so in an embedded setting where I train on a powerful desktop and xtload() and xtpredict() on a MCU.

glouw avatar Apr 10 '18 15:04 glouw

better way is export to #define constant tis is smalest and fastest. embeded program not always have a disk or big memory

letarg0 avatar Apr 10 '18 21:04 letarg0