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
pull/2066/head
Adrià Arrufat 5 years ago committed by GitHub
parent 5a715fe24d
commit b44d9465f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -107,7 +107,7 @@ namespace dlib
const solver_type& solver_,
const std::vector<int>& cuda_extra_devices,
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_));

Loading…
Cancel
Save