Utils
Training and Testing
Training a reconstruction model can be done using the Trainer class, which can be easily customized to fit your needs.
Trainer class for training a reconstruction network. |
|
Trainer class for training a reconstruction network using adversarial learning. |
We also provide train and test functions that can be used to train and test a model with a single call.
Alias function for training a model using |
|
Tests a reconstruction model (algorithm or network). |
Plotting
We provide some plotting functions that are adapted to inverse problems.
Plots a list of images. |
|
Plots the metrics of a Plug-and-Play algorithm. |
|
Plot the parameters of the model before and after training. |
|
Plots a list of images with zoomed-in insets extracted from the images. |
|
Plots and animates a list of image sequences. |
|
Plots an orthogonal view of 3D images. |
TensorList
The TensorList class is a wrapper around a list of tensors. It can be used to represent signals or measurements that are naturally better represented as a list of tensors of different sizes, rather than a single tensor. TensorLists can be added, multiplied by a scalar, concatenated, etc., in a similar fashion to torch.tensor.
Represents a list of |
We also provide functions to quickly create TensorLists of zeros, ones, or random values.
Returns a |
|
Returns a |
|
Returns a |
|
Returns a |
Other
Returns the GPU device with the most free memory. |
|
Load an image from a URL and return a torch.Tensor. |
|
Load an image from a file and return a torch.Tensor. |
|
Demo MRI reconstruction model for use in relevant examples. |