this->TestLeastSquaresUpdate();
}
-TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateLROneTenth) {
+TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateLROneHundredth) {
typedef typename TypeParam::Dtype Dtype;
- const Dtype kLearningRate = 0.1;
+ const Dtype kLearningRate = 0.01;
this->TestLeastSquaresUpdate(kLearningRate);
}
TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateWithWeightDecay) {
typedef typename TypeParam::Dtype Dtype;
- const Dtype kLearningRate = 1.0;
+ const Dtype kLearningRate = 0.01;
const Dtype kWeightDecay = 0.5;
- this->TestLeastSquaresUpdate(kLearningRate, kWeightDecay);
+ const Dtype kMomentum = 0;
+ const int kNumIters = 1;
+ for (int i = 0; i <= kNumIters; ++i) {
+ this->TestLeastSquaresUpdate(kLearningRate, kWeightDecay, kMomentum, i);
+ }
+}
+
+TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateWithWeightDecayMultiIter) {
+ typedef typename TypeParam::Dtype Dtype;
+ const Dtype kLearningRate = 0.01;
+ const Dtype kWeightDecay = 0.5;
+ const Dtype kMomentum = 0;
+ const int kNumIters = 4;
+ for (int i = 0; i <= kNumIters; ++i) {
+ this->TestLeastSquaresUpdate(kLearningRate, kWeightDecay, kMomentum, i);
+ }
}
TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateWithMomentum) {
typedef typename TypeParam::Dtype Dtype;
- const Dtype kLearningRate = 1.0;
- const Dtype kWeightDecay = 0.0;
+ const Dtype kLearningRate = 0.01;
+ const Dtype kWeightDecay = 0;
const Dtype kMomentum = 0.5;
const int kNumIters = 1;
for (int i = 0; i <= kNumIters; ++i) {
TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateWithMomentumMultiIter) {
typedef typename TypeParam::Dtype Dtype;
- const Dtype kLearningRate = 1.0;
- const Dtype kWeightDecay = 0.0;
+ const Dtype kLearningRate = 0.01;
+ const Dtype kWeightDecay = 0;
const Dtype kMomentum = 0.5;
const int kNumIters = 4;
for (int i = 0; i <= kNumIters; ++i) {
TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateWithEverything) {
typedef typename TypeParam::Dtype Dtype;
const Dtype kLearningRate = 0.01;
- const Dtype kWeightDecay = 0.1;
- const Dtype kMomentum = 0.9;
+ const Dtype kWeightDecay = 0.5;
+ const Dtype kMomentum = 0.5;
const int kNumIters = 4;
for (int i = 0; i <= kNumIters; ++i) {
this->TestLeastSquaresUpdate(kLearningRate, kWeightDecay, kMomentum, i);
TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateWithEverythingAccum) {
typedef typename TypeParam::Dtype Dtype;
const Dtype kLearningRate = 0.01;
- const Dtype kWeightDecay = 0.1;
+ const Dtype kWeightDecay = 0.5;
const Dtype kMomentum = 0.9;
const int kNumIters = 4;
const int kIterSize = 2;
TYPED_TEST(SGDSolverTest, TestSnapshot) {
typedef typename TypeParam::Dtype Dtype;
const Dtype kLearningRate = 0.01;
- const Dtype kWeightDecay = 0.1;
+ const Dtype kWeightDecay = 0.5;
const Dtype kMomentum = 0.9;
const int kNumIters = 4;
for (int i = 1; i <= kNumIters; ++i) {
this->TestLeastSquaresUpdate();
}
-TYPED_TEST(AdaGradSolverTest, TestAdaGradLeastSquaresUpdateLROneTenth) {
+TYPED_TEST(AdaGradSolverTest, TestAdaGradLeastSquaresUpdateLROneHundredth) {
typedef typename TypeParam::Dtype Dtype;
- const Dtype kLearningRate = 0.1;
+ const Dtype kLearningRate = 0.01;
this->TestLeastSquaresUpdate(kLearningRate);
}
TYPED_TEST(AdaGradSolverTest, TestAdaGradLeastSquaresUpdateWithWeightDecay) {
typedef typename TypeParam::Dtype Dtype;
- const Dtype kLearningRate = 1.0;
+ const Dtype kLearningRate = 0.01;
const Dtype kWeightDecay = 0.5;
this->TestLeastSquaresUpdate(kLearningRate, kWeightDecay);
}
TYPED_TEST(AdaGradSolverTest, TestAdaGradLeastSquaresUpdateWithEverything) {
typedef typename TypeParam::Dtype Dtype;
const Dtype kLearningRate = 0.01;
- const Dtype kWeightDecay = 0.1;
- const Dtype kMomentum = 0.0;
+ const Dtype kWeightDecay = 0.5;
+ const Dtype kMomentum = 0;
const int kNumIters = 4;
for (int i = 0; i <= kNumIters; ++i) {
this->TestLeastSquaresUpdate(kLearningRate, kWeightDecay, kMomentum, i);
TYPED_TEST(AdaGradSolverTest, TestLeastSquaresUpdateWithEverythingAccum) {
typedef typename TypeParam::Dtype Dtype;
const Dtype kLearningRate = 0.01;
- const Dtype kWeightDecay = 0.1;
- const Dtype kMomentum = 0.0;
+ const Dtype kWeightDecay = 0.5;
+ const Dtype kMomentum = 0;
const int kNumIters = 4;
const int kIterSize = 2;
this->CheckAccumulation(kLearningRate, kWeightDecay, kMomentum, kNumIters,
TYPED_TEST(AdaGradSolverTest, TestSnapshot) {
typedef typename TypeParam::Dtype Dtype;
const Dtype kLearningRate = 0.01;
- const Dtype kWeightDecay = 0.1;
- const Dtype kMomentum = 0.0;
+ const Dtype kWeightDecay = 0.5;
+ const Dtype kMomentum = 0;
const int kNumIters = 4;
for (int i = 1; i <= kNumIters; ++i) {
this->TestSnapshot(kLearningRate, kWeightDecay, kMomentum, i);
this->TestLeastSquaresUpdate();
}
-TYPED_TEST(NesterovSolverTest, TestNesterovLeastSquaresUpdateLROneTenth) {
+TYPED_TEST(NesterovSolverTest, TestNesterovLeastSquaresUpdateLROneHundredth) {
typedef typename TypeParam::Dtype Dtype;
- const Dtype kLearningRate = 0.1;
+ const Dtype kLearningRate = 0.01;
this->TestLeastSquaresUpdate(kLearningRate);
}
TYPED_TEST(NesterovSolverTest, TestNesterovLeastSquaresUpdateWithWeightDecay) {
typedef typename TypeParam::Dtype Dtype;
- const Dtype kLearningRate = 1.0;
+ const Dtype kLearningRate = 0.01;
const Dtype kWeightDecay = 0.5;
this->TestLeastSquaresUpdate(kLearningRate, kWeightDecay);
}
+TYPED_TEST(NesterovSolverTest,
+ TestNesterovLeastSquaresUpdateWithWeightDecayMultiIter) {
+ typedef typename TypeParam::Dtype Dtype;
+ const Dtype kLearningRate = 0.01;
+ const Dtype kWeightDecay = 0.5;
+ const Dtype kMomentum = 0;
+ const int kNumIters = 4;
+ for (int i = 0; i <= kNumIters; ++i) {
+ this->TestLeastSquaresUpdate(kLearningRate, kWeightDecay, kMomentum, i);
+ }
+}
+
TYPED_TEST(NesterovSolverTest, TestNesterovLeastSquaresUpdateWithMomentum) {
typedef typename TypeParam::Dtype Dtype;
- const Dtype kLearningRate = 1.0;
- const Dtype kWeightDecay = 0.0;
+ const Dtype kLearningRate = 0.01;
+ const Dtype kWeightDecay = 0;
const Dtype kMomentum = 0.5;
const int kNumIters = 1;
for (int i = 0; i <= kNumIters; ++i) {
TYPED_TEST(NesterovSolverTest, TestLeastSquaresUpdateWithMomentumMultiIter) {
typedef typename TypeParam::Dtype Dtype;
- const Dtype kLearningRate = 1.0;
- const Dtype kWeightDecay = 0.0;
+ const Dtype kLearningRate = 0.01;
+ const Dtype kWeightDecay = 0;
const Dtype kMomentum = 0.5;
const int kNumIters = 4;
for (int i = 0; i <= kNumIters; ++i) {
TYPED_TEST(NesterovSolverTest, TestNesterovLeastSquaresUpdateWithEverything) {
typedef typename TypeParam::Dtype Dtype;
const Dtype kLearningRate = 0.01;
- const Dtype kWeightDecay = 0.1;
+ const Dtype kWeightDecay = 0.5;
const Dtype kMomentum = 0.9;
const int kNumIters = 4;
for (int i = 0; i <= kNumIters; ++i) {
TYPED_TEST(NesterovSolverTest, TestLeastSquaresUpdateWithEverythingAccum) {
typedef typename TypeParam::Dtype Dtype;
const Dtype kLearningRate = 0.01;
- const Dtype kWeightDecay = 0.1;
+ const Dtype kWeightDecay = 0.5;
const Dtype kMomentum = 0.9;
const int kNumIters = 4;
const int kIterSize = 2;
TYPED_TEST(NesterovSolverTest, TestSnapshot) {
typedef typename TypeParam::Dtype Dtype;
const Dtype kLearningRate = 0.01;
- const Dtype kWeightDecay = 0.1;
- const Dtype kMomentum = 0.0;
+ const Dtype kWeightDecay = 0.5;
+ const Dtype kMomentum = 0.9;
const int kNumIters = 4;
for (int i = 1; i <= kNumIters; ++i) {
this->TestSnapshot(kLearningRate, kWeightDecay, kMomentum, i);