Skip to content

Commit f1ea609

Browse files
zoyahavtfx-copybara
authored andcommitted
Switch from the deprecated tensor.experimental_ref() to tensor.ref() (available since TF 2.2).
PiperOrigin-RevId: 506389439
1 parent 09dd451 commit f1ea609

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorflow_transform/tf_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def hashable_tensor_or_op(tensor_or_op):
321321
value for other types.
322322
"""
323323
if isinstance(tensor_or_op, tf.Tensor):
324-
return tensor_or_op.experimental_ref()
324+
return tensor_or_op.ref()
325325
if isinstance(tensor_or_op, composite_tensor.CompositeTensor):
326326
return _CompositeTensorRef(
327327
type_spec=tf.type_spec_from_value(tensor_or_op),

0 commit comments

Comments
 (0)