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
6e6a7cfe
Commit
6e6a7cfe
authored
May 07, 2017
by
Davis King
Browse files
Added an overload of net_to_xml() that takes a string filename.
parent
87bc664b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
dlib/dnn/utilities.h
dlib/dnn/utilities.h
+11
-0
dlib/dnn/utilities_abstract.h
dlib/dnn/utilities_abstract.h
+15
-0
No files found.
dlib/dnn/utilities.h
View file @
6e6a7cfe
...
...
@@ -6,6 +6,7 @@
#include "core.h"
#include "utilities_abstract.h"
#include "../geometry.h"
#include <fstream>
namespace
dlib
{
...
...
@@ -111,6 +112,16 @@ namespace dlib
out
.
precision
(
old_precision
);
}
template
<
typename
net_type
>
void
net_to_xml
(
const
net_type
&
net
,
const
std
::
string
&
filename
)
{
std
::
ofstream
fout
(
filename
);
net_to_xml
(
net
,
fout
);
}
// ----------------------------------------------------------------------------------------
namespace
impl
...
...
dlib/dnn/utilities_abstract.h
View file @
6e6a7cfe
...
...
@@ -56,6 +56,21 @@ namespace dlib
stream.
!*/
template
<
typename
net_type
>
void
net_to_xml
(
const
net_type
&
net
,
const
std
::
string
&
filename
);
/*!
requires
- net_type is an object of type add_layer, add_loss_layer, add_skip_layer, or
add_tag_layer.
- All layers in the net must provide to_xml() functions.
ensures
- This function is just like the above net_to_xml(), except it writes to a file
rather than an ostream.
!*/
// ----------------------------------------------------------------------------------------
template
<
typename
net_type
>
...
...
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