diff --git a/src/core/model/xmmModel.hpp b/src/core/model/xmmModel.hpp index 985f4dc..e2aee2b 100644 --- a/src/core/model/xmmModel.hpp +++ b/src/core/model/xmmModel.hpp @@ -244,6 +244,7 @@ class Model : public Writable { virtual void train(TrainingSet* trainingSet) { if (!trainingSet) return; cancelTraining(); + clear(); is_training_ = true; @@ -445,8 +446,10 @@ class Model : public Writable { */ void fromJson(Json::Value const& root) { try { + EventGenerator _tmp_training_events(training_events); Model tmp(root); *this = tmp; + training_events = _tmp_training_events; } catch (JsonException& e) { throw e; }