diff options
author | 2017-01-11 09:35:14 -0800 | |
---|---|---|
committer | 2017-01-11 09:48:10 -0800 | |
commit | be270ecb79c8548a0caddf67908189e6169b1472 (patch) | |
tree | c6a1b72479dcac3c3ece17b7cf5ddfdfe04e5b8d /tensorflow/contrib/labeled_tensor | |
parent | d4a9d91bc68ffa9f0148ae6fe344b7d3e3de7221 (diff) |
Deprecate tf.neg, tf.mul, tf.sub (and remove math_ops.{neg,mul,sub} usages
tf.negative, tf.multiply, tf.subtract are the new names
- Also enabled deprecation warning (to be completely removed by friday)
Change: 144215355
Diffstat (limited to 'tensorflow/contrib/labeled_tensor')
-rw-r--r-- | tensorflow/contrib/labeled_tensor/python/ops/core.py | 6 | ||||
-rw-r--r-- | tensorflow/contrib/labeled_tensor/python/ops/core_test.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tensorflow/contrib/labeled_tensor/python/ops/core.py b/tensorflow/contrib/labeled_tensor/python/ops/core.py index cd590f9ffd..214e21aa19 100644 --- a/tensorflow/contrib/labeled_tensor/python/ops/core.py +++ b/tensorflow/contrib/labeled_tensor/python/ops/core.py @@ -1096,7 +1096,7 @@ def define_unary_op(op_name, elementwise_function): abs_function = define_unary_op('abs', math_ops.abs) -neg = define_unary_op('neg', math_ops.neg) +neg = define_unary_op('neg', math_ops.negative) sign = define_unary_op('sign', math_ops.sign) reciprocal = define_unary_op('reciprocal', math_ops.reciprocal) square = define_unary_op('square', math_ops.square) @@ -1171,8 +1171,8 @@ def define_binary_op(op_name, elementwise_function): add = define_binary_op('add', math_ops.add) -sub = define_binary_op('sub', math_ops.sub) -mul = define_binary_op('mul', math_ops.mul) +sub = define_binary_op('sub', math_ops.subtract) +mul = define_binary_op('mul', math_ops.multiply) div = define_binary_op('div', math_ops.div) mod = define_binary_op('mod', math_ops.mod) pow_function = define_binary_op('pow', math_ops.pow) diff --git a/tensorflow/contrib/labeled_tensor/python/ops/core_test.py b/tensorflow/contrib/labeled_tensor/python/ops/core_test.py index 19cc85cb41..1f4a3ef568 100644 --- a/tensorflow/contrib/labeled_tensor/python/ops/core_test.py +++ b/tensorflow/contrib/labeled_tensor/python/ops/core_test.py @@ -703,7 +703,7 @@ class CoreUnaryOpsTest(Base, DocStringCheckMixin, UnaryOpsTestsMixin): self.ops = [ ('abs', operator.abs, math_ops.abs, core.abs_function), - ('neg', operator.neg, math_ops.neg, core.neg), + ('neg', operator.neg, math_ops.negative, core.neg), # TODO(shoyer): add unary + to core TensorFlow ('pos', None, None, None), ('sign', None, math_ops.sign, core.sign), @@ -780,8 +780,8 @@ class CoreBinaryOpsTest(Base, DocStringCheckMixin, BinaryOpsTestsMixin): # elementwise for LabeledTensor, either. self.ops = [ ('add', operator.add, math_ops.add, core.add), - ('sub', operator.sub, math_ops.sub, core.sub), - ('mul', operator.mul, math_ops.mul, core.mul), + ('sub', operator.sub, math_ops.subtract, core.sub), + ('mul', operator.mul, math_ops.multiply, core.mul), ('div', operator.truediv, math_ops.div, core.div), ('mod', operator.mod, math_ops.mod, core.mod), ('pow', operator.pow, math_ops.pow, core.pow_function), |