encode method
Returns image.imageTokens, config.text.hiddenSize projected rows,
ready for Lfm3Model.forward's embeddingOverrides. capture gets owned
snapshots after embedding norm, each layer and projection.
Implementation
Float32List encode(
VisionImageInput image, {
void Function(String stage, Float32List rows)? capture,
}) {
Float32List? result;
for (final (stage, rows) in _stages(image)) {
capture?.call(stage, Float32List.fromList(rows));
result = rows;
}
return result!;
}