diff --git a/dlib/dnn/trainer.h b/dlib/dnn/trainer.h index d37c6a3f4..ff1a3682a 100644 --- a/dlib/dnn/trainer.h +++ b/dlib/dnn/trainer.h @@ -1059,7 +1059,7 @@ namespace dlib long lr_schedule_pos; unsigned long gradient_check_budget; - std::exception_ptr eptr; + std::exception_ptr eptr = nullptr; mutable std::mutex eptr_mutex; void propagate_exception() const {