A method and device for determining the step size of a pulse neural network in an autonomous driving scenario

By dynamically adjusting the step size of the spiking neural network and based on the average activation rate of each neuron, the problem of high energy consumption in existing spiking neural networks is solved, enabling efficient detection in autonomous driving scenarios.

CN114723018BActive Publication Date: 2025-12-26AUTOMOBILE RES INST OF TSINGHUA UNIV IN SUZHOU XIANGCHENG +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210473731.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-12-26
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

In existing technologies, setting a large step size directly in autonomous driving scenarios for spiking neural networks leads to increased device power consumption. However, excessively large step sizes do not significantly improve performance but instead increase energy consumption.

Method used

By dynamically adjusting the step size of the spiking neural network, the step size is gradually increased according to the average activation rate of each neuron until the preset convergence condition is met, thus determining the target step size, so as to reduce energy consumption while ensuring accuracy.

Benefits of technology

While ensuring detection accuracy, the energy consumption of the spiking neural network was reduced and the prediction time was shortened, thus improving computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114723018B_ABST
    Figure CN114723018B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for determining a step length of a pulse neural network in an automatic driving scene. The method comprises: setting a current step length as an initial value of the step length, and inputting input data into the pulse neural network; when the pulse neural network outputs result data matching the input data, calculating average activation rates of each neuron in the pulse neural network; increasing the value of the current step length, repeatedly executing the operation of inputting the input data into the pulse neural network, until it is determined that the average activation rates of each neuron in the pulse neural network meet a preset regional convergence condition; and taking the value of the current step length as a target step length of the pulse neural network in the automatic driving scene. By using the technical scheme of the application, the step length of the pulse neural network can be dynamically adjusted, so that the detection precision of the pulse neural network is ensured, and the energy consumption and the prediction time are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computational neuroscience, artificial intelligence and automatic driving, and particularly relates to a method and device for determining a step length of a spiking neural network in an automatic driving scenario. BACKGROUND

[0002] In an automatic driving scenario, to ensure that a vehicle acquires and recognizes the surrounding environment, a perception module of an automatic driving system needs to acquire surrounding environment information through various sensors. Camera-based acquisition of environment information plays an important role in the perception module, and perception algorithms based on camera output environment information include target detection, target tracking, etc. At present, the mainstream model of target detection algorithms is a convolutional neural network (CNN), but the convolutional neural network has the problem of high power consumption caused by high computing power. Therefore, a spiking neural network (SNN) with low power consumption and low latency characteristics has begun to attract attention.

[0003] The spiking neural network needs to be calculated multiple times, and only after the neurons at each layer of the backbone network have sufficient excitation can an effective output result be obtained. Therefore, in existing target detection schemes using a spiking neural network, a relatively large step length is usually given to enable the neurons in the network to obtain sufficient excitation. However, the step length at which each neuron obtains an optimal output result is not the same, and a too large step length does not help much to improve the performance of the spiking neural network, but instead brings greater power consumption to the device. SUMMARY

[0004] The present application provides a method and device for determining a step length of a spiking neural network in an automatic driving scenario, to dynamically adjust the step length of the spiking neural network, thereby ensuring the detection accuracy of the spiking neural network while reducing energy consumption and prediction time.

[0005] In a first aspect, an embodiment of the present application provides a method for determining a step length of a spiking neural network in an automatic driving scenario, the method comprising:

[0006] setting a current step length as a step length initial value, and inputting input data into the spiking neural network;

[0007] calculating an average activation rate of each neuron in the spiking neural network when the spiking neural network outputs result data matching the input data;

[0008] increasing the value of the current step length, and repeatedly performing the operation of inputting input data into the spiking neural network until the average activation rate of each neuron in the spiking neural network meets a preset region convergence condition;

[0009] The value of the current step length is taken as the target step length of the spiking neural network in the autonomous driving scene.

[0010] In a second aspect, the embodiment of the present application further provides a device for determining a step length of a spiking neural network in an autonomous driving scene, which comprises:

[0011] an input data input module, configured to set the current step length as an initial step length value, and input input data into the spiking neural network;

[0012] an average activation rate calculation module, configured to calculate an average activation rate of each neuron in the spiking neural network when the spiking neural network outputs result data matching the input data;

[0013] a region convergence condition judgment module, configured to increase the value of the current step length, and repeatedly perform the operation of inputting the input data into the spiking neural network until it is determined that the average activation rate of each neuron in the spiking neural network meets a preset region convergence condition;

[0014] a target step length determination module, configured to take the value of the current step length as the target step length of the spiking neural network in the autonomous driving scene.

[0015] In a third aspect, the embodiment of the present application further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for determining a step length of a spiking neural network in an autonomous driving scene according to any of the embodiments of the present application when executing the program.

[0016] In a fourth aspect, the embodiment of the present application further provides a storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the method for determining a step length of a spiking neural network in an autonomous driving scene according to any of the embodiments of the present application when executed by a computer processor.

[0017] The technical scheme of the embodiment of the present application starts from the initial step length, inputs the input data into the spiking neural network, calculates the average activation rate of each neuron in the spiking neural network, successively increases the current step length until the average activation rate of each neuron in the spiking neural network meets the preset region convergence condition, and takes the current step length at this time as the target step length of the spiking neural network. The method solves the problem of directly setting a large step length for the spiking neural network in the prior art, increases the power consumption of the device, and realizes the dynamic adjustment of the step length of the spiking neural network, thereby ensuring the detection accuracy of the spiking neural network while reducing the energy consumption and the prediction time.

[0018] It is to be understood that the description of the background of the application is not an acknowledgement or admission that any of the information provided in the description of the background of the application is prior art to the application. The information in the description of the background of the application may contain ideas, concepts and / or discoveries not yet known to be prior art to the present application. BRIEF DESCRIPTION OF DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced in the following. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort based on these drawings.

[0020] Figure 1a is a flow chart of a method for determining a step length of a spiking neural network in an autonomous driving scene provided by Embodiment One of the present application;

[0021] Figure 1b is a process schematic diagram of target detection based on a convolutional neural network provided by Embodiment One of the present application;

[0022] Figure 1c is a process schematic diagram of target detection based on a spiking neural network provided by Embodiment One of the present application;

[0023] Figure 1d is a schematic diagram of an average activation rate curve of each neuron provided by Embodiment One of the present application;

[0024] Figure 2 is a flow chart of a method for determining a step length of a spiking neural network in an autonomous driving scene provided by Embodiment Two of the present application;

[0025] Figure 3 is a structural schematic diagram of a device for determining a step length of a spiking neural network in an autonomous driving scene provided by Embodiment Three of the present application;

[0026] Figure 4 is a structural schematic diagram of a computer device provided by Embodiment Four of the present application. DETAILED DESCRIPTION

[0027] In order to make the technical personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should be within the scope of protection of the present application.

[0028] It should be noted that the terms "first", "second", and the like in the description and claims of the application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in other than the order illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a list of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to such processes, methods, products or devices.

[0029] Embodiment one

[0030] Figure 1a A flowchart of a method for determining the step size of a spiking neural network in an autonomous driving scenario is provided for embodiment one of the application. The present embodiment can be applicable to the case of target detection by a spiking neural network. The method can be executed by a spiking neural network step size determination device, which can be realized in the form of hardware and / or software, and can be configured in a computer device.

[0031] As shown in Figure 1a , the method comprises:

[0032] S110, set the current step size to a step size initial value, and input the input data to the spiking neural network.

[0033] The step size is the number of times of forward calculation of the spiking neural network. The current step size is the step size in the current round of average activation rate calculation. The step size initial value can be a small step size value, for example, 128. The input data can be a spike sequence obtained by encoding an input image. The encoding method is not limited in the present embodiment.

[0034] Preferably, the spiking neural network in the present embodiment is obtained by converting a convolutional neural network. The parameters of the trained convolutional neural network can be directly applied to the spiking neural network after conversion. Figure 1b A process schematic diagram for target detection based on a convolutional neural network is provided, as shown in Figure 1b When target detection is performed based on a convolutional neural network, the convolutional neural network serves as a backbone network. After an input image is input to the backbone network, the feature map output by the backbone network serves as the input of a prediction head, and target detection is performed by the prediction head. After the convolutional neural network serving as the backbone network is replaced by a spiking neural network, Figure 1c A process schematic diagram for target detection based on a spiking neural network is provided, as shown inFigure 1c As shown in the figure, an encoding layer is added before the spiking neural network to encode the input image into a pulse sequence. Optionally, the encoding layer can be a Poisson encoder to encode the input image into a pulse sequence whose firing rate distribution conforms to a Poisson process. A decoding layer is added after the spiking neural network to decode the pulse sequence output by the spiking neural network into a feature image as the input of the predicted head.

[0035] Since the convolutional neural network only needs to perform a forward calculation to obtain the target detection result, while the spiking neural network needs to perform multiple forward calculations, the number of forward calculations is the step length. In order to make each neuron in the spiking neural network obtain sufficient excitation, a large step length is usually given in the prior art, and the same step length is used for all input data. This setting makes the performance of the spiking neural network not significantly improved, and also increases the power consumption of the device.

[0036] In the embodiment of the present application, for input data, the step length value is gradually increased from a small initial value, until the average activation rate of each neuron reaches convergence, which means that the accuracy of the spiking neural network when a large step length is directly set can be reached, and the optimal detection result can be obtained for the current input data.

[0037] S120, when the spiking neural network outputs result data matching the input data, calculating the average activation rate of each neuron in the spiking neural network.

[0038] The spiking neural network calculates the input data according to the current step length to obtain a pulse sequence matching the input pulse sequence, i.e. result data. Neurons are nodes in the spiking neural network. The membrane potential of the neuron will continuously decay to the resting potential in the absence of input pulse sequence, but with the stimulation of the input pulse sequence, the membrane potential may increase, and when the membrane potential reaches the trigger threshold, an output pulse is generated, and the membrane potential is reset to a lower value. In the spiking neural network, information flows from the previous neuron to the next neuron, and after several forward calculations, the result data is output.

[0039] The average activation rate refers to the number of pulses output by the neuron per unit time, and the duration of the unit time is not limited in the embodiment.

[0040] S130, increasing the value of the current step length, and repeating the operation of inputting the input data into the spiking neural network until it is determined that the average activation rate of each neuron in the spiking neural network meets the preset regional convergence condition.

[0041] Figure 1d A schematic diagram of the average activation rate curve of each neuron is provided, as shown in Figure 1dAs shown in the figure, the horizontal axis of the coordinate axis represents the step size, and the vertical axis represents the average activation rate, and the average activation rate of each neuron will converge to a certain value in the process of gradually increasing the step size.

[0042] S140, the value of the current step size is determined as the target step size of the spiking neural network in the automatic driving scene.

[0043] In the embodiment of the application, after determining the value of the current step size as the target step size, the result data output by the spiking neural network can be used for target detection, thereby realizing the determination of the vehicle surrounding environment information in the automatic driving scene.

[0044] In the embodiment of the application, the step size when the average activation rate of each neuron in the spiking neural network meets the preset regional convergence condition can achieve similar accuracy as the directly determined larger step size. Moreover, the technical solution of the embodiment only needs a smaller step size, so that the power consumption when running on a computer device is lower, the time required for target detection is shorter, and the efficiency is higher.

[0045] The technical solution of the embodiment of the application starts from the step size initial value, inputs the input data into the spiking neural network, outputs the result data of the spiking neural network, calculates the average activation rate of each neuron in the spiking neural network, sequentially increases the current step size, until the average activation rate of each neuron in the spiking neural network meets the preset regional convergence condition, and the current step size at this time is determined as the final target step size of the spiking neural network. The method solves the problem of increasing device power consumption in the prior art by directly setting a larger step size for the spiking neural network, realizes dynamic adjustment of the step size of the spiking neural network, and thus reduces energy consumption and prediction time while ensuring the detection accuracy of the spiking neural network.

[0046] Embodiment two

[0047] Figure 2 A flowchart of a method for determining the step size of a spiking neural network in an automatic driving scene is provided in the second embodiment of the application. The embodiment further specifies the process of calculating the average activation rate of the neuron and the process of judging the preset regional convergence condition based on the above-mentioned embodiment, and adds a determination method of the target step size when the current step size is increased to the preset step size threshold and still does not meet the preset regional convergence condition, and a step of performing target detection according to the result data output by the spiking neural network.

[0048] As Figure 2 shown, the method comprises:

[0049] S210, set the current step size to the step size initial value.

[0050] In the embodiment of the present application, the step initial value and the step threshold value are set in advance, and the step is increased according to the average activation rate curve in the step Figure 1d In the initial step, the average activation rate of most neurons is 0, and at this time, the step is too small and the neurons cannot be sufficiently stimulated, so a step initial value is needed, and the step is increased from the step initial value.

[0051] S220, input the input data into the spiking neural network.

[0052] Specifically, inputting the input data into the spiking neural network includes inputting the input data into the encoding layer and inputting the encoded input data of the encoding layer into the spiking neural network.

[0053] For example, the input data can be an input picture, the input picture is input into the encoding layer, the encoding layer encodes the input picture into a pulse sequence, and the pulse sequence is input into the spiking neural network. Figure 1c

[0054] S230, determine whether the spiking neural network outputs result data matching the input data, if yes, execute S240, otherwise return to execute S230.

[0055] When the spiking neural network outputs a pulse sequence, the number of pulses output by each neuron is counted.

[0056] S240, calculate the number of pulses fired by each neuron in the spiking neural network within an output time interval.

[0057] The output time interval is calculated from the time when the pulse sequence is input into the spiking neural network to the time when the pulse sequence is output by the spiking neural network, and the number of pulses fired by each neuron within the output time interval is counted.

[0058] S250, calculate the average activation rate of each neuron according to the number of pulses fired by each neuron and the output time interval.

[0059] The number of pulses fired by each neuron divided by the output time interval is the average activation rate of each neuron.

[0060] S260, determine whether the value of the current step is less than or equal to the preset step threshold value, if yes, execute S270, otherwise execute S2150.

[0061] The step threshold value can be set in advance according to the performance of the end-side device of the spiking neural network and the business needs, for example, the step initial value can be set to 128, and the step threshold value can be set to 4096, but the embodiment does not limit the specific value and setting method of the step initial value and the step threshold value.

[0062] ​S270, determine whether the value of the current step size is greater than the preset step size threshold after the value of the current step size is increased, if yes, execute S2130, otherwise execute S280.

[0063] The value of the current step size is not limited to be increased once in the embodiment, for example, the value of the current step size can be increased by 4 once. After the value of the current step size is increased, if the step size threshold has been exceeded, the calculation of the average activation rate is no longer performed, and the value before the increase is taken as the final target step size. After the pulse sequence output by the pulse neural network at this time is decoded by the decoding layer and input to the prediction head, target detection is performed.

[0064] S280, respectively determine the average activation rate curve of each neuron according to the average activation rate of each neuron matched with the current step size and the average activation rate of each neuron matched with the historical step size.

[0065] For each step size, the average activation rate of each neuron is calculated respectively, and for each neuron, a plurality of step sizes and average activation rates can be obtained, and the average activation rate curve can be obtained according to the plurality of step sizes and average activation rates. The way of determining the average activation rate curve according to the plurality of step sizes and average activation rates is not limited in the embodiment.

[0066] S290, determine whether the number of neurons whose average activation rate curve has a slope less than or equal to a preset slope is greater than or equal to a preset neuron number, if yes, execute S2100, otherwise execute S2120.

[0067] The preset slope is a small value, when the slope of the average activation rate curve of a neuron is less than or equal to the preset slope, it is considered that the slope of the average activation rate curve tends to 0, and at this time the average activation rate of the neuron converges.

[0068] S2100, determine whether the number of current step sizes and historical step sizes that satisfy the convergence condition is greater than or equal to a preset step size number, if yes, execute S2110, otherwise execute S2120.

[0069] The preset step size number can be 1, that is, only the number of neurons whose average activation rate curve corresponding to the current step size tends to 0 is greater than or equal to the preset neuron number, it is considered that the regional convergence condition is satisfied.

[0070] The preset step size number can also be greater than 1, for example, when the preset step size number is 5, only when the number of neurons whose average activation rate curve corresponding to the last 5 step sizes tends to 0 is greater than or equal to the preset neuron number, it is considered that the regional convergence condition is satisfied. The preset step size number is not limited in the embodiment.

[0071] S2110, Use the current step size as the target step size of the spiking neural network in the autonomous driving scenario.

[0072] S2120: Increase the current step size. Return to execute S220.

[0073] S2130, Use the current step size as the target step size of the spiking neural network in the autonomous driving scenario.

[0074] S2140. Target detection is performed based on the result data output by the spiking neural network that matches the input data.

[0075] Specifically, target detection is performed based on the result data output by the spiking neural network that matches the input data, including: inputting the result data output by the spiking neural network that matches the input data into the decoding layer, inputting the decoded result data into the prediction head, and obtaining the target detection result.

[0076] by Figure 1c For example, the spiking neural network outputs a pulse sequence, which is then decoded into a feature image by the decoding layer. The feature image is then input into the prediction head, which performs target detection to obtain the target detection result.

[0077] S2150, End.

[0078] Example 3

[0079] Figure 3 This is a schematic diagram of a device for determining the step size of a spiking neural network in an autonomous driving scenario, provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: an input data input module 310, an average activation rate calculation module 320, a region convergence condition judgment module 330, and a target step size determination module 340. Wherein:

[0080] The input data input module 310 is used to set the current step size to the initial step size value and input the input data into the spiking neural network;

[0081] The average activation rate calculation module 320 is used to calculate the average activation rate of each neuron in the spiking neural network when the output of the spiking neural network matches the input data.

[0082] The region convergence condition judgment module 330 is used to increase the value of the current step size and repeatedly execute the operation of inputting input data into the spiking neural network until it is determined that the average activation rate of each neuron in the spiking neural network meets the preset region convergence condition.

[0083] The target step size determination module 340 is used to take the current step size value as the target step size of the spiking neural network in the autonomous driving scenario.

[0084] The technical scheme of the embodiment of the present application is that the current step length is started from a step length initial value, input data is input to the spiking neural network, the spiking neural network outputs result data, the average activation rate of each neuron in the spiking neural network is calculated, the current step length is sequentially increased until the average activation rate of each neuron in the spiking neural network meets a preset regional convergence condition, and the current step length at this time is taken as a target step length of the spiking neural network. The problem of increasing device power consumption in the prior art by directly setting a large step length for the spiking neural network is solved, dynamic adjustment of the step length of the spiking neural network is achieved, and thus the detection accuracy of the spiking neural network is ensured while energy consumption is reduced and the prediction time is reduced.

[0085] On the basis of the above embodiment, the average activation rate calculation module 320 comprises:

[0086] The pulse number calculation unit is configured to calculate the number of pulses fired by each neuron in the spiking neural network within the output time interval.

[0087] The average activation rate calculation unit is configured to calculate the average activation rate of each neuron according to the number of pulses fired by each neuron and the output time interval.

[0088] On the basis of the above embodiment, the regional convergence condition judgment module 330 comprises:

[0089] The average activation rate curve determination unit is configured to determine the average activation rate curve of each neuron according to the average activation rate of each neuron matched with the current step length and the average activation rate of each neuron matched with the historical step length, respectively.

[0090] The current step length convergence condition judgment unit is configured to determine that the current step length meets the convergence condition if the number of neurons whose slope of the average activation rate curve is less than or equal to a preset slope is greater than or equal to a preset number of neurons.

[0091] The step length number judgment unit is configured to determine that the average activation rate of each neuron in the spiking neural network meets the preset regional convergence condition if the number of current step lengths and historical step lengths determined to meet the convergence condition is greater than or equal to a preset number of step lengths.

[0092] On the basis of the above embodiment, the device further comprises:

[0093] The preset step length threshold value judgment module is configured to take the value of the current step length as the target step length of the spiking neural network in the autonomous driving scenario if it is determined that the value of the current step length is less than or equal to a preset step length threshold value and the value of the current step length is greater than the preset step length threshold value after the value of the current step length is increased.

[0094] Based on the above embodiments, the device further includes:

[0095] The target detection module is used to perform target detection based on the result data output by the spiking neural network that matches the input data.

[0096] Based on the above embodiments, the spiking neural network is obtained by converting a convolutional neural network;

[0097] Input data input module 310 includes:

[0098] The input data encoding unit is used to input input data into the encoding layer and input the input data encoded by the encoding layer into the spiking neural network.

[0099] The target detection module includes:

[0100] The result data decoding unit is used to input the result data output by the spiking neural network that matches the input data into the decoding layer, and input the result data decoded by the decoding layer into the prediction head to obtain the target detection result.

[0101] The device for determining the step size of a spiking neural network in an autonomous driving scenario provided in this embodiment of the invention can execute the method for determining the step size of a spiking neural network in an autonomous driving scenario provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0102] Example 4

[0103] Figure 4 This is a schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention, as shown below. Figure 4 As shown, the computer device includes a processor 70, a memory 71, an input device 72, and an output device 73; the number of processors 70 in the computer device can be one or more. Figure 4 Taking a processor 70 as an example; the processor 70, memory 71, input device 72, and output device 73 in a computer device can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.

[0104] The memory 71 can be used to store software programs, computer executable programs and modules, such as the modules corresponding to the method for determining the step length of the spiking neural network in the autonomous driving scenario (for example, the input data input module 310, the average activation rate calculation module 320, the region convergence condition judgment module 330 and the target step length determination module 340 in the device for determining the step length of the spiking neural network in the autonomous driving scenario) in the embodiment of the application, as a computer readable storage medium. The processor 70 can execute various functions of the computer device and data processing by running the software programs, instructions and modules stored in the memory 71, that is, the above-mentioned method for determining the step length of the spiking neural network in the autonomous driving scenario is implemented. The method comprises:

[0105] setting the current step length as the initial value of the step length, and inputting the input data into the spiking neural network;

[0106] calculating the average activation rate of each neuron in the spiking neural network when the spiking neural network outputs the result data matching the input data;

[0107] increasing the value of the current step length, and repeatedly performing the operation of inputting the input data into the spiking neural network until the average activation rate of each neuron in the spiking neural network meets the preset region convergence condition;

[0108] taking the value of the current step length as the target step length of the spiking neural network in the autonomous driving scenario.

[0109] The memory 71 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and application programs required by at least one function; the data storage area can store data created according to the use of the terminal and the like. In addition, the memory 71 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device or other non-volatile solid-state storage device. In some examples, the memory 71 can further include a memory remotely arranged with respect to the processor 70, which can be connected to the computer device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0110] The input device 72 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device. The output device 73 can include a display device such as a display screen.

[0111] Embodiment five

[0112] The embodiment five of the present application also provides a storage medium comprising computer executable instructions, which are used for executing a method for determining a step length of a spiking neural network in an autonomous driving scene when executed by a computer processor, the method comprising:

[0113] setting the current step length as a step length initial value, and inputting input data into the spiking neural network;

[0114] calculating an average activation rate of each neuron in the spiking neural network when the spiking neural network outputs result data matching the input data;

[0115] increasing the value of the current step length, and repeatedly executing the operation of inputting the input data into the spiking neural network until the average activation rate of each neuron in the spiking neural network meets a preset region convergence condition;

[0116] taking the value of the current step length as a target step length of the spiking neural network in the autonomous driving scene.

[0117] Of course, the computer executable instructions of the storage medium provided by the embodiment of the present application are not limited to the method operations described above, and can also execute the related operations in the method for determining the step length of the spiking neural network in the autonomous driving scene provided by any embodiment of the present application.

[0118] From the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary universal hardware, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a FLASH memory, a hard disk or an optical disk, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application.

[0119] It is worth noting that in the above embodiment of the device for determining the step length of the spiking neural network in the autonomous driving scene, each unit and module included is only divided according to the functional logic, but is not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy mutual differentiation, and do not limit the protection scope of the present application.

[0120] Note that the above merely describes preferred embodiments of the present application and the principles of the technology applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, modifications and substitutions can be made without departing from the scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.

Claims

1. A method for determining the step size of an impulse neural network in an autonomous driving scenario, characterized in that, The method is suitable for target detection by the pulse neural network in an autonomous driving scene, and the method comprises: setting a current step length to a step length initial value, and inputting input data into the pulse neural network; wherein the step length refers to a number of times of forward calculation of the pulse neural network, and the input data is a pulse sequence obtained by encoding an input image; when the pulse neural network outputs result data matching the input data, calculating average activation rates of neurons in the pulse neural network, comprising: calculating a number of pulses emitted by each neuron in the pulse neural network within an output time interval; calculating the average activation rate of each neuron according to the number of pulses emitted by each neuron and the output time interval; wherein the result data is a pulse sequence matching the input pulse sequence; increasing a value of the current step length, and repeatedly performing the operation of inputting the input data into the pulse neural network until it is determined that the average activation rates of the neurons in the pulse neural network meet a preset regional convergence condition; wherein the determination that the average activation rates of the neurons in the pulse neural network meet the preset regional convergence condition comprises: determining an average activation rate curve of each neuron according to the average activation rate of each neuron matching the current step length and the average activation rate of each neuron matching a historical step length; if a number of neurons whose slopes of the average activation rate curves are less than or equal to a preset slope and greater than or equal to a preset number of neurons is greater than or equal to a preset number of step lengths, it is determined that the current step length meets the convergence condition; if a number of current step lengths and historical step lengths determined to meet the convergence condition is greater than or equal to the preset number of step lengths, it is determined that the average activation rates of the neurons in the pulse neural network meet the preset regional convergence condition; taking the value of the current step length as a target step length of the pulse neural network in the autonomous driving scene; performing target detection according to the result data matching the input data output by the pulse neural network, comprising: inputting the result data matching the input data output by the pulse neural network into a decoding layer, inputting result data decoded by the decoding layer into a prediction head, and performing target detection by the prediction head to obtain a target detection result.

2. The method of claim 1, wherein, After calculating the average activation rates of the neurons in the pulse neural network, the method further comprises: if it is determined that the value of the current step length is less than or equal to a preset step length threshold, and the value of the current step length is greater than the preset step length threshold after increasing the value of the current step length, taking the value of the current step length as the target step length of the pulse neural network in the autonomous driving scene.

3. The method of claim 1, wherein, The pulse neural network is obtained by converting a convolutional neural network; inputting the input data into the pulse neural network comprises: inputting the input data into an encoding layer, and inputting input data encoded by the encoding layer into the pulse neural network; performing target detection according to the result data matching the input data output by the pulse neural network, comprising: inputting the result data matching the input data output by the pulse neural network into a decoding layer, inputting result data decoded by the decoding layer into a prediction head, and obtaining a target detection result.

4. A device for determining the step size of a spiking neural network in an autonomous driving scenario, characterized by The device is used for target detection by a pulse neural network in an autonomous driving scene, and the device comprises: The input data input module is configured to set a current step length to a step length initial value and input input data to the spiking neural network. The step length refers to a number of times of forward calculation of the spiking neural network, and the input data refers to a spike sequence obtained by encoding an input image. The average activation rate calculation module is configured to calculate average activation rates of neurons in the spiking neural network when the spiking neural network outputs result data matching the input data. The average activation rate calculation module includes: The spike number calculation unit is configured to calculate a number of spikes fired by each neuron in the spiking neural network within an output time interval. The average activation rate calculation unit is configured to calculate the average activation rate of each neuron according to the number of spikes fired by each neuron and the output time interval. The result data refers to a spike sequence matching the input spike sequence. The region convergence condition judgment module is configured to increase a value of the current step length, repeatedly perform the operation of inputting the input data to the spiking neural network, and determine that the average activation rates of the neurons in the spiking neural network meet a preset region convergence condition. The region convergence condition judgment module includes: The average activation rate curve determination unit is configured to determine an average activation rate curve of each neuron according to the average activation rate of each neuron matching the current step length and the average activation rate of each neuron matching a historical step length. The current step length convergence condition judgment unit is configured to determine that the current step length meets a convergence condition if a number of neurons whose slopes of the average activation rate curves are less than or equal to a preset slope is greater than or equal to a preset number of neurons. The step length number judgment unit is configured to determine that the average activation rates of the neurons in the spiking neural network meet the preset region convergence condition if a number of the current step length and the historical step length that meet the convergence condition is greater than or equal to a preset number of step lengths. The target step length determination module is configured to set the value of the current step length as a target step length of the spiking neural network in the autonomous driving scene. The target detection module is configured to perform target detection according to the result data matching the input data output by the spiking neural network, including inputting the result data matching the input data output by the spiking neural network to a decoding layer, inputting result data decoded by the decoding layer to a prediction head, and performing target detection by the prediction head to obtain a target detection result.

5. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the method for determining the step length of the spiking neural network in the autonomous driving scene according to any one of claims 1-3 when executing the program.

6. A storage medium storing computer-executable instructions, wherein: The computer executable instructions are used to execute the method for determining the step length of the spiking neural network in the autonomous driving scene according to any one of claims 1-3 when executed by the computer processor.

Citation Information

Patent Citations

  • Neural network training method, device and equipment and storage medium

    CN112101530A

  • ANN-SNN conversion classification method based on membrane potential preprocessing

    CN112116010A

  • Spiking neural network modeling method and system and application thereof

    CN113792863A