Commit 72fbed20 authored by Davis King's avatar Davis King

Made it so you can say sgd(weight_decay) to construct a sgd object.

parent 9ca26760
...@@ -14,9 +14,9 @@ namespace dlib ...@@ -14,9 +14,9 @@ namespace dlib
{ {
public: public:
sgd( explicit sgd(
float weight_decay_, float weight_decay_,
float momentum_ float momentum_ = 0.9
) )
{ {
weight_decay = weight_decay_; weight_decay = weight_decay_;
......
...@@ -103,9 +103,9 @@ namespace dlib ...@@ -103,9 +103,9 @@ namespace dlib
- #get_momentum() == 0.9 - #get_momentum() == 0.9
!*/ !*/
sgd( explicit sgd(
float weight_decay, float weight_decay,
float momentum float momentum = 0.9
); );
/*! /*!
requires requires
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment