gluonts.nursery.spliced_binned_pareto.distr_tcn module

class gluonts.nursery.spliced_binned_pareto.distr_tcn.DistributionalTCN(in_channels: int, out_channels: int, kernel_size: int, channels: int, layers: int, bias: bool = True, fwd_time: bool = True, output_distr=Normal(loc: tensor([0.]), scale: tensor([1.])))[source]

Bases: torch.nn.modules.module.Module

Distributional Temporal Convolutional Network: a TCN to learn a time-varying distribution.

Composed of a sequence of causal convolution blocks.

Takes as input a three-dimensional tensor (B, C, L) where B is the batch size, C is the number of input channels, and L is the length of the input. Outputs a three-dimensional tensor (B, C_out, L).

Parameters
  • in_channels – Number of input channels, typically the dimensionality of the time series

  • out_channels – Number of output channels, typically the number of parameters in the time series distribution

  • kernel_size – Kernel size of the applied non-residual convolutions.

  • channels – Number of channels processed in the network and of output channels, typically equal to out_channels for simplicity, expand for better performance.

  • layers – Depth of the network.

  • bias – If True, adds a learnable bias to the convolutions.

  • fwd_time – If True the network is the relation relation if from past to future (forward), if False, the relation from future to past (backward).

  • output_distr – Distribution whose parameters will be specified by the network output

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training = None