Construction method and equipment of lightweight pulse neural network model
By replacing the activation function in the pulsed neural network and aligning the output feature distribution, and training the network with cross entropy loss, the problem of low accuracy of the pulsed neural network is solved, and a high-precision target recognition effect is achieved.
Patent Information
- Application Number
- CN202311607765.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2025-05-30
AI Technical Summary
The existing pulsed neural network models have low accuracy, resulting in the inability to replace convolutional neural networks in certain specific situations.
By replacing the leak integration distribution neuron activation function between the last two convolutional layers in the pulsed neural network with a linear rectifier activation function, and aligning the output feature distribution of high-dimensional time step with the output feature distribution of low-dimensional time step, the network is supervised and trained in combination with cross-entropy classification loss.
The accuracy and characterization ability of the output feature representation of the pulsed neural network are improved, the parameters of the overall network are reduced, and the high-precision target recognition requirements of the lightweight pulsed neural network are realized.
Smart Images

Figure CN120068948A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of computer vision and brain-like intelligence, and particularly to a method and device for constructing a lightweight spiking neural network model. Background Art
[0002] In recent years, the performance of convolutional neural networks in different fields such as pattern recognition, object detection, and robot automation has received extensive attention. However, currently, the fully-precision convolutional neural network models have a large number of parameters and high energy consumption during actual embedded hardware deployment and use. Spiking neural networks aim to simulate the behavior of the human brain and have now become a promising low-power architecture that can replace convolutional neural networks in certain specific situations. It uses binary spikes of 0 / 1 to transmit information. Thanks to this information processing paradigm, the multiplication of activation and weights in spiking neural networks can be replaced by addition, thereby having the potential for low power consumption. In addition, at the level of neuromorphic hardware deployment, when there is no spike transmission, the neurons of the spiking neural network will remain inactive, so significantly lower energy consumption is required.
[0003] Although spiking neural networks are more energy-efficient than traditional convolutional neural networks, due to the binary representation form of spiking neural networks, compared with the fully-precision feature maps of neural networks, spiking neural networks will result in limited expressive ability and a large decrease in accuracy. Although increasing the time step of the spiking neural network can alleviate the problem of accuracy reduction, the inference and computational burden will also increase with the increase of the time step. Summary of the Invention
[0004] The present invention provides a method and device for constructing a lightweight spiking neural network model, which can solve the technical problem of low accuracy of the existing spiking neural network model.
[0005] According to one aspect of the present invention, there is provided a method for constructing a lightweight spiking neural network model, the method comprising:
[0006] Replacing the leaky integrate-and-fire neuron activation function between the last two convolutional layers in the first spiking neural network with a rectified linear activation function, and replacing the leaky integrate-and-fire neuron activation function between the last two convolutional layers in the second spiking neural network with a rectified linear activation function;
[0007] Inputting an image with a first-dimensional time step into the first spiking neural network to obtain an output feature distribution of the first spiking neural network, and inputting an image with a second-dimensional time step into the second spiking neural network to obtain an output feature distribution of the second spiking neural network, wherein the first dimension is greater than the second dimension;
[0008] Align the output feature distributions of the first spiking neural network and the second spiking neural network to obtain the relative entropy loss;
[0009] Obtain the total classification loss based on the relative entropy loss and the cross-entropy classification loss of the second spiking neural network;
[0010] Train the second spiking neural network based on the total classification loss, and use the trained second spiking neural network as the final spiking neural network model.
[0011] Preferably, the first spiking neural network and the second spiking neural network have the same structure. The first or second spiking neural network includes n consecutive convolutional layers, an average pooling layer, and a fully connected layer. An activation function is provided between adjacent convolutional layers. The activation function between the first n - 1 convolutional layers is the leaky integrate-and-fire neuron activation function, and the activation function between the (n - 1)-th and the n-th convolutional layers is the rectified linear activation function.
[0012] Preferably, inputting the image of the first-dimensional time step into the first spiking neural network to obtain the output feature distribution of the first spiking neural network, and inputting the image of the second-dimensional time step into the second spiking neural network to obtain the output feature distribution of the second spiking neural network includes:
[0013] Input the image of the first-dimensional time step into several convolutional layers of the first spiking neural network in sequence. After the last convolution, obtain the first full-precision feature map. Input the image of the second-dimensional time step into several convolutional layers of the second spiking neural network in sequence. After the last convolution, obtain the second full-precision feature map;
[0014] Input the first full-precision feature map into the average pooling layer of the first spiking neural network for pooling processing to obtain the first full-precision feature vector. Input the second full-precision feature map into the average pooling layer of the second spiking neural network for pooling processing to obtain the second full-precision feature vector;
[0015] Input the first full-precision feature vector into the fully connected layer of the first spiking neural network for fully connected processing to obtain the output feature distribution of the first spiking neural network. Input the second full-precision feature vector into the fully connected layer of the second spiking neural network for fully connected processing to obtain the output feature distribution of the second spiking neural network.
[0016] Preferably, the relative entropy loss is obtained by the following formula:
[0017]
[0018] In the formula, L fe represents the relative entropy loss, SoftMax(P a )、SoftMax(Ps ) respectively represent P a and P s 's normalized probability, P a and P s respectively represent the output feature distributions of the first and second pulsed neural networks.
[0019] Preferably, the total classification loss is obtained by the following formula:
[0020] L 总和 = L fe + λ·L ce ;
[0021] In the formula, L 总和 represents the total classification loss, L fe represents the relative entropy loss, L ce represents the cross-entropy classification loss, and λ represents the proportionality coefficient for adjusting the cross-entropy classification loss.
[0022] According to another aspect of the present invention, there is provided a computer device, including a memory, a processor, and a construction program of a lightweight pulsed neural network model stored on the memory and executable on the processor. When the processor executes the construction program of the lightweight pulsed neural network model, the above-mentioned any method is implemented.
[0023] Applying the technical solution of the present invention, by replacing the leaky integrate-and-fire (LIF) neuron activation function between the last two convolutional layers in two pulsed neural networks with a rectified linear unit (ReLU) activation function, a full-precision output feature representation can be obtained, improving the representation ability of the last layer of feature vectors; in addition, aligning the higher-precision output feature distribution trained with high-dimensional time steps with the lower-precision output feature distribution trained with low-dimensional time steps is conducive to the alignment and constraint of relative entropy. Combining the cross-entropy classification loss, the total classification loss can be obtained to supervise and train the network, constructing the entire target recognition pulsed neural network, thereby further improving the network accuracy of low-dimensional time step training, reducing the number of parameters of the overall network, and further realizing the high-precision target recognition requirements of the lightweight pulsed neural network. The model constructed by the method of the present invention can achieve higher-precision calculation results with fewer computing resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The included drawings are used to provide a further understanding of the embodiments of the present invention, which form a part of the specification, are used to illustrate the embodiments of the present invention, and are used to explain the principles of the present invention together with the text description. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0025] Figure 1 A block diagram showing a method for constructing a lightweight spiking neural network model provided according to an embodiment of the present invention;
[0026] Figure 2 A flowchart showing a method for constructing a lightweight spiking neural network model provided according to an embodiment of the present invention. Detailed implementation manners
[0027] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and in no way limits the present invention and its application or use. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0028] It should be noted that the terms used herein are only for describing specific implementation manners and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "include" and / or "comprise" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0029] Unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present invention. At the same time, it should be understood that, for the sake of convenience of description, the sizes of the various parts shown in the drawings are not drawn in actual proportional relationships. Technologies, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and devices should be regarded as part of the authorized specification. In all the examples shown and discussed herein, any specific value should be construed as merely exemplary and not as a limitation. Therefore, other examples of the exemplary embodiments may have different values. It should be noted that: like reference numerals and letters denote like items in the following drawings, and thus, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
[0030] As Figure 1 and Figure 2 shown, the present invention provides a method for constructing a lightweight spiking neural network model, and the method includes:
[0031] S10. Replace the leaky integrate-and-fire neuron activation function between the last two convolutional layers in the first spiking neural network with the rectified linear unit activation function, and replace the leaky integrate-and-fire neuron activation function between the last two convolutional layers in the second spiking neural network with the rectified linear unit activation function;
[0032] S20. Input the images with the first-dimensional time steps into the first spiking neural network to obtain the output feature distribution of the first spiking neural network, and input the images with the second-dimensional time steps into the second spiking neural network to obtain the output feature distribution of the second spiking neural network. Here, the first dimension is greater than the second dimension. That is to say, the images with the first-dimensional time steps are high-dimensional time-step images, the first spiking neural network is a high-dimensional time-step spiking neural network, the images with the second-dimensional time steps are low-dimensional time-step images, and the second spiking neural network is a low-dimensional time-step spiking neural network;
[0033] S30. Align the output feature distribution of the first spiking neural network and the output feature distribution of the second spiking neural network to obtain the relative entropy loss;
[0034] S40. Obtain the total classification loss based on the relative entropy loss and the cross-entropy classification loss of the second spiking neural network;
[0035] S50. Train the second spiking neural network based on the total classification loss, and use the trained second spiking neural network as the final spiking neural network model.
[0036] In the present invention, by replacing the leaky integrate-and-fire neuron activation function between the last two convolutional layers in two spiking neural networks with the rectified linear unit activation function, a full-precision output feature representation can be obtained, and the representation ability of the last-layer feature vector can be improved. In addition, aligning the relatively high-precision output feature distribution trained with high-dimensional time steps and the relatively low-precision output feature distribution trained with low-dimensional time steps is conducive to the alignment and constraint of relative entropy. Combining with the cross-entropy classification loss, the total classification loss can be obtained to supervise and train the network, and the entire target recognition spiking neural network can be constructed, thereby further improving the network accuracy of the low-dimensional time-step training, reducing the number of parameters of the overall network, and further realizing the high-precision target recognition requirements of the lightweight spiking neural network. The model constructed by the method of the present invention can achieve higher-precision calculation results with fewer computing resources.
[0037] According to an embodiment of the present invention, in S10 of the present invention, the structures of the first spiking neural network and the second spiking neural network are the same. The first or second spiking neural network includes n convolutional layers, an average pooling layer, and a fully connected layer connected in sequence. An activation function is provided between adjacent two convolutional layers. The activation function between the first n - 1 convolutional layers is a leaky integrate-and-fire neuron activation function, and the activation function between the (n - 1)-th layer and the n-th convolutional layer is a rectified linear activation function.
[0038] According to an embodiment of the present invention, in S20 of the present invention, inputting the image of the first-dimensional time step into the first spiking neural network to obtain the output feature distribution of the first spiking neural network, and inputting the image of the second-dimensional time step into the second spiking neural network to obtain the output feature distribution of the second spiking neural network includes:
[0039] S21. Input the image of the first-dimensional time step into several convolutional layers of the first spiking neural network in sequence. After the last convolution, obtain the first full-precision feature map. Input the image of the second-dimensional time step into several convolutional layers of the second spiking neural network in sequence. After the last convolution, obtain the second full-precision feature map;
[0040] S22. Input the first full-precision feature map into the average pooling layer of the first spiking neural network for pooling processing to obtain the first full-precision feature vector. Input the second full-precision feature map into the average pooling layer of the second spiking neural network for pooling processing to obtain the second full-precision feature vector;
[0041] S23. Input the first full-precision feature vector into the fully connected layer of the first spiking neural network for fully connected processing to obtain the output feature distribution of the first spiking neural network. Input the second full-precision feature vector into the fully connected layer of the second spiking neural network for fully connected processing to obtain the output feature distribution of the second spiking neural network.
[0042] According to an embodiment of the present invention, in S30 of the present invention, the relative entropy loss is obtained by the following formula:
[0043]
[0044] In the formula, L fe represents the relative entropy loss, SoftMax(P a ), SoftMax(P s ) respectively represent the normalized probabilities of P a , P s , and P a , P s respectively represent the output feature distributions of the first and second spiking neural networks.
[0045] According to an embodiment of the present invention, in S40 of the present invention, the total classification loss is obtained by the following formula:
[0046] L 总和 = L fe + λ·L ce ;
[0047] In the formula, L 总和 represents the total classification loss, L fe represents the relative entropy loss, L ce represents the cross-entropy classification loss, and λ represents the proportionality coefficient for adjusting the cross-entropy classification loss.
[0048] According to an embodiment of the present invention, in S50 of the present invention, the training method of the network can adopt the existing training method, which will not be elaborated herein.
[0049] To further understand the present invention, the following combines Figure 1 and Figure 2 to elaborate in detail on the construction method of the lightweight spiking neural network model of the present invention.
[0050] In this embodiment, the commonly used 34-layer spiking residual neural network (ResNet-34) in the industry is selected to conduct object recognition experiments and model construction on ImageNet (one of the most commonly used classification datasets in the field of object recognition). The experimental results of this experiment can be extended to spiking neural networks with any network structure and any network task. The following combines Figure 1 and Figure 2 to introduce the specific implementation method:
[0051] First step, set the activation function before the 32nd convolutional layer in the first spiking neural network to the leaky integrate-and-fire neuron activation function, and set the activation function before the 32nd convolutional layer in the second spiking neural network to the leaky integrate-and-fire neuron activation function. Among them, the definition of each leaky integrate-and-fire neuron activation function is as follows:
[0052] U(t,pre) = τ decay U(t - 1) + WX(t);
[0053] In the formula, U(t,pre) represents the membrane potential before firing at the t-th time step, U(t - 1) represents the membrane potential at the (t - 1)-th time step, τ decay represents the time decay constant describing the decay of the membrane potential, which is set to 0.25 here, W represents the weight of the current convolutional layer, and X(t) represents the spiking feature input, that is, the output of the previous leaky integrate-and-fire neuron activation function, and its value is a discrete binary integer value (0 or 1).
[0054] If U(t,pre) exceeds the given firing threshold Vth , the leaky integrate-and-fire neuron activation function will generate a pulse, and then the membrane voltage is reset to 0. The membrane potential is updated at each event step as shown in the following equation:
[0055]
[0056] U(t) = U(t,pre)·(1 - O(t));
[0057] In the formula, V th can be set to 0.5. O(t) represents the output of the leaky integrate-and-fire neuron activation function, and its output value is a discrete feature map. U(t) represents the membrane potential at the t-th time step.
[0058] Step 2: Set the activation function between the 32nd and 33rd convolutional layers in the first pulse neural network to the rectified linear unit activation function, and set the activation function between the 32nd and 33rd convolutional layers in the second pulse neural network to the rectified linear unit activation function. Among them, the definition of the rectified linear unit activation function is as follows:
[0059] O(t,last) = RELU(WX(t,last));
[0060] In the formula, O(t,last) represents the output of the rectified linear unit activation function, and its output value is a full-precision feature map. X(t,last) represents the pulse feature input of the 32nd layer, that is, the output of the last leaky integrate-and-fire neuron activation function.
[0061] Step 3: Input the images with high-dimensional time steps (T = 4) into several convolutional layers of the above-mentioned first pulse neural network in sequence. After the last convolution, a first full-precision feature map is obtained. Input the images with low-dimensional time steps (T = 2) into several convolutional layers of the above-mentioned second pulse neural network in sequence. After the last convolution, a second full-precision feature map is obtained.
[0062] Step 4: Input the first full-precision feature map into the average pooling layer (AvgPool) of the first pulse neural network for pooling processing to obtain a first full-precision feature vector. Input the second full-precision feature map into the average pooling layer of the second pulse neural network for pooling processing to obtain a second full-precision feature vector.
[0063] Step 5: Input the first full-precision feature vector into the fully connected layer of the first pulse neural network for fully connected processing. The output feature distribution of the first pulse neural network is obtained through the following formula. Input the second full-precision feature vector into the fully connected layer of the second pulse neural network for fully connected processing. The output feature distribution of the second pulse neural network is obtained through the following formula:
[0064] P = Wf AvgPool(O(t, last));
[0065] Wherein, P represents the output feature distribution of the first or second spiking neural network, that is, P a or P s , W f represents the weight matrix of the fully connected layer of the first or second spiking neural network, and AvgPool(O(t, last)) represents the first or second full-precision feature vector, and this value is a continuous floating-point value (from 0 to any positive floating-point number), so it can represent higher-precision features.
[0066] Step 6, Align the higher-precision output feature distribution of the high-dimensional time step (in this example, T = 4) with the lower-precision output feature distribution of the low-dimensional time step (in this example, T = 2) to improve the training of the output feature representation of the spiking neural network with the low-dimensional time step.
[0067] Use relative entropy (kl divergence) loss to constrain the alignment between output features, and define this part of the loss as L fe , and this part of the loss can be expressed as follows:
[0068]
[0069] Wherein, L fe represents relative entropy loss, SoftMax(P a ), SoftMax(P s ) respectively represent the normalized probabilities of P a , P s , where the SoftMax operator can convert the output value into a probability distribution ranging from [0, 1] and summing to 1, and P a , P s respectively represent the output feature distributions of the first (high-dimensional time step) and second (low-dimensional time step) spiking neural networks.
[0070] Step 7, In order to combine the specific loss term of the classification task, introduce the cross-entropy (ce is the abbreviation of Cross Entropy) classification loss L ce of the spiking neural network with the low-dimensional time step (in this example, T = 2), and combine the relative entropy (kl divergence) loss L fe , and define the total classification loss L 总和 as shown in the following formula:
[0071] L 总和 = L fe + λ·L ce ;
[0072] Wherein, L 总和Denote the total classification loss as \(L\). fe Denote the relative entropy loss as \(L\). ce Denote the cross - entropy classification loss. Let \(\lambda\) be the scaling factor for adjusting the cross - entropy classification loss. Here, \(\lambda = 2.0\), and it can be adjusted according to specific tasks in practice.
[0073] Step 8: Train the second spiking neural network based on the total classification loss, and use the trained second spiking neural network as the final spiking neural network model. Among them, the final spiking neural network model can effectively improve the model representation accuracy under the condition of a spiking neural network with low - dimensional time steps.
[0074] The present invention also provides a computer device, including a memory, a processor, and a construction program of a lightweight spiking neural network model stored on the memory and executable on the processor. When the processor executes the construction program of the lightweight spiking neural network model, the above - mentioned method is implemented.
[0075] In summary, the present invention provides a method and device for constructing a lightweight spiking neural network model. This method replaces the leaky integrate - and - fire neuron activation function between the last two convolutional layers in two spiking neural networks with a rectified linear activation function to obtain a full - precision output feature representation and improve the representation ability of the last - layer feature vector. In addition, align the higher - precision output feature distribution trained with high - dimensional time steps with the lower - precision output feature distribution trained with low - dimensional time steps, which is conducive to the alignment and constraint of relative entropy. Combining the cross - entropy classification loss, the total classification loss can be obtained to supervise and train the network, and the entire target - recognition spiking neural network is constructed, thereby further improving the network accuracy of low - dimensional time - step training, reducing the number of parameters of the overall network, and further meeting the high - precision target - recognition requirements of the lightweight spiking neural network. The model constructed by the method of the present invention can achieve higher - precision calculation results with fewer computing resources.
[0076] The parts not detailed in the present invention are well - known technologies to those skilled in the art.
[0077] In the description of the present invention, it should be understood that the orientation or positional relationships indicated by orientation words such as "front, back, up, down, left, right", "horizontal, vertical, perpendicular, horizontal", and "top, bottom" are usually based on the orientation or positional relationships shown in the drawings. They are only for convenience of describing the present invention and simplifying the description. Without contrary explanation, these orientation words do not indicate and imply that the devices or elements referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting the protection scope of the present invention; the orientation words "inside, outside" refer to the inside and outside relative to the contour of each component itself.
[0078] For ease of description, spatial relative terms such as "above", "over", "on the upper surface", "upper" etc. may be used herein to describe the spatial positional relationship of one device or feature to other devices or features as shown in the figures. It should be understood that the spatial relative terms are intended to encompass different orientations in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is inverted, a device described as "above" or "over" other devices or structures will then be positioned "below" or "under" the other devices or structures. Thus, the exemplary term "above" can include both orientations of "above" and "below". The device may also be positioned in other different ways (rotated 90 degrees or in other orientations), and corresponding interpretations of the spatial relative descriptions used herein will be made accordingly.
[0079] In addition, it should be noted that the use of terms such as "first" and "second" to define components is only for the convenience of differentiating the corresponding components. Without additional statements, the above terms have no special meanings, and thus should not be construed as limiting the protection scope of the present invention.
[0080] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for constructing a lightweight spiking neural network model, characterized in that, the method includes: Replacing the leaky integrate-and-fire neuron activation function between the last two convolutional layers in the first spiking neural network with a rectified linear activation function, and replacing the leaky integrate-and-fire neuron activation function between the last two convolutional layers in the second spiking neural network with a rectified linear activation function; Inputting the images with the first-dimensional time step into the first spiking neural network to obtain the output feature distribution of the first spiking neural network, and inputting the images with the second-dimensional time step into the second spiking neural network to obtain the output feature distribution of the second spiking neural network, where the first dimension is greater than the second dimension; Aligning the output feature distribution of the first spiking neural network and the output feature distribution of the second spiking neural network to obtain the relative entropy loss; Obtaining the total classification loss based on the relative entropy loss and the cross-entropy classification loss of the second spiking neural network; Training the second spiking neural network based on the total classification loss, and using the trained second spiking neural network as the final spiking neural network model.
2. The method according to claim 1, characterized in that, The first spiking neural network and the second spiking neural network have the same structure. The first or second spiking neural network includes n convolutional layers, an average pooling layer, and a fully connected layer connected in sequence. An activation function is provided between adjacent two convolutional layers. The activation function between the first n - 1 convolutional layers is a leaky integrate-and-fire neuron activation function, and the activation function between the n - 1th and the nth convolutional layers is a rectified linear activation function.
3. The method according to claim 1 or 2, characterized in that, Inputting the images with the first-dimensional time step into the first spiking neural network to obtain the output feature distribution of the first spiking neural network, and inputting the images with the second-dimensional time step into the second spiking neural network to obtain the output feature distribution of the second spiking neural network includes: Sequentially inputting the images with the first-dimensional time step into several convolutional layers of the first spiking neural network, and obtaining the first full-precision feature map after the last convolution. Sequentially inputting the images with the second-dimensional time step into several convolutional layers of the second spiking neural network, and obtaining the second full-precision feature map after the last convolution; Inputting the first full-precision feature map into the average pooling layer of the first spiking neural network for pooling processing to obtain the first full-precision feature vector, and inputting the second full-precision feature map into the average pooling layer of the second spiking neural network for pooling processing to obtain the second full-precision feature vector; Inputting the first full-precision feature vector into the fully connected layer of the first spiking neural network for fully connected processing to obtain the output feature distribution of the first spiking neural network, and inputting the second full-precision feature vector into the fully connected layer of the second spiking neural network for fully connected processing to obtain the output feature distribution of the second spiking neural network.
4. The method according to any one of claims 1 - 3, characterized in that, The relative entropy loss is obtained by the following formula: Where L fe represents the relative entropy loss, and SoftMax(P a ), SoftMax(P s ) represent the normalized probabilities of P a and P s respectively, and P a , P s represent the output feature distributions of the first and second pulsed neural networks respectively.
5. The method according to claim 4, characterized in that, The total classification loss is obtained by the following formula: L 总和 = L fe + λ·L ce ; Where, L 总和 represents the total classification loss, L fe represents the relative entropy loss, L ce represents the cross-entropy classification loss, and λ represents the proportionality coefficient for adjusting the cross-entropy classification loss.
6. A computer device, characterized in that, It includes a memory, a processor, and a construction program of a lightweight spiking neural network model stored in the memory and executable on the processor. When the processor executes the construction program of the lightweight spiking neural network model, it implements the method according to any one of claims 1 to 5.