aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/kernel_tests/resource_variable_ops_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/kernel_tests/resource_variable_ops_test.py')
-rw-r--r--tensorflow/python/kernel_tests/resource_variable_ops_test.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tensorflow/python/kernel_tests/resource_variable_ops_test.py b/tensorflow/python/kernel_tests/resource_variable_ops_test.py
index c739cd2c0d..b1ef46f2a1 100644
--- a/tensorflow/python/kernel_tests/resource_variable_ops_test.py
+++ b/tensorflow/python/kernel_tests/resource_variable_ops_test.py
@@ -835,6 +835,12 @@ class ResourceVariableOpsTest(test_util.TensorFlowTestCase):
state_ops.scatter_add(v, [1], [3])
self.assertAllEqual([1.0, 5.0], v.numpy())
+ def testScatterSubStateOps(self):
+ with context.eager_mode():
+ v = resource_variable_ops.ResourceVariable([1.0, 2.0], name="sub")
+ state_ops.scatter_sub(v, [1], [3])
+ self.assertAllEqual([1.0, -1.0], v.numpy())
+
def testScatterNdAddStateOps(self):
with context.eager_mode():
v = resource_variable_ops.ResourceVariable(