Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
339ac50d
Commit
339ac50d
authored
Apr 27, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed double counting of mini-batches for the purposes of solver termination
when multiple GPUs are used.
parent
0f180a68
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
trainer.h
dlib/dnn/trainer.h
+3
-1
No files found.
dlib/dnn/trainer.h
View file @
339ac50d
...
...
@@ -513,8 +513,10 @@ namespace dlib
for
(
size_t
i
=
0
;
i
<
devices
.
size
();
++
i
)
losses
[
i
]
=
std
::
async
(
std
::
launch
::
async
,[
&
,
i
](){
return
compute_parameter_gradients
(
i
,
next_job
,
pick_which_run_update
);
});
// aggregate loss values from all the network computations.
double
theloss
=
0
;
for
(
auto
&&
loss
:
losses
)
record_loss
(
loss
.
get
());
theloss
+=
loss
.
get
();
record_loss
(
theloss
/
losses
.
size
());
// Now, if there is more than one active device we need to synchronize the
// gradient updates between devices. So we do that now.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment