Changeset feb89f


Ignore:
Timestamp:
Sep 1, 2016, 9:44:17 PM (9 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Gui_Fixes
Children:
c40e1f8
Parents:
70436b
Message:

Added additional checks to training data sensibility of PotentialTrainer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Potentials/PotentialTrainer.cpp

    r70436b rfeb89f  
    9595    TrainingData data(model->getSpecificFilter());
    9696    data(_homologies.getHomologousGraphs(_graph));
     97
     98    // check data
     99    const TrainingData::FilteredInputVector_t &inputs = data.getTrainingInputs();
     100    for (TrainingData::FilteredInputVector_t::const_iterator iter = inputs.begin();
     101        iter != inputs.end(); ++iter)
     102      if (((*iter).empty()) || ((*iter).front().empty())) {
     103        ELOG(1, "At least one of the training inputs is empty! Correct fragment and potential charges selected?");
     104        return false;
     105      }
     106    const TrainingData::OutputVector_t &outputs = data.getTrainingOutputs();
     107    for (TrainingData::OutputVector_t::const_iterator iter = outputs.begin();
     108        iter != outputs.end(); ++iter)
     109      if ((*iter).empty()) {
     110        ELOG(1, "At least one of the training outputs is empty! Correct fragment and potential charges selected?");
     111        return false;
     112      }
    97113
    98114    // print distances and energies if desired for debugging
Note: See TracChangeset for help on using the changeset viewer.