Helper functions for PyTorch forecasting
Functions
autocorrelation(input[, dim])
autocorrelation
Computes the autocorrelation of samples at dimension dim.
dim
get_embedding_size(n)
get_embedding_size
groupby_apply(keys, values[, bins, …])
groupby_apply
Groupby apply for torch tensors
integer_histogram(data[, min, max])
integer_histogram
Create histogram of integers in predefined range
next_fast_len(size)
next_fast_len
Returns the next largest number n >= size whose prime factors are all 2, 3, or 5.
n >= size
padded_stack(tensors[, side, mode, value])
padded_stack
Stack tensors along first dimension and pad them along last dimension to ensure their size is equal.
profile(function, profile_fname[, filter, …])
profile
Profile a given function with vmprof.
vmprof
unpack_sequence(sequence)
unpack_sequence
Unpack RNN sequence.