MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / InternalThreadEntry

Method InternalThreadEntry

rtpose_wrapper/src/caffe/parallel.cpp:271–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269
270template<typename Dtype>
271void P2PSync<Dtype>::InternalThreadEntry() {
272 Caffe::SetDevice(solver_->param().device_id());
273 CHECK(Caffe::root_solver());
274 Caffe::set_root_solver(false);
275 // See if there is a defined seed and reset random state if so
276 if (solver_->param().random_seed() >= 0) {
277 // Fetch random seed and modulate by device ID to make sure
278 // everyone doesn't have the same seed. We seem to have some
279 // solver instability if we have everyone with the same seed
280 Caffe::set_random_seed(
281 solver_->param().random_seed() + solver_->param().device_id());
282 }
283 solver_->Step(solver_->param().max_iter() - initial_iter_);
284}
285
286template<typename Dtype>
287void P2PSync<Dtype>::on_start() {

Callers

nothing calls this directly

Calls 3

set_random_seedFunction · 0.85
random_seedMethod · 0.80
StepMethod · 0.80

Tested by

no test coverage detected