dgs.utils.state.collate_list_of_history¶
- dgs.utils.state.collate_list_of_history(batch: State | list[State] | list[list[State]]) list[State][source]¶
Collate function used to combine the data returned in the format of a class:ImageHistoryDataset.
With
Ndetections, a batch of data containsNlists, each withL+1States. This functions collates thei-th State of each of theNlists into a single list of States of lengthL+1.- Parameters:
batch – Either a single list with
L+1Statesor a list containingNlist, each containingL+1States. A single State is also supported, even though, this shouldn’t really be feasible.- Returns:
A list of States. Because there can be a different number of detections, every State can still have a different number of items.