WhisperDecoderBlock class

Inheritance

Constructors

WhisperDecoderBlock(int embedDim, int numHeads, {Device device = Device.CPU})

Properties

attnLn → LayerNorm
final
crossAttnLn → LayerNorm
final
crossKHeads → List<Linear>
final
crossOutProj → Linear
final
crossQHeads → List<Linear>
final
crossVHeads → List<Linear>
final
embedDim → int
final
hashCode → int
The hash code for this object.
no setterinherited
headDim → int
final
kHeads → List<Linear>
final
mlp0 → Linear
final
mlp2 → Linear
final
mlpLn → LayerNorm
final
numHeads → int
final
outProj → Linear
final
qHeads → List<Linear>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
training ↔ bool
Whether this module is in training mode. Layers that behave differently between training and inference (e.g. Dropout) read this flag in their call method. Defaults to training mode.
getter/setter pairinherited
vHeads → List<Linear>
final

Methods

call(Tensor x) → Tensor
eval() → void
Put this module (and any registered submodules) into evaluation mode.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parameters() → List<Tensor>
Trainable tensors owned by this module (and its submodules).
override
primeCrossAttn(Tensor xa) → void
Pre-project encoder memory xa: [B, T_audio, C] (B == 1 in practice) into this block's cross-attention K and V. Must be called once per audio clip before call.
submodules() → List<Module>
Submodules owned by this module. Subclasses that compose other modules should override this so train() / eval() propagate. Default: empty.
inherited
toString() → String
A string representation of this object.
inherited
train() → void
Put this module (and any registered submodules) into training mode.
inherited
zeroGrad() → void
Zero every parameter's gradient. Safe to call before each backward.
inherited

Operators

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