Skip to main content

class_marker_output_indices

Function class_marker_output_indices 

Source
pub(crate) fn class_marker_output_indices<M: ClassMarker>(
    markers: &[M],
    orig_len: usize,
) -> Vec<usize>
Expand description

The output-sequence position of each marker (in Vec order) for an input of length orig_len, without materialising any tensor. Mirrors the placement in insert_class_markers — useful for reading a class token back out.