Merge pull request #611 from ranjan1990/SGD
little change in SGDTestFunction::Gradient()
This commit is contained in:
@@ -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.
|
||||
.
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user