Skip to content

Commit

Permalink
Remove dead code in saving lib
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdangerw committed Mar 30, 2024
1 parent 104fe8e commit 06391e0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions keras/saving/saving_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ def load_weights_only(model, filepath, skip_mismatch=False):
Note: only supports h5 for now.
"""
temp_dir = None
archive = None
filepath = str(filepath)
if filepath.endswith(".weights.h5"):
Expand All @@ -262,8 +261,6 @@ def load_weights_only(model, filepath, skip_mismatch=False):
error_msgs=error_msgs,
)
weights_store.close()
if temp_dir and file_utils.exists(temp_dir):
file_utils.rmtree(temp_dir)
if archive:
archive.close()

Expand Down

0 comments on commit 06391e0

Please sign in to comment.