Torch Utiliy Functions

Torch Utiliy Functions#

jolideco.utils.torch Module#

Functions#

convolve_fft_torch(image, kernel)

Convolve FFT for torch tensors

view_as_overlapping_patches_torch(image, shape)

View tensor as overlapping rectangular patches

view_as_random_overlapping_patches_torch(...)

View tensor as randomly ("jittered") overlapping rectangular patches

view_as_windows_torch(image, shape, stride)

View tensor as overlapping rectangular windows

interp1d_torch(x, xp, fp, **kwargs)

Linear interpolation

grid_weights(x, y, x0, y0)

Compute 4-pixel weights such that centroid is preserved.

get_default_generator(device)

Get default torch generator

Variables#

TORCH_DEFAULT_DEVICE

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str