Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Load checkpoint on the correct device (#146)
### Description Although CAREamics should be run on the GPU, users might want to use CPU to perform some tasks, such as prediction using trained network. This currently leads to issues when the model was trained on the GPU: #145. This PR simply fixes that issue by detecting the current device. - **What**: Add device parameter in `torch.load` function call. - **Why**: Fixing #145 so that a CPU-only user can use a pre-trained network. ### Changes Made - **Modified**: `model_io_utils.py`. ### Related Issues - Fixes #145. --- **Please ensure your PR meets the following requirements:** - [x] Code builds and passes tests locally, including doctests - [x] Pre-commit passes
- Loading branch information