A small problem I am having

24 views
Skip to first unread message

Alfred

unread,
Oct 30, 2011, 8:11:24 PM10/30/11
to FannJ
Hello, I've noticed in the run() method of the Fann.java class the
output is a Float array of size 1, which restricts the output to a
single value. The problem I am having is if I wanted to implement and
Auto-encoder ANN the run method only returns a single valued array.

/**
* Run the ANN on a set of inputs.
*
* @param input
* length == numInputNeurons
* @return the output of the ANN. (length = numOutputNeurons)
*/
public float[] run(float[] input) {
Pointer result = fann_run(ann, input);
/*****************************************************************/
float[] output = result.getFloatArray(0, 1);
/*****************************************************************/
return output;
}

Would it be possible to change this to...

/**
* Run the ANN on a set of inputs.
*
* @param input
* length == numInputNeurons
* @return the output of the ANN. (length = numOutputNeurons)
*/
public float[] run(float[] input) {
Pointer result = fann_run(ann, input);
/
***************************************************************************/
float[] output = result.getFloatArray(0, getNumOutputNeurons());
/
***************************************************************************/
return output;
}

Kyle Renfro

unread,
Oct 31, 2011, 9:37:40 AM10/31/11
to fa...@googlegroups.com
Thanks for the input.  Fixed in version 0.4

Kyle

Fred Laderoute

unread,
Oct 31, 2011, 1:27:32 PM10/31/11
to fa...@googlegroups.com
Okay thanks. I just noticed, I don't require it immediately I just thought it would be helpful to know.
Reply all
Reply to author
Forward
0 new messages