CN110059812B - Pulse neural network operation chip and related operation method - Google Patents

Pulse neural network operation chip and related operation method Download PDF

Info

Publication number
CN110059812B
CN110059812B CN201910079638.1A CN201910079638A CN110059812B CN 110059812 B CN110059812 B CN 110059812B CN 201910079638 A CN201910079638 A CN 201910079638A CN 110059812 B CN110059812 B CN 110059812B
Authority
CN
China
Prior art keywords
neural network
neuron
pulse
clock
converted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910079638.1A
Other languages
Chinese (zh)
Other versions
CN110059812A (en
Inventor
张磊
杜子东
陈云霁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Computing Technology of CAS
Original Assignee
Institute of Computing Technology of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Computing Technology of CAS filed Critical Institute of Computing Technology of CAS
Priority to CN201910079638.1A priority Critical patent/CN110059812B/en
Publication of CN110059812A publication Critical patent/CN110059812A/en
Application granted granted Critical
Publication of CN110059812B publication Critical patent/CN110059812B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Neurology (AREA)
  • Image Analysis (AREA)
  • Feedback Control In General (AREA)

Abstract

The invention discloses a pulse neural network operation chip and a related operation method, wherein the pulse neural network operation method is applied to the pulse neural network operation chip, the method is applied to a pulse neural network, the pulse neural network comprises a clock neuron, and the method comprises the following steps: the clock neuron sends clock pulses at intervals of second time after the first time; and the output neuron corresponding to the clock neuron in the pulse neural network sends an output pulse according to the clock pulse.

Description

Pulse neural network operation chip and related operation method
Technical Field
The invention relates to the field of data processing, in particular to a pulse neural network operation chip and a related operation method.
Background
With the continuous development of information technology and the increasing demand of people, the requirement of people on the timeliness of information is higher and higher. At present, a neural network model is applied to various task scenes, such as image recognition, voice recognition, natural language processing and the like, but the traditional neural network model has too large computation amount, and the problem of how to effectively reduce the computation amount when the neural network model processes tasks needs to be solved urgently.
Disclosure of Invention
The embodiment of the application provides a pulse neural network operation method and a related product, which can reduce the operation amount of a neural network model.
In a first aspect, an embodiment of the present application provides a method for an impulse neural network to operate, where the method is applied to an impulse neural network, the impulse neural network includes a clock neuron, and the method includes:
the clock neuron sends clock pulses at intervals of second time after the first time;
and the output neuron corresponding to the clock neuron in the pulse neural network sends an output pulse according to the clock pulse.
In one possible example, the first time is later than an input pulse transmission time of an input neuron corresponding to the clock neuron.
In one possible example, the method further comprises:
monitoring the input pulse sending time of an input neuron corresponding to the clock neuron;
determining the first time based on a latest time of the monitored input pulse transmission times.
In one possible example, the method further comprises:
and determining the connection weight value between the clock neuron and the output neuron corresponding to the clock neuron according to the first time.
In one possible example, an output neuron in the spiking neural network corresponding to the clock neuron sends an output pulse according to the clock pulse, including:
and acquiring an output neuron corresponding to the clock neuron, and determining an output pulse according to an input pulse of the input neuron corresponding to the output neuron, a connection weight between the output neuron and the input neuron, and the clock pulse and the connection weight between the output neuron and the clock neuron.
In one possible example, the method further comprises:
and the output neuron corresponding to the clock neuron does not send an output pulse within the first time.
In one possible example, each network layer in the spiking neural network corresponds to a clock neuron.
In one possible example, a plurality of network layers in the spiking neural network correspond to one clock neuron.
In one possible example, the pulse coding manner of the impulse neural network is that the larger the value of the input data of the impulse neural network is, the later the pulse transmission time after the input data pulse coding is.
In one possible example, the output pulse is sent by the output neuron that first fired the pulse.
In one possible example, the output pulse is sent by an output neuron with the largest cumulative potential.
In one possible example, the method further comprises:
obtaining an artificial neural network to be converted according to a layer to be converted of the artificial neural network and a conversion activation function, wherein the result of the conversion activation function is positively correlated with input data of the artificial neural network;
training the artificial neural network to be converted to obtain the trained artificial neural network to be converted;
and obtaining the impulse neural network according to the artificial neural network to be converted after training and the clock neuron.
In one possible example, the layer to be translated includes at least one of the following network layers: a convolutional layer, a full link layer, and a pooling layer.
In one possible example, the to-be-converted layers are N network layers in the artificial neural network, where N is a positive integer.
In one possible example, the transition activation function is a piecewise function, wherein:
when the input data of the conversion activation function is smaller than a specified value, the result of the conversion activation function is a first specified constant;
when the input data of the conversion activation function is larger than or equal to the specified value, the result of the conversion activation function is positively correlated with the input data.
In one possible example, when the layer to be converted is a convolutional layer to be converted, obtaining a spiking neural network according to the trained artificial neural network to be converted and the clock neuron includes:
obtaining a conversion convolutional layer according to the convolutional layer to be converted, the corrected linear unit activation function and the conversion activation function in the trained artificial neural network to be converted;
and obtaining the pulse neural network according to the conversion convolution layer and the clock neuron.
In a possible example, when the to-be-converted layer is a to-be-converted fully-connected layer, obtaining a spiking neural network according to the trained to-be-converted artificial neural network and the trained clock neuron includes:
obtaining a conversion full-link layer according to the full-link layer to be converted, the modified linear unit activation function and the conversion activation function in the trained artificial neural network to be converted;
and obtaining a pulse neural network according to the conversion full connection layer and the clock neuron.
In a possible example, when the to-be-converted layer is a pooling layer to be converted, the obtaining a spiking neural network according to the trained to-be-converted artificial neural network and the clock neuron includes:
and when the pooling layer to be converted is an average pooling layer or a linear pooling layer, obtaining the impulse neural network according to the pooling layer to be converted and the clock neuron in the trained artificial neural network to be converted.
In one possible example, the obtaining the spiking neural network according to the trained artificial neural network to be transformed and the clock neuron includes:
and negating the weights of the impulse neural networks except the last layer.
In a second aspect, an embodiment of the present application further provides a spiking neural network operation chip, configured to perform the method according to the first aspect.
In a third aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes the chip according to the second aspect, or is configured to perform the method according to the first aspect.
In a fourth aspect, an embodiment of the present application further provides a board card, where the board card includes: a memory device, an interface device and a control device, and a pulse neural network operation chip as described in the second aspect;
the pulse neural network operation chip is respectively connected with the storage device, the control device and the interface device;
the storage device is used for storing data;
the interface device is used for realizing data transmission between the chip and external equipment;
and the control device is used for monitoring the state of the chip.
In a fifth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform some or all of the steps described in the first aspect of the present application.
In a sixth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, in the scheme of the embodiment of the present application, the pulse neural network is applied to the pulse neural network, the pulse neural network includes the clock neuron, the clock neuron sends the clock pulse at an interval of the second time after the first time, and the output neuron corresponding to the clock neuron in the pulse neural network sends the output pulse according to the clock pulse, so that the pulse neural network can be ensured to achieve the purpose of small calculation error while reducing the operation amount.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1A is a schematic structural diagram of a method for computing a spiking neural network according to an embodiment of the present disclosure;
fig. 1B is a schematic diagram of a processing procedure for converting CNN into SNN according to an embodiment of the present application;
fig. 1C is a schematic processing procedure diagram of an implementation mechanism of a clock neuron according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of another impulse neural network operation method according to an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of another impulse neural network operation method according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 5 is a block diagram of functional units of an impulse neural network computing device according to an embodiment of the present disclosure.
Detailed Description
The following are detailed below.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic devices may include various handheld devices having wireless communication functions, in-vehicle devices, wireless headsets, computing devices or other processing devices connected to wireless modems, as well as various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and the like, and may be, for example, smart phones, tablets, earphone boxes, and the like. For convenience of description, the above-mentioned devices are collectively referred to as electronic devices.
The electronic device described above may be applied in the following (including but not limited to) scenarios: the system comprises various electronic products such as a data processing device, a robot, a computer, a printer, a scanner, a telephone, a tablet computer, an intelligent terminal, a mobile phone, a driving recorder, a navigator, a sensor, a camera, a cloud server, a camera, a video camera, a projector, a watch, an earphone, a mobile storage device and a wearable device; various vehicles such as airplanes, ships, vehicles, and the like; various household appliances such as televisions, air conditioners, microwave ovens, refrigerators, electric cookers, humidifiers, washing machines, electric lamps, gas stoves, range hoods and the like; and various medical devices including nuclear magnetic resonance apparatuses, B-ultrasonic apparatuses, electrocardiographs and the like.
Referring to fig. 1A, fig. 1A is a schematic flow chart of a method for operating a spiking neural network according to an embodiment of the present disclosure, as shown in the figure, the method for operating a spiking neural network includes steps 101 to 103, which are as follows:
step 101, obtaining an artificial neural network to be converted according to a layer to be converted of the artificial neural network and a conversion activation function, wherein a result of the conversion activation function is positively correlated with input data of the artificial neural network.
In this embodiment of the application, the artificial Neural Network may be a deep Neural Network, and specifically may be a Convolutional Neural Network (CNN). The neural network may be an initialized neural network designated by a user, or a neural network which is preprocessed, trained for several times or trained completely. The neural network may be a modified linear activation function, and may be other activation functions, such as Sigmoid, TanH, and the like.
The result of the above-mentioned conversion activation function is positively correlated with the input data of the artificial neural network, and the conversion activation function may be at least one of the following: a linear function positively correlated with the input data of the artificial neural network, a continuous function positively correlated with the input data of the artificial neural network, and a piecewise function positively correlated with the input data of the artificial neural network, which are not limited herein.
In the embodiment of the present application, a conversion activation function may be represented by g (x), where x is input data of the artificial neural network. When the transition activation function is a linear function with positive correlation, the specific form of the transition activation function may be:
G(x)=ax+b
wherein a and b are preset constants.
When the transition activation function is a continuous function with positive correlation, the specific form of the transition activation function may be:
G(x)=cx
wherein c is a preset positive number.
Optionally, the conversion activation function may also be a piecewise function, where:
when the input data of the transition activation function is less than 1, the result of the transition activation function is a predetermined constant, such as a constant value of 0;
when the input data of the conversion activation function is greater than or equal to 1, the result of the conversion activation function is positively correlated with the input data.
The specific form of the conversion activation function may be:
Figure BDA0001958969070000071
optionally, when the transfer activation function is a positively correlated piecewise function, the transfer activation function is a piecewise function, wherein:
when the input data of the conversion activation function is less than zero, the result of the conversion activation function is 1;
when the input data of the conversion activation function is greater than or equal to zero, the result of the conversion activation function is positively correlated with the input data.
For example, the conversion activation function may be configured based on a preset leakage constant and input data, and a configuration manner of the conversion activation function is provided as follows:
the specific form of the transition activation function may be as follows:
Figure BDA0001958969070000072
where L represents the leakage constant, L > 0, and x is the input data.
In one possible example, the layer to be translated includes at least one of the following network layers: a convolutional layer, a full link layer, and a pooling layer.
In the embodiment of the present application, one or more layers of a convolutional layer, a fully-connected layer, or a pooling layer in the artificial neural network may be used as a to-be-converted layer, and the neural network conversion method in the embodiment of the present application may be used for conversion.
In one possible example, the to-be-converted layers are N network layers in the artificial neural network, where N is a positive integer.
Thus, one or more network layers in the artificial neural network can be converted, for example, when the convolutional layers include 4 layers, that is, N is 4, 1 convolutional layer, 2 convolutional layers, and the like in the convolutional layers can be converted by using the neural network conversion method in the embodiment of the present application, and the method can also be determined according to actual situations.
And 102, training the artificial neural network to be converted to obtain the trained artificial neural network to be converted.
The artificial neural network to be converted can be trained by utilizing a traditional artificial neural network training method, so that the artificial neural network to be converted after training is obtained.
And 103, obtaining a pulse neural network according to the artificial neural network to be converted and the clock neuron after training.
Among them, the Spiking Neural Networks (SNN) can effectively process spatial and temporal information. The impulse neural network can be used for image recognition, speech recognition, natural language processing. When the impulse neural network is obtained based on the artificial neural network conversion, the impulse neural network can have the precision of the artificial neural network and also has the characteristics of the impulse neural network, and the calculation speed can be improved.
In one possible example, the clock neuron sends a clock pulse at a second time interval after a first time.
The first time and the second time can be set by themselves or adopt default values of the system. The second time is a time interval, which can be understood as a beat.
Alternatively, in the embodiment of the present application, the impulse neural network may use LIF (free integration-and-fire neuron) neurons as clock neurons, and the potentials thereof may obey the following equations:
Figure BDA0001958969070000081
wherein V (t) represents the potential of the neuron data at time t, L is a leakage constant and is a number greater than 0, ωiIs the magnitude of the ith weight connected to the neuron, Ii(t) indicates whether the input ith neuron data delivers a pulse at time t.
In one possible example, when the layer to be transformed is a convolutional layer to be transformed, the step 103 of obtaining a spiking neural network according to the trained artificial neural network to be transformed and the clock neuron may include the following steps:
obtaining a conversion convolutional layer according to the convolutional layer to be converted, the corrected linear unit activation function and the conversion activation function in the trained artificial neural network to be converted;
and obtaining the pulse neural network according to the conversion convolution layer and the clock neuron.
The conversion convolutional layer can be obtained by mapping the convolutional layer to be converted, the modified linear unit activation function and the conversion activation function in the trained artificial neural network to be converted. The impulse neural network can be obtained according to the mapped convolution layer, other layers in the artificial neural network to be transformed after training, such as a full connection layer and the like, and a clock neuron.
In a possible example, when the to-be-converted layer is a to-be-converted fully-connected layer, the step 103 of obtaining a spiking neural network according to the trained to-be-converted artificial neural network and the clock neuron may include the following steps:
obtaining a conversion full-link layer according to the full-link layer to be converted, the modified linear unit activation function and the conversion activation function in the trained artificial neural network to be converted;
and obtaining a pulse neural network according to the conversion full connection layer and the clock neuron.
The conversion full-link layer can be obtained according to the full-link layer to be converted, the modified linear unit activation function and the conversion activation function mapping in the trained artificial neural network to be converted. The impulse neural network can be obtained according to the mapped conversion fully-connected layer, other layers in the artificial neural network to be converted after training, such as convolutional layers and the like, and clock neurons.
In a possible example, when the layer to be converted is a pooling layer to be converted, the obtaining of the spiking neural network according to the trained artificial neural network to be converted and the clock neuron may be performed as follows:
and when the pooling layer to be converted is an average pooling layer or a linear pooling layer, obtaining the impulse neural network according to the pooling layer to be converted and the clock neuron in the trained artificial neural network to be converted.
The conversion pooling layer can be obtained according to the pooling layer to be converted, the modified linear unit activation function and the conversion activation function mapping in the trained artificial neural network to be converted. The spiking neural network can be obtained according to the conversion pooling layer obtained by mapping, other layers in the artificial neural network to be converted after training, such as a full connection layer and the like, and the clock neuron.
After the step 103, the following steps may be further included:
a1, monitoring the transmission time of the input pulse of the input neuron corresponding to the clock neuron;
a2, determining the first time according to the latest time in the monitored sending time of the input pulse.
In one possible example, the first time may be preset according to a requirement. The first time may also be obtained by monitoring the input pulse transmission time of each input neuron, obtaining the latest time among the pulse transmission times of each input neuron in the network layer, and determining the first time according to the latest time. The first time is later than the latest time. Each input neuron finishes sending the input pulse before the first time.
In one possible example, a connection weight between the clock neuron and an output neuron corresponding to the clock neuron is determined according to the first time.
Wherein, the connection weight between the clock neuron and the output neuron corresponding to the layer where the clock neuron is located can be recorded as ωtick,ωtickCan be a positive number negatively correlated with T _ il, for example, ωtickThe specific form of (b) may be as follows:
ωtickthe first form of (c):
Figure BDA0001958969070000101
ωtickthe second form of (1):
ωtick=aT_il
wherein a is a constant greater than 0 and less than 1.
ωtickThe third form of (1):
Figure BDA0001958969070000102
wherein, ω istickAnd the connection weight value is shown, the T _ il is the first time, the L is a leakage constant, and the L is larger than 0.
In one possible example, the weights of the spiking neural networks except the last layer in the spiking neural network are inverted to satisfy the initial set encoding rule. The results of the last layer are used as output from the network without conversion.
In one possible example, the pulse encoding manner of the pulse neural network is: the larger the numerical value of the input data of the pulse neural network is, the later the pulse transmission time after pulse coding is.
Wherein, for all input data of the impulse neural network, the input data can be floating point numbers. The larger the value of the input data is, the later the pulse transmission time after the pulse encoding is. For example, the values of the 5 pieces of input data are a1, a2, a3, a4, a5, and a1, respectively, the pulse transmission time is T1, the pulse transmission time is T2 for a2, the pulse transmission time is T3 for a3, the pulse transmission time is T4 for a4, and the pulse transmission time is T5 for a 5. If the value of a3 is maximum, then T3 is the latest. By adopting the coding rule, on one hand, the pulse sending time of the pulse neural network is fully used for completing the transmission of information, and on the other hand, the accuracy loss of the operation result of the converted pulse neural network is smaller.
In addition, the SNN in the embodiment of the present application employs time coding, which can effectively reduce the amount of computation compared to rate-coding. With the new coding criterion, it is consistent with the characteristics of LIF neurons, i.e., post-synthetic neurons contribute more to the nearest pulse neurons.
In one possible example, after the step 103, the following steps may be further included:
and the output neuron corresponding to the clock neuron in the pulse neural network sends an output pulse according to the clock pulse. Thus, the accuracy loss of the operation result of the converted impulse neural network is smaller.
In one possible example, the first time is later than an input pulse transmission time of an input neuron corresponding to the clock neuron. Can ensure that the information of all input neurons can be smoothly transmitted backwards.
In one possible example, the above step, where an output neuron in the spiking neural network corresponding to the clock neuron sends an output pulse according to the clock pulse, may be implemented as follows:
and acquiring an output neuron corresponding to the clock neuron, and determining an output pulse according to an input pulse of the input neuron corresponding to the output neuron, a connection weight between the output neuron and the input neuron, and the clock pulse and the connection weight between the output neuron and the clock neuron. Thus, compared with CNN, the information transmission of input neurons is ensured, and the computation amount is greatly reduced.
In one possible example, an output neuron in the spiking neural network corresponding to the clock neuron sends an output pulse according to the clock pulse, further comprising:
an output neuron corresponding to the clock neuron does not send an output pulse within the first time. Since the weights of the clock neurons are all negative until the first time, no output pulse is sent within the first time.
In one possible example, each network layer in the spiking neural network corresponds to a clock neuron.
For example, a spiking neural network includes convolutional layers, fully-connected layers, and pooling layers. The convolutional layer can correspond to the clock neuron 1, the full connection layer corresponds to the clock neuron 2, and the pooling layer corresponds to the clock neuron 3, so that the first time for changing to the corresponding clock neuron can be determined according to the characteristics of each network layer, the waiting time is short, and the flexibility in information transmission is high.
In one possible example, a plurality of network layers in the spiking neural network correspond to one clock neuron. For example, the spiking neural network includes a convolutional layer, a fully-connected layer, and a pooling layer, wherein the convolutional layer, the fully-connected layer, and the pooling layer collectively correspond to the clock neuron 4. Therefore, the number of the whole network pulses can be reduced by adopting the same clock neuron, so that the energy consumption expense of network operation is saved.
In one possible example, the output pulses of the spiking neural network are sent by the output neuron that first fired a pulse. Thus, in the specific operation process, the result can be output quickly, and the operation amount can be reduced.
In one possible example, the output pulse of the spiking neural network is sent by the output neuron with the largest cumulative potential.
Therefore, the error of the output result can be reduced, and particularly, in the aspects of image recognition, path optimization and voice recognition, the recognition precision is improved.
For example, as shown in fig. 1B, a schematic diagram of CNN to SNN conversion is provided as follows, which may include the following three steps:
1. providing an artificial neural network CNN, wherein the CNN comprises a convolutional layer, a full-link layer and a pooling layer, and converting the CNN into an SNN;
2. adjusting the structure of the CNN, specifically, adding a conversion activation function g (x) before a weight connection layer (including a convolutional layer (CONV), a full connection layer (IP), and the like) to obtain an artificial neural network to be converted, where the weight connection layer may be understood as a layer connected by a weight. One specific form of G (x) is provided below:
Figure BDA0001958969070000121
wherein L is the leakage constant (the leakage constant), L > 0.
3. Training the artificial neural network to be converted to obtain the artificial neural network to be converted after training, and obtaining the impulse neural network, namely the SNN according to the artificial neural network to be converted after training and the clock neuron.
Wherein G (x) + CONV + ReLU may be mapped to SNN-CONV layer in SNN, POOL layer may be mapped to SNN-POOL layer, and G (x) + IP + ReLU may be mapped to SNN-IP layer in SNN. The weights of the impulse neural network are negated except for the last layer.
In a specific implementation, the input data of the artificial neural network may be converted into the pulse time by the function t (x), or alternatively, the input data of any layer in the artificial neural network may be converted into the pulse time by the function t (x), and all layers after the layer are also converted into the pulse time by the function t (x), where the specific form of t (x) may be as follows: for example, t (x) may be a function positively correlated with x, e.g., t (x) x + k, k is a constant, and for example, t (x) may be a nonlinear relationship, e.g., t (x) log (x +3), and for example, t (x) may be positively correlated with L, in the following manner:
T(x)=L·ln(x+1)
wherein, L is the leakage coefficient, and L is more than 0.
As shown in fig. 1C, in this mechanism, an input neuron represents neuron data existing in an original network (original artificial neural network), and a clock neuron corresponding to the input neuron, that is, a tick neuron, may be added on this basis. The input neuron only sends a pulse once, the output neuron is in a suppression period before all the input neurons send the pulse, after a time point T _ il, the clock neuron sends the pulse, and sends each beat like a "clock", so that the input neuron is named as a tick neuron in the embodiment of the present application.
Under the continuous pulse of the clock neuron, the corresponding output neuron of the clock neuron emits a pulse and then transmits downwards in the same way.
In a specific implementation, the operation mode aiming at the SNN-POOL layer depends on the type in the original artificial neural network. If the type before mapping is an Average Pool layer (Average Pool) or other Linear Pool layer (Linear Pool), it is treated as a layer with weight connection. The weight of the Average pooling layer (Average Pool) or other linear pooling layer is a constant that is related to the size of the sliding window.
If the type before mapping is the maximum pooling layer (Max Pool) or the minimum pooling layer (Min Pool), the SNN after mapping operates in a normal manner without the need to process and operate as a weight connection layer.
The embodiment of the application adopts a time coding mode to realize a method for converting the artificial neural network into the pulse neural network, and the pulse neural network obtained by conversion not only has the precision of the original artificial neural network but also can realize the obvious reduction of the operation amount by adopting the coding rule and the operation mode in the embodiment of the application.
In a specific implementation, the above-described ticking neuron is necessary because it ensures that all neurons can fire pulses. It is assumed that those post-synaptic neurons with negative potentials (post-synaptic neurons) will slowly approach the reset potential if the neuron is removed. Each neuron never emits a pulse unless it is set to a threshold below the reset potential, which is inconsistent with current SNN and neuroscience findings.
It can be seen that, in the scheme of the embodiment of the application, the artificial neural network to be converted is obtained according to the to-be-converted layer and the conversion activation function of the artificial neural network, the result of the conversion activation function is positively correlated with the input data of the artificial neural network, the artificial neural network to be converted is trained, the artificial neural network to be converted after training is obtained, and the impulse neural network is obtained according to the artificial neural network to be converted after training and the clock neuron.
Referring to fig. 2, fig. 2 is a schematic flow chart of an operation method of a spiking neural network according to an embodiment of the present application, where the method is applied to a spiking neural network, the spiking neural network includes a clock neuron, and the spiking neural network includes a clock neuron, as shown in the figure, the operation method of the spiking neural network includes:
step 201, the clock neuron sends a clock pulse at a second time interval after the first time.
And 202, the output neuron corresponding to the clock neuron in the pulse neural network sends an output pulse according to the clock pulse.
For the detailed description of the steps 201 to 202, reference may be made to the corresponding steps of the impulse neural network operation method described in the above fig. 1A, and details are not repeated here.
It can be seen that, in the scheme of the embodiment of the present application, the clock neuron sends the clock pulse at an interval of the second time after the first time, and the output neuron corresponding to the clock neuron in the impulse neural network sends the output pulse according to the clock pulse, so that the impulse neural network can be ensured to reduce the operation amount and have a small error.
Referring to fig. 3, fig. 3 is a schematic flow chart of an operation method of a spiking neural network according to an embodiment of the present application, as shown in the figure, the operation method of the spiking neural network includes:
step 301, obtaining an artificial neural network to be converted according to a to-be-converted layer of the artificial neural network and a conversion activation function, wherein a result of the conversion activation function is positively correlated with input data of the artificial neural network.
And 302, training the artificial neural network to be converted to obtain the trained artificial neural network to be converted.
And 303, obtaining a pulse neural network according to the artificial neural network to be converted and the clock neuron after training.
And step 304, the clock neuron sends a clock pulse at a second time interval after the first time.
And 305, the output neuron corresponding to the clock neuron in the pulse neural network sends an output pulse according to the clock pulse.
It can be seen that, in the solution of the embodiment of the present application, an artificial neural network to be transformed is obtained according to a to-be-transformed layer and a transformation activation function of the artificial neural network, a result of the transformation activation function is positively correlated with input data of the artificial neural network, the artificial neural network to be transformed is trained, the artificial neural network to be transformed after training is obtained, a pulse neural network is obtained according to the artificial neural network to be transformed after training and a clock neuron, the clock neuron sends clock pulses at intervals of a second time after a first time, and an output neuron in the pulse neural network corresponding to the clock neuron sends an output pulse according to the clock pulses, so that the pulse neural network is obtained based on the transformation of the artificial neural network, and therefore, the accuracy of the artificial neural network is achieved, and in addition, the characteristics of the pulse neural network are also achieved, and the calculation speed can be improved, and the pulse neural network can be ensured to reduce the operation amount and have small error.
In accordance with the foregoing embodiments, please refer to fig. 4, where fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, and as shown in the drawing, the electronic device includes a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and in an embodiment of the present application, the programs include instructions for performing the following steps:
obtaining an artificial neural network to be converted according to a layer to be converted of the artificial neural network and a conversion activation function, wherein the result of the conversion activation function is positively correlated with input data of the artificial neural network;
training the artificial neural network to be converted to obtain the trained artificial neural network to be converted;
and obtaining the impulse neural network according to the artificial neural network to be converted and the clock neuron after training.
In one possible example, the clock neuron sends a clock pulse at a second time interval after a first time.
In one possible example, the layer to be translated includes at least one of the following network layers: a convolutional layer, a full link layer, and a pooling layer.
In one possible example, the to-be-converted layers are N network layers in the artificial neural network, where N is a positive integer.
In one possible example, the transition activation function is a piecewise function, wherein:
when the input data of the conversion activation function is smaller than a specified value, the result of the conversion activation function is a first specified constant;
when the input data of the conversion activation function is larger than or equal to the specified value, the result of the conversion activation function is positively correlated with the input data.
In one possible example, when the layer to be transformed is a convolutional layer to be transformed, in terms of obtaining a spiking neural network according to the artificial neural network to be transformed after training and the clock neuron, the program includes instructions for performing the following steps:
obtaining a conversion convolutional layer according to the convolutional layer to be converted, the corrected linear unit activation function and the conversion activation function in the trained artificial neural network to be converted;
and obtaining the pulse neural network according to the conversion convolution layer and the clock neuron.
In one possible example, when the to-be-converted layer is a to-be-converted fully-connected layer, in terms of obtaining a spiking neural network according to the trained to-be-converted artificial neural network and clock neurons, the program includes instructions for performing the following steps:
obtaining a conversion full-link layer according to the full-link layer to be converted, the modified linear unit activation function and the conversion activation function in the trained artificial neural network to be converted;
and obtaining a pulse neural network according to the conversion full connection layer and the clock neuron.
In one possible example, when the layer to be converted is a pooling layer to be converted, in terms of obtaining a spiking neural network according to the artificial neural network to be converted and the clock neuron after training, the program includes instructions for performing the following steps:
and when the pooling layer to be converted is an average pooling layer or a linear pooling layer, obtaining the impulse neural network according to the pooling layer to be converted and the clock neuron in the trained artificial neural network to be converted.
In one possible example, a connection weight between the clock neuron and an output neuron corresponding to the clock neuron is determined according to the first time.
In one possible example, the pulse encoding manner of the pulse neural network is: the larger the numerical value of the input data of the pulse neural network is, the later the pulse transmission time after pulse coding is.
In one possible example, the program further includes instructions for performing the steps of: and negating the weights of the impulse neural networks except the last layer.
In one possible example, the program further includes instructions for performing the steps of:
and the output neuron corresponding to the clock neuron in the pulse neural network sends an output pulse according to the clock pulse.
In one possible example, the first time is later than an input pulse transmission time of an input neuron corresponding to the clock neuron.
In one possible example, the program further includes instructions for performing the steps of:
monitoring the input pulse sending time of an input neuron corresponding to the clock neuron;
determining the first time based on a latest time of the monitored input pulse transmission times.
In one possible example, an output neuron in the spiking neural network corresponding to the clock neuron sends an output pulse according to the clock pulse, the program comprising instructions for:
and acquiring an output neuron corresponding to the clock neuron, and determining an output pulse according to an input pulse of the input neuron corresponding to the output neuron, a connection weight between the output neuron and the input neuron, and the clock pulse and the connection weight between the output neuron and the clock neuron.
In one possible example, an output neuron in the spiking neural network corresponding to the clock neuron sends an output pulse according to the clock pulse, the program further comprising instructions for:
an output neuron corresponding to the clock neuron does not send an output pulse within the first time.
In one possible example, each network layer in the spiking neural network corresponds to a clock neuron.
In one possible example, a plurality of network layers in the spiking neural network correspond to one clock neuron.
In one possible example, the output pulses of the spiking neural network are sent by the output neuron that first fired a pulse.
In one possible example, the output pulse of the spiking neural network is sent by the output neuron with the largest cumulative potential.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 5 is a block diagram of functional units of a spiking neural network arithmetic device 500 according to an embodiment of the present application. The impulse neural network operation device 500 is applied to an electronic device, and the device 500 includes: a conversion unit 501, a training unit 502 and a determination unit 503, wherein,
the conversion unit 501 is configured to obtain an artificial neural network to be converted according to a layer to be converted and a conversion activation function of the artificial neural network, where a result of the conversion activation function is positively correlated with input data of the artificial neural network;
the training unit 502 is configured to train the artificial neural network to be transformed, so as to obtain the trained artificial neural network to be transformed;
the determining unit 503 is configured to obtain a spiking neural network according to the trained artificial neural network to be converted and the clock neuron.
It can be seen that, in the impulse neural network operation device described in the embodiment of the present application, the artificial neural network to be converted is obtained according to the to-be-converted layer and the conversion activation function of the artificial neural network, a result of the conversion activation function is positively correlated with input data of the artificial neural network, the artificial neural network to be converted is trained, the artificial neural network to be converted after training is obtained, and the impulse neural network is obtained according to the artificial neural network to be converted after training and the clock neuron.
In one possible example, the clock neuron sends a clock pulse at a second time interval after a first time.
In one possible example, the layer to be translated includes at least one of the following network layers: a convolutional layer, a full link layer, and a pooling layer.
In one possible example, the to-be-converted layers are N network layers in the artificial neural network, where N is a positive integer.
In one possible example, the transition activation function is a piecewise function, wherein:
when the input data of the conversion activation function is smaller than a specified value, the result of the conversion activation function is a first specified constant;
when the input data of the conversion activation function is larger than or equal to the specified value, the result of the conversion activation function is positively correlated with the input data.
In a possible example, when the layer to be converted is a convolutional layer to be converted, in terms of obtaining a spiking neural network according to the trained artificial neural network to be converted and the clock neuron, the determining unit 503 is specifically configured to:
obtaining a conversion convolutional layer according to the convolutional layer to be converted, the corrected linear unit activation function and the conversion activation function in the trained artificial neural network to be converted;
and obtaining the pulse neural network according to the conversion convolution layer and the clock neuron.
In a possible example, when the to-be-converted layer is a to-be-converted fully-connected layer, in terms of obtaining a spiking neural network according to the trained to-be-converted artificial neural network and the clock neuron, the determining unit 503 is specifically configured to:
obtaining a conversion full-link layer according to the full-link layer to be converted, the modified linear unit activation function and the conversion activation function in the trained artificial neural network to be converted;
and obtaining a pulse neural network according to the conversion full connection layer and the clock neuron.
In a possible example, when the to-be-converted layer is a to-be-converted pooling layer, in terms of obtaining a spiking neural network according to the trained to-be-converted artificial neural network and the clock neuron, the determining unit 503 is specifically configured to:
and when the pooling layer to be converted is an average pooling layer or a linear pooling layer, obtaining the impulse neural network according to the pooling layer to be converted and the clock neuron in the trained artificial neural network to be converted.
In one possible example, a connection weight between the clock neuron and an output neuron corresponding to the clock neuron is determined according to the first time.
In one possible example, the pulse encoding manner of the pulse neural network is: the larger the numerical value of the input data of the pulse neural network is, the later the pulse transmission time after pulse coding is.
In one possible example, the weights of the impulse neural network except for the last layer are inverted.
In one possible example, an output neuron in the spiking neural network corresponding to the clock neuron sends an output pulse according to the clock pulse.
In one possible example, the first time is later than an input pulse transmission time of an input neuron corresponding to the clock neuron.
In one possible example, the determining unit 503 is further specifically configured to monitor an input pulse transmission time of an input neuron corresponding to the clock neuron; and determining the first time based on a latest time of the monitored input pulse transmission times.
In one possible example, in the aspect that an output neuron corresponding to the clock neuron in the spiking neural network sends an output pulse according to the clock pulse, specifically:
and acquiring an output neuron corresponding to the clock neuron, and determining an output pulse according to an input pulse of the input neuron corresponding to the output neuron, a connection weight between the output neuron and the input neuron, and the clock pulse and the connection weight between the output neuron and the clock neuron.
In one possible example, an output neuron in the spiking neural network corresponding to the clock neuron sends an output pulse according to the clock pulse, further comprising:
an output neuron corresponding to the clock neuron does not send an output pulse within the first time.
In one possible example, each network layer in the spiking neural network corresponds to a clock neuron.
In one possible example, a plurality of network layers in the spiking neural network correspond to one clock neuron.
In one possible example, the output pulses of the spiking neural network are sent by the output neuron that first fired a pulse.
In one possible example, the output pulse of the spiking neural network is sent by the output neuron with the largest cumulative potential.
In one possible example, the apparatus is further embodied for:
the clock neuron sends clock pulses at intervals of second time after the first time;
and the output neuron corresponding to the clock neuron in the pulse neural network sends an output pulse according to the clock pulse.
In some embodiments, a chip is also claimed, which includes the above machine learning arithmetic device or the combined processing device.
In some embodiments, a chip package structure is provided, which includes the above chip.
In some embodiments, a board card is provided, which includes the above chip package structure. The board card may include other accessories besides the chip, including but not limited to: a memory device, an interface apparatus and a control device;
the memory device is connected with the chip in the chip packaging structure through a bus and used for storing data. The memory device may include a plurality of groups of memory cells. Each group of the storage units is connected with the chip through a bus. It is understood that each group of the memory cells may be a DDR SDRAM (Double Data Rate SDRAM).
DDR can double the speed of SDRAM without increasing the clock frequency. DDR allows data to be read out on the rising and falling edges of the clock pulse. DDR is twice as fast as standard SDRAM. In one embodiment, the storage device may include 4 sets of the storage unit. Each group of the memory cells may include a plurality of DDR4 particles (chips). In one embodiment, the chip may internally include 4 72-bit DDR4 controllers, and 64 bits of the 72-bit DDR4 controller are used for data transmission, and 8 bits are used for ECC check. It can be understood that when DDR4-3200 particles are adopted in each group of memory cells, the theoretical bandwidth of data transmission can reach 25600 MB/s.
In one embodiment, each group of the memory cells includes a plurality of double rate synchronous dynamic random access memories arranged in parallel. DDR can transfer data twice in one clock cycle. And a controller for controlling DDR is arranged in the chip and is used for controlling data transmission and data storage of each memory unit.
The interface device is electrically connected with a chip in the chip packaging structure. The interface device is used for realizing data transmission between the chip and an external device (such as a server or a computer). For example, in one embodiment, the interface device may be a standard PCIE interface. For example, the data to be processed is transmitted to the chip by the server through the standard PCIE interface, so as to implement data transfer. Optionally, when PCIE 3.0X 16 interface transmission is adopted, the theoretical bandwidth may reach 16000 MB/s. In another embodiment, the interface device may also be another interface, and the present application does not limit the concrete expression of the other interface, and the interface unit may implement the switching function. In addition, the calculation result of the chip is still transmitted back to an external device (e.g., a server) by the interface device.
The control device is electrically connected with the chip. The control device is used for monitoring the state of the chip. Specifically, the chip and the control device may be electrically connected through an SPI interface. The control device may include a single chip Microcomputer (MCU). The chip may include a plurality of processing chips, a plurality of processing cores, or a plurality of processing circuits, and may carry a plurality of loads. Therefore, the chip can be in different working states such as multi-load and light load. The control device can realize the regulation and control of the working states of a plurality of processing chips, a plurality of processing andor a plurality of processing circuits in the chip.
In some embodiments, an electronic device is provided that includes the above board card.
The electronic device comprises a data processing device, a robot, a computer, a printer, a scanner, a tablet computer, an intelligent terminal, a mobile phone, a vehicle data recorder, a navigator, a sensor, a camera, a server, a cloud server, a camera, a video camera, a projector, a watch, an earphone, a mobile storage, a wearable device, a vehicle, a household appliance, and/or a medical device.
The vehicle comprises an airplane, a ship and/or a vehicle; the household appliances comprise a television, an air conditioner, a microwave oven, a refrigerator, an electric cooker, a humidifier, a washing machine, an electric lamp, a gas stove and a range hood; the medical equipment comprises a nuclear magnetic resonance apparatus, a B-ultrasonic apparatus and/or an electrocardiograph.
Embodiments of the present invention also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enables a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present invention also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are exemplary embodiments and that the acts and modules illustrated are not necessarily required to practice the invention.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware.
The above embodiments of the present invention are described in detail, and the principle and the implementation of the present invention are explained by applying specific embodiments, and the above description of the embodiments is only used to help understanding the method of the present invention and the core idea thereof; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in view of the above, the content of the present specification should not be construed as a limitation to the present invention.

Claims (22)

1. A spiking neural network operation method, applied to a spiking neural network including clock neurons, the method comprising:
monitoring the input pulse sending time of an input neuron corresponding to the clock neuron;
determining a first time according to the latest time in the monitored input pulse transmission times;
the clock neuron sends clock pulses at intervals of second time after the first time;
and the output neuron corresponding to the clock neuron in the pulse neural network sends an output pulse according to the clock pulse.
2. The method of claim 1, wherein the first time is later than an input pulse transmission time of an input neuron corresponding to the clock neuron.
3. The method of claim 1, further comprising:
and determining the connection weight value between the clock neuron and the output neuron corresponding to the clock neuron according to the first time.
4. The method of claim 1, wherein an output neuron in the spiking neural network corresponding to the clock neuron sends an output pulse according to the clock pulse, comprising:
and acquiring an output neuron corresponding to the clock neuron, and determining an output pulse according to an input pulse of the input neuron corresponding to the output neuron, a connection weight between the output neuron and the input neuron, and the clock pulse and the connection weight between the output neuron and the clock neuron.
5. The method of claim 1, further comprising:
and the output neuron corresponding to the clock neuron does not send an output pulse within the first time.
6. The method of claim 1, wherein each network layer in the spiking neural network corresponds to a clock neuron.
7. The method of claim 1, wherein a plurality of network layers in the spiking neural network correspond to one clock neuron.
8. The method of claim 1, wherein the impulse neural network is pulse encoded such that the larger the value of the input data to the impulse neural network, the later the transmission time of the pulse after the pulse encoding of the input data.
9. The method of claim 1, wherein the output pulse is sent by an output neuron that first fires a pulse.
10. The method of claim 1, wherein the output pulse is sent by an output neuron with the largest cumulative potential.
11. The method of claim 1, further comprising:
obtaining an artificial neural network to be converted according to a layer to be converted of the artificial neural network and a conversion activation function, wherein the result of the conversion activation function is positively correlated with input data of the artificial neural network;
training the artificial neural network to be converted to obtain the trained artificial neural network to be converted;
and obtaining the impulse neural network according to the artificial neural network to be converted after training and the clock neuron.
12. The method of claim 11, wherein the layer to be translated comprises at least one of the following network layers: a convolutional layer, a full link layer, and a pooling layer.
13. The method of claim 11, wherein the layer to be converted is N network layers in the artificial neural network, where N is a positive integer.
14. The method of claim 11, wherein the transition activation function is a piecewise function, wherein:
when the input data of the conversion activation function is smaller than a specified value, the result of the conversion activation function is a first specified constant;
when the input data of the conversion activation function is larger than or equal to the specified value, the result of the conversion activation function is positively correlated with the input data.
15. The method according to any one of claims 11 to 14, wherein when the layer to be transformed is a convolutional layer to be transformed, obtaining a spiking neural network according to the trained artificial neural network to be transformed and the clock neuron comprises:
obtaining a conversion convolutional layer according to the convolutional layer to be converted, the corrected linear unit activation function and the conversion activation function in the trained artificial neural network to be converted;
and obtaining the pulse neural network according to the conversion convolution layer and the clock neuron.
16. The method according to any one of claims 11 to 14, wherein when the to-be-converted layer is a to-be-converted fully-connected layer, the obtaining a spiking neural network according to the trained to-be-converted artificial neural network and the clock neuron comprises:
obtaining a conversion full-link layer according to the full-link layer to be converted, the modified linear unit activation function and the conversion activation function in the trained artificial neural network to be converted;
and obtaining a pulse neural network according to the conversion full connection layer and the clock neuron.
17. The method according to any one of claims 11 to 14, wherein when the layer to be converted is a pooling layer to be converted, the obtaining the spiking neural network according to the artificial neural network to be converted after training and the clock neuron comprises:
and when the pooling layer to be converted is an average pooling layer or a linear pooling layer, obtaining the impulse neural network according to the pooling layer to be converted and the clock neuron in the trained artificial neural network to be converted.
18. The method of claim 11, wherein obtaining the spiking neural network according to the artificial neural network to be transformed after training and the clock neuron comprises:
and negating the weights of the impulse neural networks except the last layer.
19. A spiking neural network computing chip, configured to perform the method according to any one of claims 1 to 18.
20. An electronic device, characterized in that the electronic device comprises the chip of claim 19 or is adapted to perform the method of any of claims 1-18.
21. The utility model provides a board card, its characterized in that, the board card includes: a memory device, an interface device and a control device and the spiking neural network computing chip of claim 19;
the pulse neural network operation chip is respectively connected with the storage device, the control device and the interface device;
the storage device is used for storing data;
the interface device is used for realizing data transmission between the chip and external equipment;
and the control device is used for monitoring the state of the chip.
22. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method of any one of claims 1-18.
CN201910079638.1A 2019-01-26 2019-01-26 Pulse neural network operation chip and related operation method Active CN110059812B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910079638.1A CN110059812B (en) 2019-01-26 2019-01-26 Pulse neural network operation chip and related operation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910079638.1A CN110059812B (en) 2019-01-26 2019-01-26 Pulse neural network operation chip and related operation method

Publications (2)

Publication Number Publication Date
CN110059812A CN110059812A (en) 2019-07-26
CN110059812B true CN110059812B (en) 2021-09-14

Family

ID=67316491

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910079638.1A Active CN110059812B (en) 2019-01-26 2019-01-26 Pulse neural network operation chip and related operation method

Country Status (1)

Country Link
CN (1) CN110059812B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110909869B (en) * 2019-11-21 2022-08-23 浙江大学 Brain-like computing chip based on impulse neural network
CN114819122B (en) * 2022-03-28 2022-12-06 中国科学院自动化研究所 Data processing method and device based on impulse neural network

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095965A (en) * 2015-07-16 2015-11-25 清华大学 Hybrid communication method of artificial neural network and impulsive neural network
CN105404902A (en) * 2015-10-27 2016-03-16 清华大学 Impulsive neural network-based image feature describing and memorizing method
CN106845633A (en) * 2017-01-25 2017-06-13 清华大学 Neutral net information conversion method and system
CN106897769A (en) * 2017-01-20 2017-06-27 清华大学 The neuronal messages processing method and system of window are drawn with depth time
CN108334933A (en) * 2018-03-02 2018-07-27 广东工业大学 A kind of neuron activation functions parameter adjusting method and its device
CN108985447A (en) * 2018-06-15 2018-12-11 华中科技大学 A kind of hardware pulse nerve network system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8725662B2 (en) * 2011-09-21 2014-05-13 Brain Corporation Apparatus and method for partial evaluation of synaptic updates based on system events

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095965A (en) * 2015-07-16 2015-11-25 清华大学 Hybrid communication method of artificial neural network and impulsive neural network
CN105404902A (en) * 2015-10-27 2016-03-16 清华大学 Impulsive neural network-based image feature describing and memorizing method
CN106897769A (en) * 2017-01-20 2017-06-27 清华大学 The neuronal messages processing method and system of window are drawn with depth time
CN106845633A (en) * 2017-01-25 2017-06-13 清华大学 Neutral net information conversion method and system
CN108334933A (en) * 2018-03-02 2018-07-27 广东工业大学 A kind of neuron activation functions parameter adjusting method and its device
CN108985447A (en) * 2018-06-15 2018-12-11 华中科技大学 A kind of hardware pulse nerve network system

Also Published As

Publication number Publication date
CN110059812A (en) 2019-07-26

Similar Documents

Publication Publication Date Title
CN109993296B (en) Quantitative implementation method and related product
US11698786B2 (en) Processing apparatus and processing method
JP6761134B2 (en) Processor controllers, methods and devices
CN109062612B (en) Neural network processing device and method for executing plane rotation instruction
CN104821612B (en) Charging circuit and electronic equipment with charging circuit
CN110059812B (en) Pulse neural network operation chip and related operation method
CN110059800B (en) Pulse neural network conversion method and related conversion chip
CN111381871B (en) Operation method, device and related product
CN111047022B (en) Computing device and related product
CN110909870B (en) Training device and method
CN109739703B (en) Debugging method and related product
CN110750351A (en) Multi-core task scheduler, multi-core task scheduling method, multi-core task scheduling device and related products
CN106155301A (en) A kind of family Internet of Things control method, Apparatus and system
CN105138133A (en) Biological signal gesture recognition device and method
CN109754084A (en) Processing method, device and the Related product of network structure
CN111930681B (en) Computing device and related product
CN109213581B (en) Data processing device and method
WO2021185262A1 (en) Computing apparatus and method, board card, and computer readable storage medium
CN111523653B (en) Computing device and method
CN109740746B (en) Operation method, device and related product
CN110309877A (en) A kind of quantization method, device, electronic equipment and the storage medium of feature diagram data
CN112166441A (en) Data processing method, device and computer readable storage medium
CN111382847A (en) Data processing device and related product
CN111967588A (en) Quantitative operation method and related product
CN110020720B (en) Operator splicing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant