DefaultCollateFunction<T>
Models & Types · AiDotNet.Data.Collation
Stacks equal-size tensors into a batch tensor along dimension 0.
Implements: ICollateFunction<Tensor<T>, Tensor<T>>
How It Works
This is the default collation strategy, equivalent to PyTorch’s default_collate. All samples must have the same shape. The resulting batch tensor has shape [N, …sample_shape] where N is the number of samples.
Constructors
| Constructor | Summary |
|---|---|
DefaultCollateFunction() |
Methods
| Method | Summary |
|---|---|
Tensor<T> Collate(IReadOnlyList<Tensor<T>> samples) |