shivamjadhav commited on
Commit
9328f0f
·
verified ·
1 Parent(s): 39fd91a

Update classifier/Albert_latest.py

Browse files
Files changed (1) hide show
  1. classifier/Albert_latest.py +1 -1
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}")