diff options
author | Suharsh Sivakumar <suharshs@google.com> | 2017-04-03 14:47:34 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-04-03 16:07:58 -0700 |
commit | 32a54fd9deab1b05121ee409c2e0ef7353c2902d (patch) | |
tree | 16ae31e5e4ac084cf8a1f4db8ce35813096347d2 | |
parent | 0fde061980f7c3dc88215bba616303c3057c3fb9 (diff) |
Automated rollback of change 152048597
Change: 152068577
-rw-r--r-- | tensorflow/core/ops/array_ops.cc | 4 | ||||
-rw-r--r-- | tensorflow/core/ops/compat/ops_history.v1.pbtxt | 29 | ||||
-rw-r--r-- | tensorflow/core/ops/ops.pbtxt | 4 | ||||
-rw-r--r-- | tensorflow/python/ops/array_ops.py | 12 | ||||
-rw-r--r-- | tensorflow/python/ops/hidden_ops.txt | 1 |
5 files changed, 7 insertions, 43 deletions
diff --git a/tensorflow/core/ops/array_ops.cc b/tensorflow/core/ops/array_ops.cc index 1362eba85c..6930af48a7 100644 --- a/tensorflow/core/ops/array_ops.cc +++ b/tensorflow/core/ops/array_ops.cc @@ -612,9 +612,7 @@ y: a tensor of the same shape and type as x but filled with zeros. REGISTER_OP("OnesLike") .Input("x: T") .Output("y: T") - .Attr( - "T: {uint8, half, float, double, int8, int16, int32, int64, complex64, " - "complex128}") + .Attr("T: {float, double, int32, int64, complex64, complex128}") .SetShapeFn(shape_inference::UnchangedShape) .Doc(R"doc( Returns a tensor of ones with the same shape and type as x. diff --git a/tensorflow/core/ops/compat/ops_history.v1.pbtxt b/tensorflow/core/ops/compat/ops_history.v1.pbtxt index 562bbe41d3..2af4e8692b 100644 --- a/tensorflow/core/ops/compat/ops_history.v1.pbtxt +++ b/tensorflow/core/ops/compat/ops_history.v1.pbtxt @@ -11006,35 +11006,6 @@ op { } } op { - name: "OnesLike" - input_arg { - name: "x" - type_attr: "T" - } - output_arg { - name: "y" - type_attr: "T" - } - attr { - name: "T" - type: "type" - allowed_values { - list { - type: DT_UINT8 - type: DT_HALF - type: DT_FLOAT - type: DT_DOUBLE - type: DT_INT8 - type: DT_INT16 - type: DT_INT32 - type: DT_INT64 - type: DT_COMPLEX64 - type: DT_COMPLEX128 - } - } - } -} -op { name: "Pack" input_arg { name: "values" diff --git a/tensorflow/core/ops/ops.pbtxt b/tensorflow/core/ops/ops.pbtxt index fab9ad8ba0..8cea2b239e 100644 --- a/tensorflow/core/ops/ops.pbtxt +++ b/tensorflow/core/ops/ops.pbtxt @@ -11892,12 +11892,8 @@ op { type: "type" allowed_values { list { - type: DT_UINT8 - type: DT_HALF type: DT_FLOAT type: DT_DOUBLE - type: DT_INT8 - type: DT_INT16 type: DT_INT32 type: DT_INT64 type: DT_COMPLEX64 diff --git a/tensorflow/python/ops/array_ops.py b/tensorflow/python/ops/array_ops.py index 3122f8be2d..60057b9ab1 100644 --- a/tensorflow/python/ops/array_ops.py +++ b/tensorflow/python/ops/array_ops.py @@ -1427,12 +1427,12 @@ def ones_like(tensor, dtype=None, name=None, optimize=True): """ with ops.name_scope(name, "ones_like", [tensor]) as name: tensor = ops.convert_to_tensor(tensor, name="tensor") - if dtype is not None and tensor.dtype != dtype: - ret = ones(shape_internal(tensor, optimize=optimize), dtype, name=name) - ret.set_shape(tensor.get_shape()) - return ret - else: - return gen_array_ops._ones_like(tensor, name=name) + ones_shape = shape_internal(tensor, optimize=optimize) + if dtype is None: + dtype = tensor.dtype + ret = ones(ones_shape, dtype=dtype, name=name) + ret.set_shape(tensor.get_shape()) + return ret def ones(shape, dtype=dtypes.float32, name=None): diff --git a/tensorflow/python/ops/hidden_ops.txt b/tensorflow/python/ops/hidden_ops.txt index ee8f359258..fbfd7bb7d6 100644 --- a/tensorflow/python/ops/hidden_ops.txt +++ b/tensorflow/python/ops/hidden_ops.txt @@ -12,7 +12,6 @@ ListDiff MirrorPad MirrorPadGrad OneHot -OnesLike Pack Pad ParallelConcat |