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
7 years ago
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added operator<< for the DNN solvers.
parent
aafde206
Hide 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
...
@@ -119,6 +119,12 @@ namespace dlib
deserialize
(
item
.
momentum
,
in
);
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
:
private
:
template
<
typename
layer_type
>
template
<
typename
layer_type
>
...
@@ -294,6 +300,12 @@ namespace dlib
...
@@ -294,6 +300,12 @@ namespace dlib
deserialize
(
item
.
t
,
in
);
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
:
private
:
template
<
typename
layer_type
>
template
<
typename
layer_type
>
...
...
This diff is collapsed.
Click to expand it.
dlib/dnn/solvers_abstract.h
View file @
9540ca23
...
@@ -64,6 +64,11 @@ namespace dlib
...
@@ -64,6 +64,11 @@ namespace dlib
provides serialization support
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
...
@@ -121,6 +126,11 @@ namespace dlib
provides serialization support
provides serialization support
!*/
!*/
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
sgd
&
item
);
/*!
Prints the solver's name and parameters to out.
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
class
adam
class
adam
...
@@ -181,6 +191,11 @@ namespace dlib
...
@@ -181,6 +191,11 @@ namespace dlib
provides serialization support
provides serialization support
!*/
!*/
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
adam
&
item
);
/*!
Prints the solver's name and parameters to out.
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
}
}
...
...
This diff is collapsed.
Click to expand it.
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