chain#
- torch_brain.data.chain(obj, allow_missing_keys=False)[source]#
Wrap an object to specify that it (or any of its members) should be stacked along the first dimension when batching. This approach is similar to PyTorch Geometric’s collate approach for graphs. This function will chain all the sequences in the batch into one large sequence. To track which sample from the batch an element of the sequence came from use
track_batch().- Parameters: