|
pulsatrix
|
Batch assembly – Batch, CollateFn, DefaultCollate. More...
#include <functional>#include <vector>#include "pulsatrix/dataset.hpp"#include "pulsatrix/device_backend.hpp"#include "pulsatrix/tensor.hpp"

Go to the source code of this file.
Classes | |
| struct | pulsatrix::Batch |
| One collated batch: one stacked Tensor per Sample field position. More... | |
Namespaces | |
| namespace | pulsatrix |
Typedefs | |
| using | pulsatrix::CollateFn = std::function< Batch(std::vector< Sample >, DeviceBackend *)> |
| A function assembling a list of Samples into one Batch – pulsatrix's analogue of PyTorch's collate_fn. The standard extension point for ragged/variable-length modalities (text padding, variable-length audio): a caller-supplied CollateFn replacing DefaultCollate, not a subclass hierarchy. | |
Functions | |
| Batch | pulsatrix::DefaultCollate (std::vector< Sample > samples, DeviceBackend *backend) |
| Stacks a list of samples into one Batch, field-by-field, via Tensor::Stack – pulsatrix's default CollateFn (PyTorch's default_collate analogue). | |
Batch assembly – Batch, CollateFn, DefaultCollate.