Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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