Merge pull request #611 from ranjan1990/SGD

little change in SGDTestFunction::Gradient()
This commit is contained in:
Ryan Curtin
2016-04-11 12:13:47 -07:00
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -54,6 +54,7 @@ Copyright:
Copyright 2016, Alexander Leinoff <alexander-leinoff@uiowa.edu>
Copyright 2016, Palash Ahuja <abhor902@gmail.com>
Copyright 2016, Yannis Mentekidis <mentekid@gmail.com>
Copyright 2016, Ranjan Mondal <ranjan.rev@gmail.com>
License: BSD-3-clause
All rights reserved.
.
+1
View File
@@ -189,6 +189,7 @@
* - Alexander Leinoff <alexander-leinoff@uiowa.edu>
* - Palash Ahuja <abhor902@gmail.com>
* - Yannis Mentekidis <mentekid@gmail.com>
* - Ranjan Mondal <ranjan.rev@gmail.com>
*/
// First, include all of the prerequisites.
@@ -41,7 +41,7 @@ void SGDTestFunction::Gradient(const arma::mat& coordinates,
if (coordinates[0] >= 0)
gradient[0] = std::exp(-coordinates[0]);
else
gradient[0] = -std::exp(coordinates[1]);
gradient[0] = -std::exp(coordinates[0]);
break;
case 1: