File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
tensorflow/python/training Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -443,7 +443,8 @@ def _set_checkpoint_initializer(variable,
443443 is_partitioned_ev = variable ._save_slice_info is not None
444444 partition_id = variable ._save_slice_info .var_offset [0 ] if is_partitioned_ev else 0
445445 partition_num = variable ._save_slice_info .full_shape [0 ] if is_partitioned_ev else 1
446- with ops .control_dependencies ([variable ._initializer_op ]):
446+ restore_dependency = ops .get_collection (ops .GraphKeys .EMBEDDING_VARIABLE_RESTORE_DEPENDENCY )[0 ]
447+ with ops .control_dependencies (restore_dependency [variable ._primary_handle ]):
447448 rank = variable .initial_value .get_shape ().rank - 1
448449 restore_op = gen_kv_variable_ops .kv_resource_import_v3 (
449450 ckpt_file ,
You can’t perform that action at this time.
0 commit comments