Skip to content

Commit

Permalink
Added get_weights and set_weights to fann_cpp.h
Browse files Browse the repository at this point in the history
The functions fann_get_weights and fann_set_weights have been in the C API for a while but not the C++ API.
  • Loading branch information
bridgerrholt committed Jul 10, 2018
1 parent 2d2f707 commit c82313b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/include/fann_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1909,6 +1909,36 @@ namespace FANN {
fann_set_weight(ann, from_neuron, to_neuron, weight);
}
}

/* Method: get_weights
Get all the network weights.
See also:
<fann_get_weights>
This function appears in FANN >= x.y.z
*/
void get_weights(fann_type *weights) {
if (ann != NULL) {
fann_get_weights(ann, weights);
}
}

/* Method: set_weights
Set network weights.
See also:
<fann_set_weights>
This function appears in FANN >= x.y.z
*/
void set_weights(fann_type *weights) {
if (ann != NULL) {
fann_set_weights(ann, weights);
}
}

/*********************************************************************/

Expand Down

0 comments on commit c82313b

Please sign in to comment.