Load pre-trained model
(self)
| 392 | logger.info(f"Model saved to {self.model_path}") |
| 393 | |
| 394 | def load_model(self): |
| 395 | """Load pre-trained model""" |
| 396 | checkpoint = torch.load(self.model_path, map_location=self.device) |
| 397 | self.model.load_state_dict(checkpoint['model_state_dict']) |
| 398 | self.optimizer.load_state_dict(checkpoint['optimizer_state_dict']) |
| 399 | self.feature_mean = checkpoint['feature_mean'] |
| 400 | self.feature_std = checkpoint['feature_std'] |
| 401 | self.target_mean = checkpoint['target_mean'] |
| 402 | self.target_std = checkpoint['target_std'] |
| 403 | logger.info("Model loaded successfully") |
| 404 | |
| 405 | def get_feature_importance(self) -> Dict: |
| 406 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected