Spaces:
Running
Running
Update classifier/Albert_latest.py
Browse files
classifier/Albert_latest.py
CHANGED
@@ -11,7 +11,7 @@ class Model:
|
|
11 |
checkpoint = torch.load(model_weights, map_location=self.device)
|
12 |
|
13 |
# Load the model's state dictionary
|
14 |
-
self.model.load_state_dict(checkpoint['model_state_dict'])
|
15 |
self.currepoch = checkpoint['epoch']
|
16 |
self.loss = checkpoint['loss']
|
17 |
print(f"Loaded model state: Current epoch {self.currepoch}, current loss {self.loss}")
|
|
|
11 |
checkpoint = torch.load(model_weights, map_location=self.device)
|
12 |
|
13 |
# Load the model's state dictionary
|
14 |
+
self.model.load_state_dict(checkpoint['model_state_dict'],strict=False)
|
15 |
self.currepoch = checkpoint['epoch']
|
16 |
self.loss = checkpoint['loss']
|
17 |
print(f"Loaded model state: Current epoch {self.currepoch}, current loss {self.loss}")
|