emmi_inference.models.pipelines.sparse_tensor_offset

WARNING This file is a 1:1 duplicate from the tutorial folder.

It is here to avoid installation of a tutorial as a package and keep it isolated.

Classes

SparseTensorOffsetCollator

Collates sparse tensors by concatenating them along the first axis and creating an offset tensor that maps

Module Contents

class emmi_inference.models.pipelines.sparse_tensor_offset.SparseTensorOffsetCollator(item, offset_key)

Collates sparse tensors by concatenating them along the first axis and creating an offset tensor that maps each sample to its respective index in the batch.

Parameters:
item
offset_key