Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions examples/steepness_train.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ void train_on_steepness_file(struct fann *ann, char *filename,
unsigned int i;

struct fann_train_data *data = fann_read_train_from_file(filename);
if(data == NULL)
{
ann->errno_f = FANN_E_CANT_READ_TD;
return;
}

if(epochs_between_reports)
{
Expand Down
1 change: 1 addition & 0 deletions src/fann_cascade.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ FANN_EXTERNAL void FANN_API fann_cascadetrain_on_file(struct fann *ann, const ch

if(data == NULL)
{
ann->errno_f = FANN_E_CANT_READ_TD;
return;
}
fann_cascadetrain_on_data(ann, data, max_neurons, neurons_between_reports, desired_error);
Expand Down
1 change: 1 addition & 0 deletions src/fann_train_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ FANN_EXTERNAL void FANN_API fann_train_on_file(struct fann *ann, const char *fil

if(data == NULL)
{
ann->errno_f = FANN_E_CANT_READ_TD;
return;
}
fann_train_on_data(ann, data, max_epochs, epochs_between_reports, desired_error);
Expand Down