aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/cc/gradients/nn_grad_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/cc/gradients/nn_grad_test.cc')
-rw-r--r--tensorflow/cc/gradients/nn_grad_test.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/tensorflow/cc/gradients/nn_grad_test.cc b/tensorflow/cc/gradients/nn_grad_test.cc
index f9a512f29e..affc1e1dbe 100644
--- a/tensorflow/cc/gradients/nn_grad_test.cc
+++ b/tensorflow/cc/gradients/nn_grad_test.cc
@@ -122,6 +122,14 @@ TEST_F(NNGradTest, SeluGrad) {
RunTest(x, x_init_value, y, shape);
}
+TEST_F(NNGradTest, L2LossGrad) {
+ TensorShape x_shape({5, 2});
+ TensorShape y_shape({1});
+ auto x = Placeholder(scope_, DT_FLOAT, Placeholder::Shape(x_shape));
+ auto y = L2Loss(scope_, x);
+ RunTest(x, x_shape, y, y_shape);
+}
+
TEST_F(NNGradTest, BiasAddGradHelper) {
TensorShape shape({4, 5});
TensorShape bias_shape({5});