diff --git a/tensorflow/python/ops/array_ops.py b/tensorflow/python/ops/array_ops.py index 97dc63ebb13..ba8c611f571 100644 --- a/tensorflow/python/ops/array_ops.py +++ b/tensorflow/python/ops/array_ops.py @@ -2466,14 +2466,9 @@ def where(condition, x=None, y=None, name=None): """ if x is None and y is None: with ops.name_scope(name, "Where", [condition]) as name: - # Temporarily create an old style WhereOp nodedef + Operation without the - # attribute "T". - # TODO(b/67720963): Roll this back when the issue is resolved. - condition = gen_math_ops.cast(condition, dtypes.bool) - output = gen_array_ops.where(input=condition, name=name) - if context.in_graph_mode(): - output.op._node_def.attr.clear() - return output + condition = ops.convert_to_tensor( + condition, preferred_dtype=dtypes.bool, name="condition") + return gen_array_ops.where(input=condition, name=name) elif x is not None and y is not None: return gen_math_ops._select(condition=condition, t=x, e=y, name=name) else: