A non-transitory machine-readable memory medium on which is stored a computer program for computing and memory resource-conserving semantic segmentation of image data of an imaging sensor using an artificial neural network, the artificial neural network including an encoder path and a decoder path, the computer program, when executed by a computer, causing the computer to perform the following steps:
- dividing an input tensor into at least one first slice tensor and at least one second slice tensor as a function of a division function, the input tensor being dependent on the image data;
- outputting the at least one first slice tensor to the decoder path of the artificial neural network;
- connecting the at least one first slice tensor to the at least one second slice tensor as a function of a connecting function to obtain an output tensor;
- and
- outputting the output tensor to the encoder path of the neural network.