kann icon indicating copy to clipboard operation
kann copied to clipboard

kann_class_error() is broken for KANN_C_CEB

Open grahamgower opened this issue 4 years ago • 3 comments

kann_class_error() always returns 0 for networks with KANN_C_CEB cost.

grahamgower avatar Mar 15 '20 17:03 grahamgower

kann_class_error() doesn't work with binary cross-entropy KANN_C_CEB. With this cost, there can be multiple 1s, but kann_class_error() assumes there is only one 1.

attractivechaos avatar Mar 15 '20 17:03 attractivechaos

Yep, thanks. I wasn't sure if this was intentional or not. The mnist-cnn.c example uses KANN_C_CEB with kann_train_fnn1(), which then outputs 0% class error.

grahamgower avatar Mar 15 '20 17:03 grahamgower

Oh, wait. I'm an idiot. :) Sorry for the noise.

grahamgower avatar Mar 15 '20 17:03 grahamgower