@@ -394,6 +394,26 @@ TYPED_TEST(NeuronLayerTest, TestExpGradient) {
394
394
this ->TestExpGradient (kBase , kScale , kShift );
395
395
}
396
396
397
+ TYPED_TEST (NeuronLayerTest, TestExpLayerWithShift) {
398
+ typedef typename TypeParam::Dtype Dtype;
399
+ // Test default base of "-1" -- should actually set base := e,
400
+ // with a non-zero shift
401
+ const Dtype kBase = -1 ;
402
+ const Dtype kScale = 1 ;
403
+ const Dtype kShift = 1 ;
404
+ this ->TestExpForward (kBase , kScale , kShift );
405
+ }
406
+
407
+ TYPED_TEST (NeuronLayerTest, TestExpGradientWithShift) {
408
+ typedef typename TypeParam::Dtype Dtype;
409
+ // Test default base of "-1" -- should actually set base := e,
410
+ // with a non-zero shift
411
+ const Dtype kBase = -1 ;
412
+ const Dtype kScale = 1 ;
413
+ const Dtype kShift = 1 ;
414
+ this ->TestExpGradient (kBase , kScale , kShift );
415
+ }
416
+
397
417
TYPED_TEST (NeuronLayerTest, TestExpLayerBase2) {
398
418
typedef typename TypeParam::Dtype Dtype;
399
419
const Dtype kBase = 2 ;
0 commit comments