1
votes

I am using fann2 (the Python binding for the FANN library) to train neural networks. I have trouble getting the weights of the network and the bias terms. I can see that the neural_net object has the following 2 methods:

get_connection_array

get_bias_array

Both methods require arguments, and I can't figure out what they should be (I can't find any documentation for these methods in Python). Any ideas?

Thanks for any help!

1

1 Answers

0
votes

The python module is just a thin wrapper around th C++ code. Looks like this:

void get_bias_array(helper_array<unsigned int>* ARGOUT)

The argument is an array that the data gets copied into. I'm not sure what this is in python; I think you can pass in a new helper array and this call will allocate storage and copy the data.