Skip to content

Commit

Permalink
Automated rollback of change 152048597
Browse files Browse the repository at this point in the history
Change: 152068577
  • Loading branch information
Suharsh Sivakumar authored and tensorflower-gardener committed Apr 3, 2017
1 parent 0fde061 commit 32a54fd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 43 deletions.
4 changes: 1 addition & 3 deletions tensorflow/core/ops/array_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
29 changes: 0 additions & 29 deletions tensorflow/core/ops/compat/ops_history.v1.pbtxt
Original file line number Diff line number Diff line change
Expand Up @@ -11005,35 +11005,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 {
Expand Down
4 changes: 0 additions & 4 deletions tensorflow/core/ops/ops.pbtxt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions tensorflow/python/ops/array_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion tensorflow/python/ops/hidden_ops.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ListDiff
MirrorPad
MirrorPadGrad
OneHot
OnesLike
Pack
Pad
ParallelConcat
Expand Down

0 comments on commit 32a54fd

Please sign in to comment.