gluonts.torch.model.wavenet.estimator module#
- class gluonts.torch.model.wavenet.estimator.WaveNetEstimator(freq: str, prediction_length: int, num_bins: int = 1024, num_residual_channels: int = 24, num_skip_channels: int = 32, dilation_depth: Optional[int] = None, num_stacks: int = 1, temperature: float = 1.0, num_feat_dynamic_real: int = 0, num_feat_static_cat: int = 0, num_feat_static_real: int = 0, cardinality: List[int] = [1], seasonality: Optional[int] = None, embedding_dimension: int = 5, use_log_scale_feature: bool = True, time_features: Optional[List[Callable[[PeriodIndex], ndarray]]] = None, lr: float = 0.001, weight_decay: float = 1e-08, train_sampler: Optional[InstanceSampler] = None, validation_sampler: Optional[InstanceSampler] = None, batch_size: int = 32, num_batches_per_epoch: int = 50, num_parallel_samples: int = 100, negative_data: bool = False, trainer_kwargs: Optional[Dict[str, Any]] = None)[source]#
Bases:
PyTorchLightningEstimator
- create_lightning_module() LightningModule [source]#
Create and return the network used for training (i.e., computing the loss).
- Returns:
The network that computes the loss given input data.
- Return type:
pl.LightningModule
- create_predictor(transformation: Transformation, module: WaveNetLightningModule) PyTorchPredictor [source]#
Create and return a predictor object.
- Parameters:
transformation – Transformation to be applied to data before it goes into the model.
module – A trained pl.LightningModule object.
- Returns:
A predictor wrapping a nn.Module used for inference.
- Return type:
- create_training_data_loader(data: Dataset, module: WaveNetLightningModule, shuffle_buffer_length: Optional[int] = None, **kwargs) Iterable [source]#
Create a data loader for training purposes.
- Parameters:
data – Dataset from which to create the data loader.
module – The pl.LightningModule object that will receive the batches from the data loader.
- Returns:
The data loader, i.e. and iterable over batches of data.
- Return type:
Iterable
- create_transformation() Transformation [source]#
Create and return the transformation needed for training and inference.
- Returns:
The transformation that will be applied entry-wise to datasets, at training and inference time.
- Return type:
- create_validation_data_loader(data: Dataset, module: WaveNetLightningModule, **kwargs) Iterable [source]#
Create a data loader for validation purposes.
- Parameters:
data – Dataset from which to create the data loader.
module – The pl.LightningModule object that will receive the batches from the data loader.
- Returns:
The data loader, i.e. and iterable over batches of data.
- Return type:
Iterable