noether.data.pipeline.sample_processors.concat_tensor¶
Classes¶
Concatenates multiple tensors into a single tensor. |
Module Contents¶
- class noether.data.pipeline.sample_processors.concat_tensor.ConcatTensorSampleProcessor(items, target_key, dim=0)¶
Bases:
noether.data.pipeline.SampleProcessorConcatenates multiple tensors into a single tensor.
# dummy example processor = ConcatTensorSampleProcessor(items=["image_part1", "image_part2"], target_key="full_image", dim=0) input_sample = { "image_part1": torch.randn(3, 224, 224), "image_part2": torch.randn(3, 224, 224), } output_sample = processor(input_sample) # output_sample['full_image'] will be a tensor of shape (6, 224, 224)
- Parameters:
- items¶
- target_key¶
- dim = 0¶