model_to¶
tiatoolbox.models.models_abc.model_to
- model_to(model, device='cpu')[source]¶
Transfers model to cpu/gpu.
- Parameters:
model (torch.nn.Module) – PyTorch defined model.
device (str) – Transfers model to the specified device. Default is “cpu”.
- Returns:
The model after being moved to cpu/gpu.
- Return type: