trw.transforms.resize

Module Contents

Functions

resize_torch(array, size, mode)

resize_numpy(array, size, mode)

resize(array, size, mode='linear')

Resize the array

trw.transforms.resize.resize_torch(array, size, mode)
trw.transforms.resize.resize_numpy(array, size, mode)
trw.transforms.resize.resize(array, size, mode='linear')

Resize the array

Parameters
  • array – a N-dimensional tensor, representing 1D to 3D data (3 to 5 dimensional data with dim 0 for the samples and dim 1 for filters)

  • size – a (N-2) list to which the array will be upsampled or downsampled

  • mode – string among (‘nearest’, ‘linear’) specifying the resampling method

Returns

a resized N-dimensional tensor