Skip to content

Commit

Permalink
Cast ev initial value
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 e919f74 commit 23298f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensorflow/python/ops/kv_variable_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ def sparse_read(self, indices, name=None, ev_init_value=None, counts=None):
if self._trainable:
tape.variable_accessed(self)
if ev_init_value is not None:
default_value = ev_init_value
default_value = math_ops.cast(ev_init_value, self.dtype)
is_use_default_value_tensor = True
else:
default_value = ops.convert_to_tensor(1.0, dtype=self.dtype)
Expand Down

0 comments on commit 23298f3

Please sign in to comment.