Skip to content

Commit

Permalink
Merge pull request #106 from bridgerrholt/patch-1
Browse files Browse the repository at this point in the history
Added get_weights and set_weights to fann_cpp.h
  • Loading branch information
andersfylling committed Jul 21, 2018
2 parents 2d2f707 + c82313b commit b211dc3
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 b211dc3

Please sign in to comment.