PackedSequenceBatch<T>
Models & Types · AiDotNet.Data.Collation
Represents a batch of packed (non-padded) variable-length sequences.
Constructors
| Constructor | Summary |
|---|---|
PackedSequenceBatch(Tensor<T> data, int[] lengths, int[] sortedIndices) |
Creates a new packed sequence batch. |
Properties
| Property | Summary |
|---|---|
Tensor<T> Data { get; } |
The flat tensor containing all sequence data concatenated. |
int BatchSize { get; } |
Number of sequences in the batch. |
int[] Lengths { get; } |
The length of each sequence in the batch (in sorted order). |
int[] SortedIndices { get; } |
Maps sorted position back to original sample index. |