Update utils.py
Browse files
utils.py
CHANGED
@@ -17,7 +17,7 @@ logger = logging
|
|
17 |
|
18 |
def load_checkpoint(checkpoint_path, model, optimizer=None):
|
19 |
assert os.path.isfile(checkpoint_path)
|
20 |
-
checkpoint_dict = torch.load(checkpoint_path, map_location='cpu')
|
21 |
iteration = checkpoint_dict['iteration']
|
22 |
learning_rate = checkpoint_dict['learning_rate']
|
23 |
if optimizer is not None:
|
|
|
17 |
|
18 |
def load_checkpoint(checkpoint_path, model, optimizer=None):
|
19 |
assert os.path.isfile(checkpoint_path)
|
20 |
+
checkpoint_dict = torch.load(checkpoint_path, map_location='cpu', weights_only=True)
|
21 |
iteration = checkpoint_dict['iteration']
|
22 |
learning_rate = checkpoint_dict['learning_rate']
|
23 |
if optimizer is not None:
|