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
6e6a7cfe
Commit
6e6a7cfe
authored
May 07, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added an overload of net_to_xml() that takes a string filename.
parent
87bc664b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
utilities.h
dlib/dnn/utilities.h
+11
-0
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