Class BatchLongestSizeProvider
Gets the size of the biggest sequence.
Implements
Inherited Members
Namespace: Unity.InferenceEngine.Tokenization.Padding
Assembly: Unity.InferenceEngine.Tokenization.dll
Syntax
public class BatchLongestSizeProvider : IPaddingSizeProvider
Methods
GetPaddingSize(IReadOnlyList<int>)
Computes the size of the padded sequence of tokens.
Declaration
public int GetPaddingSize(IReadOnlyList<int> sizes)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<int> | sizes | The size of all the sequences of tokens to pad. |
Returns
| Type | Description |
|---|---|
| int | The size of the padded sequence of tokens. |