emmi_inference.models.pipelines.concat_tensor_precollator

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

ConcatTensorPreCollator

Concatenates multiple tensors into a single tensor.

Module Contents

class emmi_inference.models.pipelines.concat_tensor_precollator.ConcatTensorPreCollator(items, target_key, dim=0)

Bases: ksuit.data.pipeline.SampleProcessor

Concatenates multiple tensors into a single tensor.

Parameters:
  • items (list[str]) – A list of keys in the sample dict whose tensors should be concatenated.

  • target_key (str) – The key in the sample dict where the concatenated tensor will be stored.

  • dim (int) – The dimension along which to concatenate the tensors. Defaults to 0.

items
target_key
dim = 0