This is the code for the PyTorch
extension for 3D Slicer.
Its main function is to install PyTorch inside Slicer. The latest version compatible with the installed drivers will be selected automatically. CI tests are run nightly.
PyTorch can be installed opening the PyTorch Utils
module and clicking on the button, or programmatically:
import PyTorchUtils
torch = PyTorchUtils.PyTorchUtilsLogic().torch # will be installed if necessary
tensor = torch.rand(50, 60)
Unit tests are run nightly and the results can be checked on CDash.
Here's a diagram of the integration between PyTorch and Slicer: