Created
March 17, 2017 11:32
-
-
Save kris-singh/9ed1d88c781de14fd62264ce6b1dd1b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nestrov_update_policy.hpp | |
..... | |
arma::mat TempUpdate(arma::mat& iterate, | |
const double momentum, | |
arma::mat& velocity) | |
{ | |
return iterate + momentum*velocity; | |
} | |
...... | |
sgd.hpp | |
inline typename std::enable_if< | |
HasNestrovUpdate<UpdatePolicy, void&(UpdatePolicy::*)()>::value, void>::type=0> | |
void updateIterate(arma::mat& iterate){} | |
.... | |
sgd_impl.hpp | |
.... | |
inline typename std::enable_if< | |
HasNestrovUpdate<UpdatePolicy, void&(UpdatePolicy::*)()>::value, arma::mat>::type=0> | |
void updateIterate(iterate) | |
{ | |
iterate = UpdatePolicy::NestrovUpdate(iterate, momentum, velocity); | |
} | |
if (shuffle) | |
function.Gradient(iterate, visitationOrder[currentFunc | |
tion], gradient); | |
else | |
function.Gradient(iterate, currentFunction, gradient); | |
Restoreitera | |
..... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment