Computer-implemented method for operating an artificial neural network, ANN , which processes inputs in a sequence of layers (12a-12c, 13a-13b) to form outputs , the method comprising the following steps: • within the ANN , at least one iterative block composed of one or more layers (12a-12c) is defined , which is to be executed a number of times; • a number J of iterations is defined which is a maximum number of times this iterative block is intended to be executed; • an input of the iterative block is mapped onto an output by the iterative block ; • this output is fed to the iterative block again as input and is in turn mapped onto a new output by the iterative block ; • after the iterations of the iterative block have been completed , the output supplied by the iterative block is fed as input to the layer of the ANN following the iterative block or is provided as output of the ANN , • wherein parameters that characterize the behaviour of the layers (12a-12c) in the iterative block are defined or modulated on the basis of the output of an auxiliary ANN , which receives the following as inputs: ∘ an input of the iterative block , or ∘ a processing product formed in a layer of the ANN downstream of the iterative block , or ∘ the parameters that characterize the behaviour of the iterative block , or ∘ a continuous index of the iteration currently being executed by the iterative block , and • wherein at least the iterative block of the ANN is executed on at least one computing unit using machine instructions that exclusively access an internal memory of this computing unit. • within the ANN , at least one iterative block composed of one or more layers (12a-12c) is defined , which is to be executed a number of times; • a number J of iterations is defined which is a maximum number of times this iterative block is intended to be executed; • an input of the iterative block is mapped onto an output by the iterative block ; • this output is fed to the iterative block again as input and is in turn mapped onto a new output by the iterative block ; • after the iterations of the iterative block have been completed , the output supplied by the iterative block is fed as input to the layer of the ANN following the iterative block or is provided as output of the ANN , • wherein parameters that characterize the behaviour of the layers (12a-12c) in the iterative block are defined or modulated on the basis of the output of an auxiliary ANN , which receives the following as inputs: ∘ an input of the iterative block , or ∘ a processing product formed in a layer of the ANN downstream of the iterative block , or ∘ the parameters that characterize the behaviour of the iterative block , or ∘ a continuous index of the iteration currently being executed by the iterative block , and ∘ an input of the iterative block , or ∘ a processing product formed in a layer of the ANN downstream of the iterative block , or ∘ the parameters that characterize the behaviour of the iterative block , or ∘ a continuous index of the iteration currently being executed by the iterative block , • wherein at least the iterative block of the ANN is executed on at least one computing unit using machine instructions that exclusively access an internal memory of this computing unit. <EOS>