Loads a trained model from a .pth file.
(self, model_path)
| 39 | self.model.to(self.device) |
| 40 | |
| 41 | def load_model(self, model_path): |
| 42 | """Loads a trained model from a .pth file.""" |
| 43 | self.model.load_state_dict(torch.load(model_path, weights_only=True)) |
| 44 | self.model.eval() |
| 45 | |
| 46 | @staticmethod |
| 47 | def decode_token(token): |
nothing calls this directly
no outgoing calls
no test coverage detected