diff --git a/bob/learn/em/cpp/KMeansTrainer.cpp b/bob/learn/em/cpp/KMeansTrainer.cpp index b65874579a8a1a849f7341406642c2a5e6a0e3b2..0950685a6f43a4bec242711e61dc1ca2fe1c217e 100644 --- a/bob/learn/em/cpp/KMeansTrainer.cpp +++ b/bob/learn/em/cpp/KMeansTrainer.cpp @@ -11,6 +11,7 @@ #include <boost/random.hpp> #include <bob.core/random.h> +#include <bob.core/logging.h> #include <set> @@ -223,6 +224,7 @@ void bob::learn::em::KMeansTrainer::mStep(bob::learn::em::KMeansMachine& kmeans, means(i,blitz::Range::all()) = ar(index, blitz::Range::all()); // and remember that we already chose this mean random_samples.insert(index); + bob::core::warn << "Replacing empty mean with random sample " << index << " from data"; } } }