Skip to content

Commit

Permalink
get type from self
Browse files Browse the repository at this point in the history
Signed-off-by: Lyaction <guocfly@gmail.com>
  • Loading branch information
Lyaction committed Apr 12, 2024
1 parent 9091425 commit e919f74
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tensorflow/python/ops/kv_variable_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,9 +743,7 @@ def sparse_read(self, indices, name=None, ev_init_value=None, counts=None):
default_value = ev_init_value
is_use_default_value_tensor = True
else:
from tensorflow.python.ops import variable_scope
default_type = variable_scope.get_variable_scope().dtype
default_value = ops.convert_to_tensor(1.0, dtype=default_type)
default_value = ops.convert_to_tensor(1.0, dtype=self.dtype)
is_use_default_value_tensor = False
if counts != None:
value = gen_kv_variable_ops.kv_resource_gather_v1(self._handle,
Expand Down

0 comments on commit e919f74

Please sign in to comment.