Skip to content
Merged
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
9 changes: 7 additions & 2 deletions tensorflow/python/ops/kv_variable_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,11 +530,16 @@ def _init_from_proto(self, variable_def, import_scope=None):
cache_op = op
elif self._initializer_op.type == "InitializeKvVariableOp":
init_op = self._initializer_op

self._init_op_for_restore = g.as_graph_element(
if variable_def.initialize_op_for_restore:
self._init_op_for_restore = g.as_graph_element(
ops.prepend_name_scope(
variable_def.initialize_op_for_restore,
import_scope=import_scope))
else: #Backward compatibility with 2306
self._init_op_for_restore = g.as_graph_element(
ops.prepend_name_scope(
variable_def.initializer_name,
import_scope=import_scope))
self._trainable = getattr(variable_def, "trainable", True)
if variable_def.snapshot_name:
self._cached_value = g.as_graph_element(
Expand Down