WeightBiasDelayMixin¶
- class WeightBiasDelayMixin(weight: Tensor, bias: Tensor | None, delay: Tensor | None, requires_grad=False)[source]¶
Bases:
WeightBiasMixinMixin for connections with weights, biases, and delays.
- Parameters:
weight (torch.Tensor) – initial connection weights.
bias (torch.Tensor) – initial connection biases, if any.
delay (torch.Tensor) – initial connection delays, if any.
requires_grad (bool, optional) – if the parameters created require gradients. Defaults to
False.
Caution
This must be added to a class which inherits from
Module, and the constructor for this mixin must be called after the module constructor.Note
This registers a parameter
weight_. If eitherbiasordelayis not None, parametersbias_anddelay_are created respectively.- property delay: Parameter | None¶
Learnable connection delays.
- Parameters:
value (torch.Tensor | nn.Parameter) – new delays.
- Returns:
present delays, if any.
- Return type:
nn.Parameter | None