genann icon indicating copy to clipboard operation
genann copied to clipboard

Example1 always shows 1 or 0, even when output is {3,4,5,6}

Open dvhx opened this issue 2 years ago • 1 comments

In example1.c I changed output to:

const double output[4] = {3, 4, 5, 6};

Compiled and re-run example1 and I still see only 1 and 0 as a result.

dvhx avatar Feb 03 '23 13:02 dvhx

Sigmoid activation, used by default, can return only values from 0 to 1.

You could try something like

const double output[4] = {0.3, 0.4, 0.5, 0.6};

to bring the training data in range, or you could change the output activation to genann_act_linear which will allow it to hit those higher values.

codeplea avatar Feb 03 '23 17:02 codeplea