DualLSTMLayer class

A Multi-Timeline Long Short-Term Memory (MT-LSTM) layer.

This is a custom, hierarchical recurrent layer designed to capture dependencies across multiple, distinct timescales within a single sequence.

It operates on two levels:

  1. A Lower Tier that processes the input at every single timestep, capturing high-frequency, short-term patterns.
  2. A Higher Tier that runs at a slower "clock speed." It only updates after a block of lower-tier steps, allowing it to learn low-frequency, long-term trends by processing aggregated information.

A key feature is the feedback mechanism, where the state of the higher-tier memory is fed back as a context to the lower tier at every step. This allows the long-term trend to influence the processing of short-term data.

Inheritance

Constructors

DualLSTMLayer(int hiddenSize, {int lowerTierClockCycle = 7})

Properties

hashCode int
The hash code for this object.
no setterinherited
hb_c Tensor<Vector>
getter/setter pair
hb_f Tensor<Vector>
getter/setter pair
hb_i Tensor<Vector>
getter/setter pair
hb_o Tensor<Vector>
getter/setter pair
hiddenSize int
final
hW_c Tensor<Matrix>
getter/setter pair
hW_f Tensor<Matrix>
getter/setter pair
hW_i Tensor<Matrix>
getter/setter pair
hW_o Tensor<Matrix>
getter/setter pair
lb_c Tensor<Vector>
getter/setter pair
lb_f Tensor<Vector>
getter/setter pair
lb_i Tensor<Vector>
getter/setter pair
lb_o Tensor<Vector>
getter/setter pair
lowerTierClockCycle int
final
lW_c Tensor<Matrix>
getter/setter pair
lW_f Tensor<Matrix>
getter/setter pair
lW_i Tensor<Matrix>
getter/setter pair
lW_o Tensor<Matrix>
getter/setter pair
name String
A user-friendly name for the layer (e.g., 'dense', 'lstm').
getter/setter pairoverride-getter
parameters List<Tensor>
A list of all trainable tensors (weights and biases) in the layer.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(Tensor input) → void
Initializes the layer's parameters based on the shape of the first input.
override
call(Tensor input) Tensor
The public, callable interface for the layer.
inherited
forward(Tensor input) Tensor<Vector>
The core logic of the layer's transformation.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited