ForwardResult class
A graph's raw output for one input: a flat, row-major buffer plus its tensor shape.
shape is one of two layouts a graph can hand back — see
pooling.dart's meanPoolAndNormalize for how each is turned into a
single embedding vector:
[1, dim]— already pooled by the engine (e.g. a LiteRT compiled model whose graph itself produces one vector per input). Treated as a pass-through.[1, seq, dim]— per-token hidden states. Mean-pooled over theseqaxis (optionally respecting an attention mask) before normalizing.
Constructors
Properties
-
attentionMask
→ List<
int> ? -
The effective attention mask over this result's
seqaxis, when the graph knows one (design D-T3's silent-regression fix). ArunTokensthat pads a fixed-shape graph MUST pad ids/mask/type-ids together and echo the padded mask here, so the masked mean-pool excludes exactly the padding it added — never the tokenizer's mask, which describes the UNPADDED input. One over a dynamic-shape graph (no padding) may pass the input mask through unchanged or omit it — finalizeEmbedding's caller then falls back to the tokenizer's mask.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
shape
→ List<
int> -
Tensor shape, e.g.
[1, dim]or[1, seq, dim].final -
values
→ List<
double> -
Flat, row-major buffer.
values.length == shape.reduce((a, b) => a * b).final
Methods
-
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