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
7c991b18
Commit
7c991b18
authored
Oct 18, 2015
by
Davis King
Browse files
Options
Browse Files
Download
Plain Diff
merged
parents
1569d590
c1da9dc9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
core.h
dlib/dnn/core.h
+1
-1
loss.h
dlib/dnn/loss.h
+2
-2
trainer.h
dlib/dnn/trainer.h
+5
-5
use_cpp_11.cmake
dlib/use_cpp_11.cmake
+1
-0
No files found.
dlib/dnn/core.h
View file @
7c991b18
...
...
@@ -1511,7 +1511,7 @@ namespace dlib
// ==================================================================
// first validate the way the parameter gradients are computed
for
(
long
i
=
0
;
i
<
params_grad
.
size
();
++
i
)
for
(
unsigned
long
i
=
0
;
i
<
params_grad
.
size
();
++
i
)
{
layer_details_type
l1
(
l
);
...
...
dlib/dnn/loss.h
View file @
7c991b18
...
...
@@ -35,7 +35,7 @@ namespace dlib
DLIB_CASSERT
(
output_tensor
.
num_samples
()
%
sample_expansion_factor
==
0
,
""
);
const
float
*
out_data
=
output_tensor
.
host
();
for
(
unsigned
long
i
=
0
;
i
<
output_tensor
.
num_samples
();
++
i
)
for
(
long
i
=
0
;
i
<
output_tensor
.
num_samples
();
++
i
)
{
*
iter
++
=
out_data
[
i
];
}
...
...
@@ -67,7 +67,7 @@ namespace dlib
double
loss
=
0
;
const
float
*
out_data
=
output_tensor
.
host
();
float
*
g
=
grad
.
host
();
for
(
unsigned
long
i
=
0
;
i
<
output_tensor
.
num_samples
();
++
i
)
for
(
long
i
=
0
;
i
<
output_tensor
.
num_samples
();
++
i
)
{
const
float
y
=
*
truth
++
;
DLIB_CASSERT
(
y
==
+
1
||
y
==
-
1
,
"y: "
<<
y
);
...
...
dlib/dnn/trainer.h
View file @
7c991b18
...
...
@@ -123,7 +123,7 @@ namespace dlib
{
running_stats
<
double
>
rs
;
unsigned
long
j
=
0
;
size_t
j
=
0
;
// Load two tensors worth of data at once so we can overlap the computation
// and data transfer between the host and the device.
...
...
@@ -140,7 +140,7 @@ namespace dlib
j
+=
mini_batch_size
;
}
unsigned
long
i
=
0
;
size_t
i
=
0
;
using
namespace
std
::
chrono
;
auto
last_time
=
system_clock
::
now
();
while
(
i
<
data
.
size
())
...
...
@@ -211,7 +211,7 @@ namespace dlib
for
(
unsigned
long
epoch_iteration
=
0
;
epoch_iteration
<
num_epochs
;
++
epoch_iteration
)
{
running_stats
<
double
>
rs
;
unsigned
long
j
=
0
;
size_t
j
=
0
;
// Load two tensors worth of data at once so we can overlap the computation
// and data transfer between the host and the device.
...
...
@@ -228,7 +228,7 @@ namespace dlib
j
+=
mini_batch_size
;
}
unsigned
long
i
=
0
;
size_t
i
=
0
;
using
namespace
std
::
chrono
;
auto
last_time
=
system_clock
::
now
();
while
(
i
<
data
.
size
())
...
...
@@ -318,7 +318,7 @@ namespace dlib
}
unsigned
long
num_epochs
;
unsigned
long
mini_batch_size
;
size_t
mini_batch_size
;
bool
verbose
;
net_type
net
;
...
...
dlib/use_cpp_11.cmake
View file @
7c991b18
...
...
@@ -39,6 +39,7 @@ else()
if
(
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_rvalue_references;"
AND
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_variadic_templates;"
AND
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_lambdas;"
AND
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_defaulted_move_initializers;"
AND
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_auto_type;"
)
set
(
COMPILER_CAN_DO_CPP_11 1
)
# Set which standard to use unless someone has already set it to something
...
...
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