Shift augments a CT sample by moving it a small, random distance along one or more spatial axes. The transformed sample remains useful while helping the model handle positional variation. section 14.6.1
The implementation stores the offset in an affine transformation matrix, creates a sampling grid with affine_grid, and resamples the tensor with grid_sample. section 14.6.1
Random offset
For each of three axes, choose a random value between -1 and 1, multiply it by augmentation_dict['offset'], and place the result in the transformation matrix.
