From a2c479b6fd1ec75f37b8104f53a9f4a286cb72ce Mon Sep 17 00:00:00 2001 From: KB Sriram Date: Sat, 21 Jul 2018 07:57:44 -0700 Subject: Add C++ gradients for some image operators. Added gradients and tests for - ResizeBilinear - ResizeBicubic - ResizeNearestNeighbor Note: Some of the tests are for the operator itself rather than the gradient, paralleling existing tests in image_grad.py See https://github.com/tensorflow/tensorflow/issues/21019 --- tensorflow/cc/BUILD | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'tensorflow/cc/BUILD') diff --git a/tensorflow/cc/BUILD b/tensorflow/cc/BUILD index a98f0b00b2..d686ccfe29 100644 --- a/tensorflow/cc/BUILD +++ b/tensorflow/cc/BUILD @@ -121,6 +121,7 @@ cc_library( deps = [ ":array_grad", ":data_flow_grad", + ":image_grad", ":math_grad", ":nn_grad", ], @@ -331,6 +332,35 @@ tf_cc_test( ], ) +cc_library( + name = "image_grad", + srcs = ["gradients/image_grad.cc"], + deps = [ + ":cc_ops", + ":cc_ops_internal", + ":grad_op_registry", + ":gradients", + ], + alwayslink = 1, +) + +tf_cc_test( + name = "gradients_image_grad_test", + srcs = ["gradients/image_grad_test.cc"], + deps = [ + ":cc_ops", + ":grad_op_registry", + ":grad_testutil", + ":gradient_checker", + ":image_grad", + ":testutil", + "//tensorflow/core:lib_internal", + "//tensorflow/core:test", + "//tensorflow/core:test_main", + "//tensorflow/core:testlib", + ], +) + cc_library( name = "math_grad", srcs = ["gradients/math_grad.cc"], -- cgit v1.2.3