diff --git a/src/mlpack/methods/det/det_main.cpp b/src/mlpack/methods/det/det_main.cpp index 4c813a1899..4ad8b3b88e 100644 --- a/src/mlpack/methods/det/det_main.cpp +++ b/src/mlpack/methods/det/det_main.cpp @@ -238,7 +238,7 @@ void BINDING_FUNCTION(util::Params& params, util::Timers& timers) arma::Row counters; timers.Start("det_test_set_tagging"); - if (!ofs.is_open()) + if (!ofs.is_open() && tagFile != "") { Log::Warn << "Unable to open file '" << tagFile << "' to save tag membership info." << std::endl;