load_torch_model¶
- load_torch_model(model, weights)[source]¶
Helper function to load a torch model.
- Parameters:
model (torch.nn.Module) – A torch model.
weights (str or Path) – Path to pretrained weights.
- Returns:
Torch model with pretrained weights loaded on CPU.
- Return type: