shivamjadhav commited on
Commit
d31e714
·
2 Parent(s): 3a3df03 9328f0f

Merge branch 'main' of https://huggingface.co/spaces/shivamjadhav/albert_latest_96

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