Remove tf.mul, tf.neg and tf.sub from the public API

Change: 144384783
This commit is contained in:
Andrew Selle 2017-01-12 16:13:55 -08:00 committed by TensorFlower Gardener
parent 2b495e972e
commit 78b11cef0c
3 changed files with 9 additions and 9 deletions

View File

@ -65,7 +65,7 @@ def l1_regularizer(scale, scope=None):
my_scale = ops.convert_to_tensor(scale,
dtype=weights.dtype.base_dtype,
name='scale')
return standard_ops.mul(
return standard_ops.multiply(
my_scale,
standard_ops.reduce_sum(standard_ops.abs(weights)),
name=name)

View File

@ -2075,7 +2075,7 @@ class ControlFlowTest(test.TestCase):
y = constant_op.constant(2.0, name="y")
c = lambda x: math_ops.less(x, 100.0)
b = lambda x: math_ops.mul(x, y)
b = lambda x: math_ops.multiply(x, y)
rx = control_flow_ops.while_loop(c, b, [x])
rg = gradients_impl.gradients(rx, y)[0]

View File

@ -362,10 +362,10 @@ multiply.__doc__ = gen_math_ops._mul.__doc__.replace("Mul", "`tf.multiply`")
@deprecated(
"2016-12-30",
"`tf.mul(x, y)` is deprecated, please use `tf.multiply(x, y)` or `x * y`")
def mul(x, y, name=None):
def _mul(x, y, name=None):
return gen_math_ops._mul(x, y, name)
mul.__doc__ = (gen_math_ops._mul.__doc__
+ ("" if mul.__doc__ is None else mul.__doc__))
_mul.__doc__ = (gen_math_ops._mul.__doc__
+ ("" if _mul.__doc__ is None else _mul.__doc__))
def subtract(x, y, name=None):
@ -377,10 +377,10 @@ subtract.__doc__ = gen_math_ops._sub.__doc__.replace("`Sub`", "`tf.subtract`")
@deprecated(
"2016-12-30",
"`tf.sub(x, y)` is deprecated, please use `tf.subtract(x, y)` or `x - y`")
def sub(x, y, name=None):
def _sub(x, y, name=None):
return gen_math_ops._sub(x, y, name)
sub.__doc__ = (gen_math_ops._sub.__doc__
+ ("" if sub.__doc__ is None else sub.__doc__))
_sub.__doc__ = (gen_math_ops._sub.__doc__
+ ("" if _sub.__doc__ is None else _sub.__doc__))
# pylint: disable=g-docstring-has-escape
@ -411,7 +411,7 @@ def negative(x, name=None):
@deprecated(
"2016-12-30",
"`tf.neg(x)` is deprecated, please use `tf.negative(x)` or `-x`")
def neg(x, name=None):
def _neg(x, name=None):
"""Computes numerical negative value element-wise.
I.e., \\(y = -x\\).