Don't eval after load

This commit is contained in:
Andras Schmelczer 2024-09-01 22:10:31 +01:00
commit a5d74c650c
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
3 changed files with 2303 additions and 2257 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -51,7 +51,6 @@ def load_model(path: Path, device: torch.device) -> Tuple[nn.Module, Dict[str, A
device=device, device=device,
) )
model.load_state_dict(torch.load(model_path)) model.load_state_dict(torch.load(model_path))
model.eval()
logging.info(f"Parameter count: {sum(p.numel() for p in model.parameters())}") logging.info(f"Parameter count: {sum(p.numel() for p in model.parameters())}")
return model, hyperparameters return model, hyperparameters