eurocropsml.dataset.base.LabelledData.from_tensor_dictΒΆ

classmethod LabelledData.from_tensor_dict(tensors: dict[str, Tensor]) LabelledDataΒΆ

Create Labelled data instance from dict of tensors.

Parameters:

tensors – Dictionary of tensors to create LabelledData from.

Returns:

The LabelledData containing the tensors from the dictionary.

Raises:

KeyError – If tensors do not contain β€œdata” or β€œlabel”