fann
fann copied to clipboard
fann_train_on_file does not set error on bad input training file data
there is an error logged by the parsing function, but that function has no access to the nn struct containing the error. I'm trying to generate exceptions in fannj for fann error conditions and discovered that the user is not able to detect all errors programmatically, ie. without looking at console output or inconveniently redirecting error output.
You don't specify which functions, but both structs fann and fann_train_data can be cast to a fann_error. See my other comment.
fann_train_on_file() when called with badly formatted training data, for example. And fann_cascadetrain_on_file(). They both just return without giving any indication of an error it seems, when they bail after failing to read the input data.
Do they just segfault? I don't have a machine to test on right now.
no, they just return and the user (caller) has no chance to detect the error by any reasonable means.
I think it makes sense in general to have some way how to identify error on ann when train data cannot be created. There is an error in error log as you know but it might not be always clear and reliable.