pulsatrix
Loading...
Searching...
No Matches
text_collate.hpp
Go to the documentation of this file.
1
5#pragma once
6
8
9namespace pulsatrix {
10
28[[nodiscard]] CollateFn PadCollate(float pad_index = 0.0f);
29
30} // namespace pulsatrix
Batch assembly – Batch, CollateFn, DefaultCollate.
Definition acquisition_functions.hpp:16
std::function< Batch(std::vector< Sample >, DeviceBackend *)> CollateFn
A function assembling a list of Samples into one Batch – pulsatrix's analogue of PyTorch's collate_fn...
Definition collate.hpp:30
CollateFn PadCollate(float pad_index=0.0f)
Builds a CollateFn that right-pads variable-length token sequences (sample.fields[0],...