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
f00ec0cb
Commit
f00ec0cb
authored
Jul 08, 2017
by
Davis King
Browse files
Added Juha Reunanen serialize test case, but one with dlib:: in front and one
without to make sure both types of lookup work.
parent
29897305
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
dlib/test/dnn.cpp
dlib/test/dnn.cpp
+15
-0
No files found.
dlib/test/dnn.cpp
View file @
f00ec0cb
...
@@ -2487,6 +2487,20 @@ namespace
...
@@ -2487,6 +2487,20 @@ namespace
}
}
void
test_serialization
()
{
print_spinner
();
using
net_type
=
loss_mean_squared
<
fc
<
1
,
input
<
matrix
<
double
>>>>
;
net_type
net
,
net2
;
std
::
ostringstream
out
;
serialize
(
net
,
out
);
const
std
::
string
serialized
=
out
.
str
();
std
::
istringstream
in
(
serialized
);
dlib
::
deserialize
(
net2
,
in
);
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
class
dnn_tester
:
public
tester
class
dnn_tester
:
public
tester
...
@@ -2565,6 +2579,7 @@ namespace
...
@@ -2565,6 +2579,7 @@ namespace
test_loss_multiclass_per_pixel_outputs_on_trivial_task
();
test_loss_multiclass_per_pixel_outputs_on_trivial_task
();
test_loss_multiclass_per_pixel_with_noise_and_pixels_to_ignore
();
test_loss_multiclass_per_pixel_with_noise_and_pixels_to_ignore
();
test_loss_multiclass_per_pixel_weighted
();
test_loss_multiclass_per_pixel_weighted
();
test_serialization
();
}
}
void
perform_test
()
void
perform_test
()
...
...
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