MCPcopy Create free account
hub / github.com/AgriQuantAI/AgriQuant-AI / load_model

Method load_model

lstm_predictor.py:394–403  ·  view source on GitHub ↗

Load pre-trained model

(self)

Source from the content-addressed store, hash-verified

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 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected