Unverified Commit b44d9465 authored by Adrià Arrufat's avatar Adrià Arrufat Committed by GitHub
Browse files

Fix warning in dnn_trainer initialization list (#2049)

The thread pool was initialized after the network, so it lead to a
reorder warning in GCC 9.3.0
parent 5a715fe2
...@@ -107,7 +107,7 @@ namespace dlib ...@@ -107,7 +107,7 @@ namespace dlib
const solver_type& solver_, const solver_type& solver_,
const std::vector<int>& cuda_extra_devices, const std::vector<int>& cuda_extra_devices,
std::shared_ptr<threads> thread_pools_ = std::shared_ptr<threads>() std::shared_ptr<threads> thread_pools_ = std::shared_ptr<threads>()
) : job_pipe(0), net(net_), thread_pools(thread_pools_) ) : job_pipe(0), thread_pools(thread_pools_), net(net_)
{ {
devices.push_back(std::make_shared<device_data>(dlib::cuda::get_device(), net, solver_)); devices.push_back(std::make_shared<device_data>(dlib::cuda::get_device(), net, solver_));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment