utils¶
Helper functions for PyTorch forecasting
Functions
|
Apply function to a list of objects or directly if passed value is not a list. |
|
Computes the autocorrelation of samples at dimension |
|
Create boolean masks of shape len(lenghts) x size. |
|
Detach object |
|
Determine empirically good embedding sizes (formula taken from fastai). |
|
Groupby apply for torch tensors |
|
Create histogram of integers in predefined range |
|
Move object to device. |
|
Returns the next largest number |
|
Stack tensors along first dimension and pad them along last dimension to ensure their size is equal. |
|
Profile a given function with |
|
Convert value or list to list of values. |
|
Unpack RNN sequence. |
|
Unsqueeze last dimensions of tensor to match another tensor's number of dimensions. |
Classes
MixIn to give namedtuple some access capabilities of a dictionary |