2 Fast Artificial Neural Network Library (fann)
3 Copyright (C) 2003 Steffen Nissen (lukesky@diku.dk)
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 /* Section: FANN File Input/Output
25 It is possible to save an entire ann to a file with <fann_save> for future loading with <fann_create_from_file>.
28 /* Group: File Input and Output */
30 /* Function: fann_create_from_file
32 Constructs a backpropagation neural network from a configuration file, which have been saved by <fann_save>.
35 <fann_save>, <fann_save_to_fixed>
37 This function appears in FANN >= 1.0.0.
39 FANN_EXTERNAL struct fann *FANN_API fann_create_from_file(const char *configuration_file);
42 /* Function: fann_save
44 Save the entire network to a configuration file.
46 The configuration file contains all information about the neural network and enables
47 <fann_create_from_file> to create an exact copy of the neural network and all of the
48 parameters associated with the neural network.
50 These two parameters (<fann_set_callback>, <fann_set_error_log>) are *NOT* saved
51 to the file because they cannot safely be ported to a different location. Also temporary
52 parameters generated during training like <fann_get_MSE> is not saved.
55 The function returns 0 on success and -1 on failure.
58 <fann_create_from_file>, <fann_save_to_fixed>
60 This function appears in FANN >= 1.0.0.
62 FANN_EXTERNAL int FANN_API fann_save(struct fann *ann, const char *configuration_file);
65 /* Function: fann_save_to_fixed
67 Saves the entire network to a configuration file.
68 But it is saved in fixed point format no matter which
69 format it is currently in.
71 This is usefull for training a network in floating points,
72 and then later executing it in fixed point.
74 The function returns the bit position of the fix point, which
75 can be used to find out how accurate the fixed point network will be.
76 A high value indicates high precision, and a low value indicates low
79 A negative value indicates very low precision, and a very
80 strong possibility for overflow.
81 (the actual fix point will be set to 0, since a negative
82 fix point does not make sence).
84 Generally, a fix point lower than 6 is bad, and should be avoided.
85 The best way to avoid this, is to have less connections to each neuron,
86 or just less neurons in each layer.
88 The fixed point use of this network is only intended for use on machines that
89 have no floating point processor, like an iPAQ. On normal computers the floating
90 point version is actually faster.
93 <fann_create_from_file>, <fann_save>
95 This function appears in FANN >= 1.0.0.
97 FANN_EXTERNAL int FANN_API fann_save_to_fixed(struct fann *ann, const char *configuration_file);