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
This commit is contained in:
Adrià Arrufat 2020-04-03 20:58:05 +09:00 committed by GitHub
parent 5a715fe24d
commit b44d9465f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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_));