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
0e7e4330
"docs/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "57ac6738028004143cf19c362a81d7d135d1de24"
Commit
0e7e4330
authored
Nov 25, 2017
by
Davis King
Browse files
Minor changes to avoid compiler warnings.
parent
f3ecb81f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
dlib/dnn/trainer.h
dlib/dnn/trainer.h
+4
-4
dlib/test/matrix2.cpp
dlib/test/matrix2.cpp
+10
-6
No files found.
dlib/dnn/trainer.h
View file @
0e7e4330
...
@@ -705,7 +705,7 @@ namespace dlib
...
@@ -705,7 +705,7 @@ namespace dlib
test_steps_without_progress
=
0
;
test_steps_without_progress
=
0
;
// Empty out some of the previous loss values so that test_steps_without_progress
// Empty out some of the previous loss values so that test_steps_without_progress
// will decrease below test_iter_without_progress_thresh.
// will decrease below test_iter_without_progress_thresh.
for
(
int
cnt
=
0
;
cnt
<
test_previous_loss_values_dump_amount
+
test_iter_without_progress_thresh
/
10
&&
test_previous_loss_values
.
size
()
>
0
;
++
cnt
)
for
(
unsigned
long
cnt
=
0
;
cnt
<
test_previous_loss_values_dump_amount
+
test_iter_without_progress_thresh
/
10
&&
test_previous_loss_values
.
size
()
>
0
;
++
cnt
)
test_previous_loss_values
.
pop_front
();
test_previous_loss_values
.
pop_front
();
}
}
}
}
...
@@ -825,7 +825,7 @@ namespace dlib
...
@@ -825,7 +825,7 @@ namespace dlib
steps_without_progress
=
0
;
steps_without_progress
=
0
;
// Empty out some of the previous loss values so that steps_without_progress
// Empty out some of the previous loss values so that steps_without_progress
// will decrease below iter_without_progress_thresh.
// will decrease below iter_without_progress_thresh.
for
(
int
cnt
=
0
;
cnt
<
previous_loss_values_dump_amount
+
iter_without_progress_thresh
/
10
&&
previous_loss_values
.
size
()
>
0
;
++
cnt
)
for
(
unsigned
long
cnt
=
0
;
cnt
<
previous_loss_values_dump_amount
+
iter_without_progress_thresh
/
10
&&
previous_loss_values
.
size
()
>
0
;
++
cnt
)
previous_loss_values
.
pop_front
();
previous_loss_values
.
pop_front
();
}
}
}
}
...
@@ -1281,8 +1281,8 @@ namespace dlib
...
@@ -1281,8 +1281,8 @@ namespace dlib
std
::
atomic
<
bool
>
updated_net_since_last_sync
;
std
::
atomic
<
bool
>
updated_net_since_last_sync
;
bool
sync_file_reloaded
;
bool
sync_file_reloaded
;
int
previous_loss_values_dump_amount
;
unsigned
long
previous_loss_values_dump_amount
;
int
test_previous_loss_values_dump_amount
;
unsigned
long
test_previous_loss_values_dump_amount
;
};
};
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
dlib/test/matrix2.cpp
View file @
0e7e4330
...
@@ -27,12 +27,8 @@ namespace
...
@@ -27,12 +27,8 @@ namespace
dlib
::
rand
rnd
;
dlib
::
rand
rnd
;
void
matrix_test
(
void
matrix_test
1
(
)
)
/*!
ensures
- runs tests on the matrix stuff compliance with the specs
!*/
{
{
typedef
memory_manager_stateless
<
char
>::
kernel_2_2a
MM
;
typedef
memory_manager_stateless
<
char
>::
kernel_2_2a
MM
;
print_spinner
();
print_spinner
();
...
@@ -739,6 +735,13 @@ namespace
...
@@ -739,6 +735,13 @@ namespace
}
}
}
void
matrix_test2
(
)
{
typedef
memory_manager_stateless
<
char
>::
kernel_2_2a
MM
;
{
{
srand
(
423452
);
srand
(
423452
);
const
long
M
=
10
;
const
long
M
=
10
;
...
@@ -1145,7 +1148,8 @@ namespace
...
@@ -1145,7 +1148,8 @@ namespace
void
perform_test
(
void
perform_test
(
)
)
{
{
matrix_test
();
matrix_test1
();
matrix_test2
();
}
}
}
a
;
}
a
;
...
...
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