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
9540ca23
Commit
9540ca23
authored
Aug 03, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added operator<< for the DNN solvers.
parent
aafde206
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
solvers.h
dlib/dnn/solvers.h
+12
-0
solvers_abstract.h
dlib/dnn/solvers_abstract.h
+15
-0
No files found.
dlib/dnn/solvers.h
View file @
9540ca23
...
...
@@ -119,6 +119,12 @@ namespace dlib
deserialize
(
item
.
momentum
,
in
);
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
sgd
&
item
)
{
out
<<
"sgd: weight_decay="
<<
item
.
get_weight_decay
()
<<
", momentum="
<<
item
.
get_momentum
();
return
out
;
}
private
:
template
<
typename
layer_type
>
...
...
@@ -294,6 +300,12 @@ namespace dlib
deserialize
(
item
.
t
,
in
);
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
adam
&
item
)
{
out
<<
"adam: weight_decay="
<<
item
.
get_weight_decay
()
<<
", momentum1="
<<
item
.
get_momentum1
()
<<
", momentum2="
<<
item
.
get_momentum2
();
return
out
;
}
private
:
template
<
typename
layer_type
>
...
...
dlib/dnn/solvers_abstract.h
View file @
9540ca23
...
...
@@ -64,6 +64,11 @@ namespace dlib
provides serialization support
!*/
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
EXAMPLE_SOLVER
&
item
);
/*!
Prints the solver's name and parameters to out.
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
@@ -121,6 +126,11 @@ namespace dlib
provides serialization support
!*/
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
sgd
&
item
);
/*!
Prints the solver's name and parameters to out.
!*/
// ----------------------------------------------------------------------------------------
class
adam
...
...
@@ -181,6 +191,11 @@ namespace dlib
provides serialization support
!*/
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
adam
&
item
);
/*!
Prints the solver's name and parameters to out.
!*/
// ----------------------------------------------------------------------------------------
}
...
...
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