METHOD, DEVICE AND COMPUTER PROGRAM FOR OPERATING A DEEP NEURAL NETWORK
Patent Information
- Application Number
- DE502020009889
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-04-09
- Filing Date
- 2020-03-24
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2040-03-24
AI Technical Summary
Deep neural networks on mobile devices face challenges in energy efficiency and memory usage, leading to high latency and suboptimal performance due to the need to execute all layers, which is not feasible with limited energy budgets.
The method involves selectively activating only the necessary layers of a deep neural network through bridging connections, allowing for partial or sequential execution, which dynamically adjusts the network's depth based on energy requirements, thereby reducing unnecessary computations and memory usage.
This approach enhances energy efficiency, reduces memory requirements, and lowers latency by allowing parallel processing of layers, resulting in more reliable and faster processing of input variables while maintaining accurate results.
Description
Technical field
[0001] The invention relates to a method for operating a deep neural network. The invention also relates to a device and a computer program, each configured to execute the method. State of the art
[0002] In their publication "The streaming rollout of deep networks—towards fully model-parallel execution" in Advances in Neural Information Processing Systems (pp. 4043–4054), authors Fischer, V., Köhler, J., and Pfeil, T. disclose a method for operating deep neural networks in a fully parallel manner. DE 20 2018 104 373 discloses a device for executing a method in which a machine learning system is assigned a predefinable control pattern that characterizes a sequence according to which layers of the machine learning system determine their intermediate values.
[0003] Teerapittayanon S. et al: "BranchyNet: Fast inference via early exiting from deep neural networks", 2016 23RD INTERNATIONAL CONFERENCE ON PATTERN RECOGNITION (ICPR), IEEE, December 4, 2016 (2016-12-04), DOI: 10.1109 / ICPR.2016.7900006, introduces BranchyNet, a new deep neural network architecture extended with additional lateral classification branches.
[0004] Since mobile devices typically have limited energy budgets, it is desirable to minimize energy consumption when operating deep neural networks on these devices. The advantage of the method according to the invention is that the deep neural networks are executed at least partially sequentially to be energy-efficient while still delivering accurate results. A further advantage of the method according to the invention is that a deep neural network executed sequentially requires less memory than multiple deep neural networks optimized for specific (energy or time) budgets. An advantage of at least partially sequential execution of the deep neural network is a low latency from input to output signals. The initial "rough" result is then refined by adding further pathways. Disclosure of the invention
[0005] In a first aspect of the invention, a method, particularly a computer-implemented method, for operating a deep neural network with at least one bridging connection according to independent claim 1 is presented. The method includes, among other things, the following steps: selecting a first path that characterizes a sequence of layers along at least a portion of a predefinable sequence of layers of the deep neural network using the bridging connection; determining an output variable by propagating an input variable along the first path; and checking whether the output variable meets a predefinable criterion. If the predefinable criterion is not met, a further path through the deep neural network is selected that differs from the first path, e.g., one that is at least one layer longer than the first path.Preferably, the second path differs from the first path in that the sequence of layers in the second path includes at least one layer of the deep neural network not contained in the first path, in particular in addition to the layers of the first path. The input variable is then propagated along the second path. It is also conceivable that paths of equal length are chosen by the deep neural network if its architecture allows for paths of equal length.
[0006] The skip connection connects one of the layers of the deep neural network to another, in particular subsequent, layer in the predefinable sequence in which the layers of the deep neural network are arranged one after the other.
[0007] The next layer is not, in the specified sequence, an immediately subsequent layer of the layer with the bridging connection.
[0008] The path, in particular a signal propagation path, characterizes an uninterrupted, forward-directed sequence of multiple layers of the deep neural network. That is, the path characterizes how these multiple layers of the deep neural network are sequentially connected to propagate the input through the deep neural network, starting at an input layer (the layer of the deep neural network that receives the input) and ending at an output layer (the layer that outputs the output).
[0009] It should be noted that the layers forming each path determine their intermediate value only as a function of at least one intermediate value provided to them by at least one of the (immediately) preceding connected layers of that path. It should further be noted that a layer of the respective path that is connected to more than one preceding layer in the sequence of layers of the deep neural network determines its intermediate value only as a function of the immediately preceding intermediate value determined by the immediately preceding connected layer along that path. An intermediate value is understood to be an output value of the layer, whereby this output value is provided as an input value to the subsequent connected layer.
[0010] Propagation along the path means that the input variable is processed by the deep neural network along the defined sequence of layers of this path.
[0011] The advantage of this approach is that it saves energy when operating the deep neural network, as not all layers of the network are required; only the layers corresponding to the respective paths are used. Another advantage is that energy consumption can be dynamically controlled, depending on which of the possible paths the deep neural network takes. Consequently, the depth of the deep neural network can be dynamically adjusted according to predefined conditions to ensure more reliable processing of the input.
[0012] It is proposed that when propagating the input variable along the paths, those layers of the neural network that are not required for the respective path used are deactivated and are only activated when that layer is required for the respective path.
[0013] Disabled layers can be understood as those that do not need to be loaded from memory and therefore do not consume any additional computer resources. If the deep neural network is implemented purely in hardware, a disabled layer can be understood as the corresponding hardware module of that layer not performing any computational operations, even if, for example, suitable data is available at the module.
[0014] By deactivating this layer, the respective computational operations are not executed. This allows the deep neural network to process the input in a particularly energy-efficient manner.
[0015] Furthermore, it is proposed that when propagating along the second path, those layers by which the second path differs from the first path determine their intermediate values. It is further proposed that, when propagating along the second path, those layers of the second path that are connected to more than one previous layer in the deep neural network and were also included in the first path determine their intermediate values based on a provided intermediate value of the immediately preceding connected layer of the second path and a previously provided intermediate value of the immediately preceding connected layer of the first path. Advantageously, the previously provided intermediate value is reused, i.e., not recalculated.
[0016] The previously provided intermediate size is the intermediate size that was provided to this layer when propagating the input size along the first path.
[0017] It should be noted that layers connected to more than one previous layer can also use their intermediate values with previously determined intermediate values obtained along the first path, for example using a mathematical operation like mean(), max(), add(), concat().
[0018] The advantage here is that unnecessary recalculation of intermediate values for the same input variable can be avoided, thus enabling even more economical use of the available, limited resources.
[0019] Furthermore, it is proposed that the output variable is determined by simultaneously propagating the input variable of the deep neural network along the first and second paths. The common layers of the first and second paths can be executed exactly once on exactly one computing unit. The common layers are those layers whose respective positions in the predefined sequence of the deep neural network's layers correspond to the same positions in the sequence of layers of the first path and in the sequence of layers of the second path.
[0020] Preferably, the intermediate sizes of those layers of the remaining layers that are contained in both sequences of layers of the first and second path and each have different positions in the sequences of layers of the first and in the second path are determined by repeatedly executing these layers, depending on the previously provided intermediate size, which was used in the first determination of the intermediate size according to the earlier position of the different positions of the respective layer, and the provided intermediate size according to the later position of the different positions of the respective layer.
[0021] The layers of the first and second paths each determine their intermediate value sequentially on a processing unit, according to their position within a sequence of layers of the respective path. For this purpose, each layer of each selected path can be assigned a point in time from a sequence of points in time at which the respective layer determines its intermediate value based on a provided intermediate value. Layers connected to more than one preceding layer can be assigned multiple different points in time. These points in time are the times at which the layers execute their calculations on a processing unit. Furthermore, it is proposed that the sequence of points in time begins when the output value is determined, and at the respective current points in time, all layers of the selected paths to which the corresponding point in time is assigned determine their intermediate values.Layers connected to more than one preceding layer determine their respective intermediate values at the current time points corresponding to their assigned, distinct time points. These intermediate values are based on the values available to them up to that point, particularly those from previous time points. Each time an output value is determined, the predefined criterion is checked. If the criterion is not met, the processing of the layers continues at the respective subsequent time points until the next output value is generated.
[0022] It should be noted that the layers of the selected paths, to which the same time point was assigned, simultaneously determine their intermediate values. This has the advantageous effect of allowing these layers to be executed in parallel, thus speeding up the process.
[0023] The allocation of time points can be carried out in such a way that at each immediately subsequent time point, the immediately following connected layer determines its intermediate size according to the path, depending on the determined intermediate size of the preceding connected layer.
[0024] This can be described as decoupling the dependencies between the layers, since a layer connected to more than one preceding layer does not have to wait until all required intermediate values are available. Therefore, it can be described as operating all paths simultaneously.
[0025] Because the neural network only has forward connections, the layers are no longer needed after their intermediate size has been determined, and advantageously, multiple input variables can be provided to the input layer at one time and propagated through the deep neural network. This allows not only the pathways to operate in parallel, but also the input variables to be processed in parallel by the deep neural network.
[0026] Advantageously, each layer is executed on its own dedicated processing unit, particularly on parallelized hardware. This allows for efficient operation, as the method, as explained above, utilizes resources efficiently, and the parallelized operation of the layers also enables efficient execution of individual calculations.
[0027] Another advantage is that parallel operation of the layers allows for a higher throughput of the input variables being processed. This is because, while one input variable is being propagated through the deep neural network, other input variables can already be propagated. This reduces the time interval between outputs compared to conventional deep neural network operation, and allows more input variables to be processed within the same timeframe.
[0028] Advantageously, the parameters and activations of the deep neural network are quantized, with the first path being the shortest path through the deep neural network.
[0029] Furthermore, it is proposed that each path of the deep neural network be trained separately and / or that at least a group of paths be trained together.
[0030] The advantage here is that by optimizing multiple paths in parallel, it can be ensured that the intermediate values of the individual paths do not degenerate, as can happen when the entire deep neural network is trained.
[0031] Another advantage is that after such training, the deep neural network becomes more robust against the failure of a path or layer, since the paths were trained separately.
[0032] Once the criterion is met, a control variable is determined based on the output of the deep neural network. This control variable is used to control an actuator of a technical system. The technical system can be at least a semi-autonomous machine, a semi-autonomous vehicle, a robot, a tool, a machine tool, or an aircraft such as a drone.
[0033] In a further aspect of the invention, it is proposed that the input variable of the deep neural network is a quantity that has been detected by means of a sensor. The sensor value is then propagated along the respective paths through the deep neural network.
[0034] In a further aspect, a computer program is proposed. This computer program is configured to execute one of the aforementioned methods. The computer program includes instructions that cause a computer to execute one of these methods, including all its steps, when the computer program is running on the computer. Furthermore, a machine-readable memory module is proposed on which the computer program is stored. Finally, a device is proposed that is configured to execute one of the methods. Exemplary embodiments of the above aspects are illustrated in the accompanying drawings and explained in more detail in the following description.
[0035] This shows: Brief description of the drawings
[0036] Fig. 1 a schematic representation of a deep neural network with a plurality of paths through this deep neural network; Fig. 2 a schematic representation of a parallelized execution of the paths; Fig. 3 a schematic representation of an embodiment of a method for operating the deep neural network; Fig. 4 a schematic representation of an embodiment of a robot which uses the method for operating the deep neural network.
[0037] Figure 1 Figure 1 shows a schematic representation of a deep neural network (10) which determines an output variable (y) depending on an input variable (x). In one embodiment of the deep neural network (10), the deep neural network (10) determines a classification (y) of an image (x) depending on the image (x). In an alternative embodiment, the deep neural network (10) determines a regression (y) depending on the input variable (x).
[0038] As in Figure 1 As shown, the deep neural network (10) is structured by a plurality of layers (11) that are interconnected via connections (12). It should be noted that at least two layers can also be connected in parallel.
[0039] The layer that receives the input variable (x) is referred to below as the input layer, and the layer that outputs the output variable (y) is referred to below as the output layer. The connections (12) can be weighted to provide the weighted intermediate values of the respective layers to the respective connected subsequent layer.
[0040] Each layer comprises a plurality of neurons, each with a predefinable activation function. Alternatively, at least one of the layers is configured as a convolutional layer. In addition, the deep neural network (10) in this embodiment has two bridging connections (13a, 13b). The first bridging connection (13a) connects the immediately following layer of the input layer to the output layer. This means that an intermediate value determined by the input layer is forwarded to both its immediately following layer and the output layer. The second bridging connection (13b) connects the input layer directly to the output layer.
[0041] Due to the bridging connections (13a, 13b), several pathways (10a, 10b, 10c) through the deep neural network (10) can be determined. This is in Figure 1shown to the right of the schematically depicted deep neural network (10).
[0042] A first path (10a) through the deep neural network (10) uses only the input and output layers, which are connected via the second bridging connection (13b). That is, when propagating the input quantity through the deep neural network (10) along the first path (10a), only the input and output layers are used.
[0043] A second path (10b) through the deep neural network (10) uses the input layer, the layer immediately following the input layer, and the output layer, which are connected via the connection (12) and the first bridging connection (13a). The layer immediately following the input layer is referred to as the second layer, and its immediately following layer is referred to as the third layer.
[0044] The difference between the first and second paths is that the second path (10b) is one layer longer than the first path (10a).
[0045] Another path (10c) can be defined by using each layer of the deep neural network (10) that are connected to each other only by the forward connections (12).
[0046] When the input variable (x) is propagated along the first path (10a) through the deep neural network (10), an output variable (y) is available after only two time steps. This is because, within the first time step, the input variable (x) is processed in the input layer and output as an intermediate variable. Since the first path (10a) is defined by the second bridging connection (13b), the intermediate variable from the input layer is processed by the output layer in the subsequent time step. Therefore, an output variable is available after only two time steps, even though the entire deep neural network, due to its sequence of layers (each requiring one time step for processing), needs a minimum of four time steps to output the final output variable (y).
[0047] It should be noted that, as in Figure 1As shown, the output layer of the deep neural network (10) determines the output value (y) depending on three intermediate values, but when using the first path (10a), it is determined depending on only one intermediate value. The two other intermediate values are not taken into account because the first path (10a) does not pass through the layers required for each of them.
[0048] If the input variable (x) is propagated through the deep neural network along the second path (10b), the input layer also processes the input variable (x) at the first time step and outputs its intermediate variable. At the second time step, the second layer determines its intermediate variable based on the intermediate variable of the input layer. Subsequently, at the third time step, the output layer processes the intermediate variable output of the second layer due to the first bridging connection (13a). Thus, an output variable of the deep neural network is available after only three time steps.
[0049] The same explanation can also be used for propagating the input variable (x) along the third path. It follows that the output variable is only available after the fourth time step, since the input variable must be propagated through all four layers.
[0050] By using the paths, a significantly higher responsiveness of the deep neural network can be achieved, as it is not necessary to wait until the input variable has been fully propagated through each of the layers to the output.
[0051] Figure 2 Figure 1 shows a simplified representation of a method for partially or fully parallelized execution (streaming rollouts) of the deep neural network (10), in which the input variable is propagated simultaneously along the three paths (10a, 10b, 10c) through the deep neural network (10).
[0052] The method for parallelized execution of the deep neural network (10) is characterized by the fact that some or all of the layers are parallelized and operated independently of each other.
[0053] At a first time point (t=1) of a sequence (T) of times, the input variable (x) is processed in the input layer, in Figure 2represented by the highlighting (21) of the input layer.
[0054] Because the individual layers of the deep neural network (10) are operated independently of each other, at the immediately following time point (t=2) of the first time point (t=1), both this intermediate value from the input layer and this intermediate value in the output layer are processed. This parallelized computation of the second layer and the output layer is indicated by the highlighting (22) of these layers in Figure 2 As shown. It should be noted that the second bridging connection provides the intermediate value of the input layer to the output layer. That is, at the second time point (t=2), the output layer determines the output value (y) solely based on the intermediate value of the input layer.
[0055] In the event that the deep neural network (10) classifies the input variable (x), the output layer outputs a classification whose accuracy (acc) or reliability is illustrated by way of example in the diagram above.
[0056] At the third time point (t=3), the determined intermediate value of the second layer is further processed in both the output layer and the third layer. Preferably, at the third time point (t=3), the output layer determines the output value (y) based on the intermediate value of the input layer, which was already determined at the first time step (t=1), and the intermediate value of the second layer. The fact that the third layer determines its intermediate value at the third time point (t=3) is Figure 2 This is represented by the highlight (23). The initial layer is also highlighted (23), as this updates the initial size depending on the intermediate size of the second layer.
[0057] If the deep neural network (10) performs a classification of the input quantity (x), determining the output quantity in the output layer as a function of two intermediate quantities will result in a more accurate or reliable classification. This is illustrated in the diagram above by a curve (25) that describes the progression of the accuracy (acc) or reliability of the output quantity (y), which rises slightly.
[0058] Preferably, at the fourth time point (t=4), the output layer determines the output value based on all intermediate values provided to it. (This is in Figure 2(represented by reference numeral 24). Since over-parameterization of the deep neural network (10) by using too many layers can lead to a degradation of the accuracy or reliability of the output, the curve in the diagram above dips slightly. However, it is also possible that the third layer contributes further valuable information that can lead to an even more accurate classification. Consequently, curve (25) would then continue to rise.
[0059] It is conceivable that at every time point (t=1,..,4) the same input variable (x) is always present at the input layer until all paths have been calculated. It should be noted that in an alternative embodiment of the Figure 2At each time point (t=2,3,4), subsequent input variables of the deep neural network are present and can be propagated step by step by the deep neural network. Then, at the respective time points, not only are the layers active that are required to process the intermediate variables that can be assigned to the input variable (x), but also the layers that process the intermediate variables that can be assigned to the subsequent input variables. This allows for a higher utilization of the deep neural network (10).
[0060] In the event that the network performs a regression instead of a classification, the curve (25) can exemplify an interpolated course of the values of the output variable (y) of the deep neural network (10).
[0061] Figure 3 shows a schematic representation of a flowchart for executing the procedure for operating a neural network.
[0062] The procedure (30) begins with step S31. In step S31, a provided deep neural network with at least one bridging connection, for example the deep neural network (10) according to Figure 1 The system is decomposed into a plurality of paths (10a, 10b, 10c). The weights of the individual layers can be shared by the paths (10a, 10b). Additionally, the paths can also be defined by restricting the layers to a smaller set of parameters, particularly weights.
[0063] Optionally, step S32 can be executed after step S31. In step S32, the deep neural network is trained. Training means that the parameters of the deep neural network are adjusted based on the provided training data and the labels assigned to each training data point, such that a cost function is optimized with respect to a training criterion. The deep neural network can be trained by training the individual paths separately, and in particular, independently of each other. That is, the cost function (loss function) is evaluated for each path during training. This creates parallel information processing paths, so that if a disturbance occurs in one path, the other paths can maintain the original output values of the neural network.
[0064] It should also be noted that for time series as input variables, those paths that require the same number of time steps can be grouped together and provided with a cost function.
[0065] Additionally or alternatively, a group of paths or all paths together can be trained. In this case, the cost function is then composed of the individual, preferably weighted, cost functions of the individual paths.
[0066] The number of different paths used during the training process can be chosen according to the desired granularity of the available resources.
[0067] It is also conceivable that during the training process, particularly shortly before its completion, the usefulness of the pathways is assessed. For example, it is checked whether using a particular pathway can improve the quality of the output. If it is determined that a pathway does not contribute to any improvement, this pathway can be discarded, or the corresponding layer that distinguishes the pathway from the others can be removed from the deep neural network. The advantageous effect of this is that the architecture of the deep neural network is optimized during the training process itself.
[0068] Alternatively or additionally, reinforcement learning can be used to learn which path is most suitable for the respective input variable, depending on the input variable.
[0069] After step S31 or the optional step S32 has been completed, step S33 follows. In this step, one of the paths selected from the majority of paths chosen in step S31 is initially selected. Preferably, the shortest path through the deep neural network is initially chosen; that is, the path requiring the fewest layers of the deep neural network (10) to propagate the input variable (x) through the deep neural network (10). Alternatively, the initial path and / or, upon repeated execution of step S33, another path can be selected using the learned relationship from reinforcement learning in step S32. The deep neural network can then be configured according to the selected path. If the other path was selected, the neural network can be reconfigured accordingly.Configuring the deep neural network can be understood as using only the layers belonging to the respective path. It is also conceivable to use another neural network that is configured according to the further path, so that the input variable can be propagated through this further neural network in the subsequent step.
[0070] Subsequently, in the following step S34, an input variable is propagated by the deep neural network, which is configured according to the path selected in step S33; see explanations regarding... Figure 1 For example, the deep neural network is configured according to the selected path by deactivating the layer that does not belong to the first path or to any of the other paths.
[0071] In step S35, it is then checked whether an output variable of the neural network, which is output after propagating the input variable in step S34, fulfills a predefined criterion. For example, in the case of classification, the predefined criterion could be that there must be a predefined minimum classification difference between the class with the highest probability and the other classes; e.g., the output value of the class with the highest output value should differ by at least 20% from that of the other classes. Additionally or alternatively, it can be checked whether a predefined resource quota, such as an energy / time budget or memory quota, has already been exhausted by the propagation after step S34. Preferably, the criterion therefore characterizes a threshold value, e.g., a confidence or variance of the output variable (y) and / or the resource quota.Additionally or alternatively, the criterion can characterize a change in the respective output variables of the different paths. For example, if the output variable changes by less than 5%, the criterion is met.
[0072] If the criterion according to step S34 should not be met ( Fig. 3 If the branching option is "no," step S33 is executed again, this time selecting another path from the majority of chosen paths. This additional path is at least one layer longer than the previously selected path. This effectively adds another layer to the deep neural network, increasing its expressiveness and enabling a more accurate output, particularly improved classification. The neural network is then reconfigured according to the additional path.
[0073] The next path can be randomly selected from the set of all possible paths, or individual layers can be omitted with a certain probability. This random selection is preferably used during training. During inference, one advantage of random selection is that it allows calculations of the variance of the output variables.
[0074] Furthermore, the explicit weighting of individual paths and / or groups of paths, particularly via a cost term / function during the learning process, can influence the properties of a network. For example, paths that are intended to be particularly efficient in isolation and / or less susceptible to interference can be weighted more heavily. Paths can also be weighted based on their resource requirements, such as energy consumption.
[0075] The more complex the input variable (x) is, or the more resources are available, more layers are preferably used for calculating the output signal, especially longer paths.
[0076] After step S33 is completed, step S34 is performed again.
[0077] Preferably, when step S34 is executed repeatedly, intermediate results obtained during propagation along the first path are reused, thus avoiding the need to repeatedly load parameters of the deep neural network into the processing unit. Furthermore, calculations that have already been performed do not need to be repeated.
[0078] If the criterion is met in step S35, step S36 follows. In step S36, for example, depending on the output of the deep neural network, at least a semi-autonomous robot can be controlled.
[0079] In an alternative embodiment of the method (30), the deep neural network (10) is configured according to Figure 2 Operated in parallel.
[0080] Step S35 can be executed every time the network outputs a value (y), specifically after each time step (t=2,3,4). If step S35 outputs "no", then the deep neural network continues according to the procedure described below. Figure 2 operated.
[0081] Unlike in Figure 3 In step S33, the neural network does not need to be reconfigured for the chosen, further path; only the necessary calculations for the subsequent time step need to be performed, according to the described procedure for the calculations in Figure 2. For example, if at time t=2 the check of step S35 shows that the output does not meet the criterion, the calculations of time t=3 are carried out, i.e. the highlighted layers (23) now carry out their calculations.
[0082] If, after step S35, it has been decided that the output variable meets the criterion, the procedure is carried out as described in Figure 3 Step S36 executed.
[0083] The at least partially autonomous robot is in Figure 4 schematically represented by an at least partially autonomous vehicle (40). In a further embodiment, the at least partially autonomous robot can be a service, assembly or stationary production robot, or alternatively an autonomous flying object, such as a drone.
[0084] The at least partially autonomous vehicle (40) includes a sensor unit (41). The sensor unit (41) can, for example, be a camera that captures the vehicle's (40's) surroundings. The sensor unit (41) is connected to the deep neural network (10). Depending on an input variable provided by the sensor unit (41) and a plurality of parameters, the deep neural network (10) determines the output variable according to the procedure described below. Figure 3 . The output variable will be forwarded to a control unit (43).
[0085] The control unit (43) controls an actuator based on the output variable (y) of the deep neural network (10), preferably controlling the actuator in such a way that the vehicle (40) performs a collision-free maneuver. In the first embodiment, the actuator can be a motor or a braking system of the vehicle (40). In a further embodiment, the semi-autonomous robot can be a tool, a machine tool, or a manufacturing robot. The material of a workpiece can be classified using the deep neural network (10). The actuator can, for example, be a motor that drives a grinding head.
[0086] Furthermore, the vehicle (40), in particular the semi-autonomous robot, comprises a computing unit (44) and a machine-readable memory element (45). A computer program can be stored on the memory element (45), which includes instructions that, when executed on the computing unit (44), cause the computing unit (44) to perform the procedure (30) according to Figure 3 executes.
Claims
1. Computer-implemented method (30) for operating a deep neural network (10) that has at least one skip connection (13a, 13b) and that determines an output variable (y) depending on an input variable (x), wherein the layer that receives the input variable (x) is an input layer and the layer that outputs the output variable (y) is an output layer, wherein a path characterizes an uninterrupted, forward-directed sequence of a multiplicity of layers of the deep neural network and the path characterizes how this multiplicity of layers of the deep neural network are connected in succession in order to propagate the input variable through the deep neural network starting at the input layer up to the output layer, the method (30) comprising the following steps: selecting a first path (10a) through the deep neural network (10) along the skip connection (13a, 13b); determining an output variable by propagating an input variable (x) of the deep neural network (10) along the first path; and checking whether the output variable corresponds to a predefinable criterion, wherein, if the predefinable criterion is not met, a second path (10b, 10c) through the deep neural network (10), which differs from the first path (10a), is selected and the output variable is determined by propagating the input variable (x) of the deep neural network (10) along the second path (10b, 10c), wherein, if the predefinable criterion has been met, a control variable is determined depending on the output variable of the deep neural network, wherein the control variable is used to control an actuator of a technical system, wherein the technical system is an at least partially autonomous machine, an at least partially autonomous vehicle, a robot, a tool, a machine tool or a flying object.
2. Method according to Claim 1, wherein, when the input variable (x) is propagated along the paths, the layers (11) of the neural network (10) that are not required for the respective path used are deactivated and are activated only when this layer is required for the respective path.
3. Method according to Claim 1 or 2, wherein, when the input variable (x) is propagated along the second path (10b, 10c), intermediate variables of the layers (11) that were determined during propagation along the first path (10a) are reused.
4. Method according to one of the preceding claims, wherein, during propagation along the second path (10b, 10c), only the intermediate variables of the layers in terms of which the second path (10b, 10c) differs from the first path (10a) are determined, and wherein, during propagation along the second path (10b, 10c), the layers of the second path that are connected to more than one previous layer and were also contained in the first path (10a) furthermore determine their intermediate variables depending on a provided intermediate variable of the respective immediately preceding connected layer of the second path and a previous provided intermediate variable of the immediately preceding connected layer of the first path.
5. Method according to one of the preceding claims, comprising the following further steps: providing a multiplicity of different paths through the deep neural network; selecting at least the first and second paths from the multiplicity of different paths; determining the output variable by propagating the input variable of the deep neural network simultaneously along at least the first and second paths, wherein the intermediate variables of the common layers of the first and second paths up to the layer starting from which the sequences of the layers of the paths differ are first determined in succession, wherein the intermediate variables of each of the remaining layers of the first path and the remaining layers of the second path that have the same position in the sequence of the layers of the paths are determined in parallel, wherein, when the output variable of the first path is output, the predefinable criterion is checked, wherein, if the criterion is not met, the propagation is continued until the output variable of the second path is output.
6. Method according to one of the preceding claims, wherein the selection of the paths is dependent on the input variable and / or dependent on a predefinable maximum energy / time quota that is allowed to be consumed in order to propagate the input variable through the deep neural network (10), and / or wherein the predefinable criterion characterizes a predefinable minimum accuracy or reliability of the output variable.
7. Method according to one of the preceding claims, wherein each path of the deep neural network (10) is trained separately from one another and / or at least one group of paths is trained together.
8. Device (44) configured to carry out the method according to one of the preceding claims.
9. Computer program comprising instructions that, when these instructions are executed on a computer, are configured to cause this computer to carry out the method according to one of preceding Claims 1 to 7.
10. Machine-readable storage element (45) on which the computer program according to Claim 9 is stored.
