Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
d40e34cf
Commit
d40e34cf
authored
Jul 28, 2016
by
Davis King
Browse files
merged
parents
284ace05
3a096469
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
dlib/dnn/core.h
dlib/dnn/core.h
+8
-3
No files found.
dlib/dnn/core.h
View file @
d40e34cf
...
...
@@ -2189,10 +2189,15 @@ namespace dlib
{
std
::
vector
<
label_type
>
results
(
std
::
distance
(
data
.
begin
(),
data
.
end
()));
auto
o
=
results
.
begin
();
for
(
auto
i
=
data
.
begin
();
i
<
data
.
end
();
i
+=
batch_size
,
o
+=
batch_size
)
{
auto
end
=
std
::
min
(
i
+
batch_size
,
data
.
end
());
(
*
this
)(
i
,
end
,
o
);
auto
i
=
data
.
begin
();
auto
num_remaining
=
results
.
size
();
while
(
num_remaining
!=
0
)
{
auto
inc
=
std
::
min
(
batch_size
,
num_remaining
);
(
*
this
)(
i
,
i
+
inc
,
o
);
i
+=
inc
;
o
+=
inc
;
num_remaining
-=
inc
;
}
return
results
;
}
...
...
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