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
7b26b2d1
Commit
7b26b2d1
authored
Aug 05, 2017
by
Davis King
Browse files
Made dnn_trainer print the network size when logged to an iostream.
parent
8b21c89e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
dlib/dnn/trainer.h
dlib/dnn/trainer.h
+6
-0
No files found.
dlib/dnn/trainer.h
View file @
7b26b2d1
...
...
@@ -1275,6 +1275,12 @@ namespace dlib
using
std
::
endl
;
out
<<
"dnn_trainer details:
\n
"
;
out
<<
" net_type::num_layers: "
<<
net_type
::
num_layers
<<
endl
;
// figure out how big the net is in MB.
std
::
ostringstream
sout
;
net_type
temp
=
trainer
.
get_net
();
// make a copy so that we can clean it without mutating the trainer's net.
temp
.
clean
();
serialize
(
temp
,
sout
);
out
<<
" net size: "
<<
sout
.
str
().
size
()
/
1024.0
/
1024.0
<<
"MB"
<<
endl
;
out
<<
" net architecture hash: "
<<
md5
(
cast_to_string
(
trainer
.
get_net
()))
<<
endl
;
out
<<
" loss: "
<<
trainer
.
get_net
().
loss_details
()
<<
endl
;
...
...
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