Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

Move convert_to_tensor, convert_to_tensor_v1, convert_to_tensor_v1_with_dispatch, convert_to_tensor_v2_with_dispatch, and convert_to_tensor_v2 into tensor_conversion_registry. #389

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mesh_tensorflow/tpu_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

# pylint: disable=g-direct-tensorflow-import
from tensorflow.python.framework import ops
from tensorflow.python.framework import tensor_conversion_registry
from tensorflow.python.framework import tensor_conversion
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import gen_resource_variable_ops

Expand Down Expand Up @@ -224,7 +224,7 @@ def _tensor_conversion(var, dtype=None, name=None, as_ref=False):
return var._dense_var_to_tensor(dtype=dtype, name=name, as_ref=as_ref) # pylint: disable=protected-access


tensor_conversion_registry.register_tensor_conversion_function(
tensor_conversion.register_tensor_conversion_function(
ReplicatedVariable, _tensor_conversion)

if not TF_23:
Expand Down