CN108717570A - A kind of impulsive neural networks parameter quantification method - Google Patents
A kind of impulsive neural networks parameter quantification method Download PDFInfo
- Publication number
- CN108717570A CN108717570A CN201810501442.2A CN201810501442A CN108717570A CN 108717570 A CN108717570 A CN 108717570A CN 201810501442 A CN201810501442 A CN 201810501442A CN 108717570 A CN108717570 A CN 108717570A
- Authority
- CN
- China
- Prior art keywords
- neural network
- parameters
- parameter
- pulse
- snn
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 44
- 238000011002 quantification Methods 0.000 title claims abstract description 6
- 238000013139 quantization Methods 0.000 claims abstract description 28
- 238000012549 training Methods 0.000 claims abstract description 23
- 230000000946 synaptic effect Effects 0.000 claims abstract description 15
- 230000036279 refractory period Effects 0.000 claims abstract description 12
- 238000001208 nuclear magnetic resonance pulse sequence Methods 0.000 claims description 16
- 238000012360 testing method Methods 0.000 claims description 11
- 238000013507 mapping Methods 0.000 claims description 5
- 238000013527 convolutional neural network Methods 0.000 claims description 4
- 238000012421 spiking Methods 0.000 claims description 3
- 238000012935 Averaging Methods 0.000 claims 2
- 125000004122 cyclic group Chemical group 0.000 claims 1
- 230000007787 long-term memory Effects 0.000 claims 1
- 230000006403 short-term memory Effects 0.000 claims 1
- 239000000758 substrate Substances 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 14
- 210000002569 neuron Anatomy 0.000 description 11
- 230000006870 function Effects 0.000 description 9
- 230000001934 delay Effects 0.000 description 4
- 230000000875 corresponding effect Effects 0.000 description 3
- 230000001419 dependent effect Effects 0.000 description 2
- 239000012528 membrane Substances 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/061—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using biological neurons, e.g. biological neurons connected to an integrated circuit
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/063—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Theoretical Computer Science (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- General Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Neurology (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
技术领域technical field
本发明涉及神经网络技术领域,尤其涉及一种脉冲神经网络参数量化方法。The invention relates to the technical field of neural networks, in particular to a parameter quantification method of a pulse neural network.
背景技术Background technique
脉冲神经网络(简称SNN)被称为第三代神经网络,它更接近于人脑处理信息的方式,是未来神经网络技术的发展方向。SNN基于脉冲序列来接收信息,有很多编码方式可以把脉冲序列解释为一个实际的数字,常用的编码方式有脉冲编码和频率编码。神经元之间的通信也是通过脉冲来进行,当一个神经元的膜电位大于它的阈值,它会产生一个脉冲信号传递给其他神经元,提高或降低其膜电位。SNN的硬件平台被称为神经形态芯片或类脑芯片,完全颠覆了传统的冯诺依曼架构,这类芯片具有低功耗,资源消耗少等特点,在分类和识别等类人脑领域的表现要大大优于传统芯片。SNN的训练方式主要有两种,一种是通过在特定条件下训练相应的人工神经网络(简称ANN)再把训练好的参数映射到SNN中,但是在映射过程中往往会需要传递大量的参数;另外一种是直接进行SNN的在线学习,同样也伴随着产生大量的参数。若采用传统存储器(如SRAM、DRAM等)存储参数则需要巨大的存储空间,若采用忆阻器等新型器件存储参数,则难以精确稳定地实现众多参数;同时,巨大的参数量会降低运算速度、增大运算功耗。目前还没有一种能够对SNN中的大量参数进行压缩的方法。Spiking neural network (SNN for short) is called the third-generation neural network, which is closer to the way the human brain processes information and is the future development direction of neural network technology. SNNs receive information based on pulse sequences. There are many encoding methods that can interpret the pulse sequence as an actual number. Commonly used encoding methods include pulse encoding and frequency encoding. The communication between neurons is also carried out through pulses. When the membrane potential of a neuron is greater than its threshold, it will generate a pulse signal and transmit it to other neurons to increase or decrease its membrane potential. The hardware platform of SNN is called neuromorphic chip or brain-like chip, which completely subverts the traditional von Neumann architecture. This kind of chip has the characteristics of low power consumption and less resource consumption. The performance is much better than traditional chips. There are two main ways to train SNN. One is to map the trained parameters to SNN by training the corresponding artificial neural network (ANN for short) under specific conditions, but it is often necessary to pass a large number of parameters during the mapping process. ; The other is to directly conduct online learning of SNN, which is also accompanied by a large number of parameters. If traditional memory (such as SRAM, DRAM, etc.) is used to store parameters, a huge storage space is required. If new devices such as memristors are used to store parameters, it is difficult to accurately and stably realize many parameters; at the same time, the huge amount of parameters will reduce the calculation speed , Increase computing power consumption. There is currently no method that can compress the large number of parameters in SNNs.
发明内容Contents of the invention
为了解决现有技术的问题,本发明提供了一种可以减少SNN参数存储空间的方法。In order to solve the problems in the prior art, the present invention provides a method that can reduce the storage space of SNN parameters.
本发明的技术方案如下:Technical scheme of the present invention is as follows:
一种脉冲神经网络参数量化方法,其特征在于,包括以下步骤:A kind of spiking neural network parameter quantification method, is characterized in that, comprises the following steps:
获取训练完成的原始SNN。SNN中神经元为脉冲神经元(如LIF神经元),具有输入脉冲整合累积功能以及脉冲发放功能,SNN以脉冲序列作为输入,SNN的主要参数包括权值、阈值、泄漏常数、置位电压、不应期、突触延迟等。训练完成的SNN具有高精度的分类、识别等功能。获取训练完成的神经网络主要有两种方法:一种是通过离线映射获取训练完成的SNN,通过训练ANN常用的随机梯度下降等方法训练ANN(包括MLP、CNN、RNN、LSTM等),获得满足指标要求(例如分类、识别精度等)的ANN后完成训练过程,再把训练完成的ANN的参数映射到拓扑结构相同的SNN中,将ANN的输入采用脉冲序列编码(例如泊松分布的脉冲序列)后作为SNN的输入,从而获取训练完成的SNN;一种是通过在线训练获取训练完成的SNN,建立如自组织SNN或其他结构的SNN,利用突触脉冲时序依赖可塑性(STDP)等学习规则,采用脉冲序列(例如泊松分布脉冲序列、时间编码脉冲序列等)通过在线学习训练SNN,训练过程中调整SNN的权值、阈值、泄漏常数、置位电压、不应期、突触延迟等参数,获得满足指标要求(例如分类、识别精度等)SNN后完成训练过程,训练结束后固定SNN的权值、阈值、泄漏常数、置位电压、不应期、突触延迟等参数,从而获得训练完成的SNN;Get the original SNN that has been trained. The neuron in the SNN is a pulse neuron (such as a LIF neuron), which has the function of integrating and accumulating input pulses and the function of emitting pulses. The SNN uses pulse sequences as input. The main parameters of the SNN include weights, thresholds, leakage constants, set voltages, Refractory period, synaptic delay, etc. The trained SNN has high-precision classification, recognition and other functions. There are two main ways to obtain the trained neural network: one is to obtain the trained SNN through offline mapping, and train the ANN (including MLP, CNN, RNN, LSTM, etc.) After completing the training process of the ANN with index requirements (such as classification, recognition accuracy, etc.), the parameters of the trained ANN are mapped to the SNN with the same topology, and the input of the ANN is coded by pulse sequence (such as the pulse sequence of Poisson distribution ) as the input of the SNN to obtain the trained SNN; one is to obtain the trained SNN through online training, establish a self-organizing SNN or a SNN with other structures, and use learning rules such as synaptic pulse timing-dependent plasticity (STDP) , use pulse sequences (such as Poisson distribution pulse sequences, time-coded pulse sequences, etc.) to train SNN through online learning, and adjust SNN weights, thresholds, leakage constants, set voltages, refractory periods, and synaptic delays during training. After obtaining the SNN that meets the index requirements (such as classification, recognition accuracy, etc.), the training process is completed. After the training, the parameters such as the weight, threshold, leakage constant, set voltage, refractory period, and synaptic delay of the SNN are fixed, so as to obtain The trained SNN;
选取需要量化的一个或多个参数。可以量化的参数包括权值、阈值、泄漏常数、置位电压、不应期、突触延迟等。Select one or more parameters to be quantized. Parameters that can be quantified include weights, thresholds, leakage constants, set voltages, refractory periods, synaptic delays, and more.
分别统计某一层或某几层或所有层参数分布情况;Separately count the distribution of parameters of a certain layer or several layers or all layers;
尝试对参数进行区间划分。选取参数区间划分方法和区间数目,区间的划分方法可采用均分法、非均分法、置信区间划分法等,划分区间的方法和数目可以根据具体的神经网络结构和任务类型以及指标要求,通过参数调整经验进行尝试和调整;Try interval-dividing the parameters. Select the parameter interval division method and the number of intervals. The interval division method can be divided into equal division method, non-uniform division method, confidence interval division method, etc. The method and number of division intervals can be based on the specific neural network structure, task type and index requirements. Try and adjust through parameter adjustment experience;
根据区间对参数进行量化。遍历所有区间内的参数,将所有分布在同一区间内的参数量化为同一个值(即一个量化值),量化值的大小和正负根据具体的神经网络结构和任务类型以及指标要求,通过参数调整经验进行尝试和调整;Quantize parameters in terms of intervals. Traverse all the parameters in the interval, and quantize all the parameters distributed in the same interval to the same value (that is, a quantization value). The size and sign of the quantization value are based on the specific neural network structure, task type, and index requirements. Adapt experience to try and adjust;
用量化后的参数替换原始SNN中对应参数,获得参数量化SNN;Replace the corresponding parameters in the original SNN with the quantized parameters to obtain the parameter quantized SNN;
采用原始SNN的输入作为输入,对参数量化SNN进行测试,若测试结果满足指标要求则结束,否则返回重新选取参数区间划分方法和区间数目,并对参数进行区间划分和后续过程。The input of the original SNN is used as the input, and the parameter quantized SNN is tested. If the test result meets the index requirements, it ends. Otherwise, it returns to reselect the parameter interval division method and the number of intervals, and performs interval division and subsequent processes on the parameters.
本发明的有益效果为,本发明的方法可以把ANN转化为SNN,并实现SNN的参数量化,该量化方法操作简单灵活,可以实现多种形式的量化,而且对神经网络的性能几乎没有任何影响,可以节省存储资源,提高计算速度。尤其当需要实现SNN硬件化的时候,该方法可以减小RAM等片上资源消耗和计算复杂度,提高硬件计算速度和性能。The beneficial effects of the present invention are that the method of the present invention can transform ANN into SNN, and realize parameter quantization of SNN. The quantization method is simple and flexible in operation, can realize quantization in various forms, and has almost no influence on the performance of neural network , which can save storage resources and improve computing speed. Especially when it is necessary to implement SNN hardware, this method can reduce the consumption of RAM and other on-chip resources and computational complexity, and improve the hardware computational speed and performance.
附图说明Description of drawings
图1是本发明实例提供的一种SNN参数量化方法示意图;Fig. 1 is the schematic diagram of a kind of SNN parameter quantization method provided by the example of the present invention;
图2是图1中ANN示例之一MLP示意图;Fig. 2 is a schematic diagram of MLP, one of the ANN examples in Fig. 1;
图3是图1中ANN示例之一CNN示意图;Fig. 3 is a CNN schematic diagram of one of the ANN examples in Fig. 1;
图4是图1中ANN示例之一RNN示意图;Fig. 4 is a schematic diagram of RNN, one of the ANN examples in Fig. 1;
图5是图1中ANN示例之一LSTM示意图;Fig. 5 is a schematic diagram of LSTM, one of the ANN examples in Fig. 1;
图6是图1中SNN示例之一自组织网络示意图;Fig. 6 is a schematic diagram of an ad hoc network of one of the SNN examples in Fig. 1;
图7是图1中量化参数示例之一权值分布图和区间划分情况;Figure 7 is a weight distribution diagram and interval division of one of the quantization parameter examples in Figure 1;
图8是图2中量化参数示例之一阈值分布图和区间划分情况;Figure 8 is a threshold distribution diagram and interval division of one of the quantization parameter examples in Figure 2;
图9是图2中量化参数示例之一泄漏常数分布图和区间划分情况;Fig. 9 is a leakage constant distribution diagram and interval division of one of the quantitative parameter examples in Fig. 2;
图10是图2中量化参数示例之一置位电压分布图和区间划分情况;FIG. 10 is a set voltage distribution diagram and interval division of one of the quantization parameter examples in FIG. 2;
图11是图2中量化参数示例之一不应期分布图和区间划分情况;Fig. 11 is one of quantitative parameter examples among Fig. 2 refractory period distribution figure and interval division situation;
图12是图2中量化参数示例之一突触延迟分布图和区间划分情况。FIG. 12 is a diagram of synaptic delay distribution and division of intervals, one of the examples of quantization parameters in FIG. 2 .
图13是图1中SNN实现参数量化的一种示例方法示意图。Fig. 13 is a schematic diagram of an example method for implementing parameter quantization by the SNN in Fig. 1 .
具体实施方式Detailed ways
下面结合附图对本发明进行详细的描述,以便本领域的技术人员更好地理解本发明。需要特别提醒注意的是,在以下的描述中,当已知功能和设计的详细描述也许会淡化本发明的主要内容时,这些描述在这里将被忽略。The present invention will be described in detail below in conjunction with the accompanying drawings, so that those skilled in the art can better understand the present invention. It should be noted that in the following description, when detailed descriptions of known functions and designs may dilute the main content of the present invention, these descriptions will be omitted here.
如图1所示,一种SNN参数量化方法,包括以下步骤:As shown in Figure 1, a SNN parameter quantization method includes the following steps:
S1:获取训练完成的原始SNN。S1: Obtain the original SNN that has been trained.
SNN中神经元为脉冲神经元(如LIF神经元),具有输入脉冲整合累积功能以及脉冲发放功能,SNN以脉冲序列作为输入,SNN的主要参数包括权值、阈值、泄漏常数、置位电压、不应期、突触延迟等。训练完成的SNN具有高精度的分类、识别等功能。获取训练完成的神经网络主要有两种方法:一种是通过离线映射获取训练完成的SNN,通过训练ANN常用的随机梯度下降等方法训练MLP(参阅图2)、CNN(参阅图3)、RNN(参阅图4)、LSTM(参阅图5)等ANN,获得满足指标要求(例如分类、识别精度等)的ANN后完成训练过程,再把训练完成的ANN的参数映射到拓扑结构相同的SNN中,将ANN的输入采用脉冲序列编码(例如泊松分布的脉冲序列)后作为SNN的输入,从而获取训练完成的SNN;一种是通过在线训练获取训练完成的SNN,建立如自组织SNN(参阅图6)或其他结构的SNN,利用突触脉冲时序依赖可塑性(STDP)等学习规则,采用脉冲序列(例如泊松分布脉冲序列、时间编码脉冲序列等)通过在线学习训练SNN,训练过程中调整SNN的权值、阈值、泄漏常数、置位电压、不应期、突触延迟等参数,获得满足指标要求(例如分类、识别精度等)SNN后完成训练过程,训练结束后固定SNN的权值、阈值、泄漏常数、置位电压、不应期、突触延迟等参数,从而获得训练完成的SNN。The neuron in the SNN is a pulse neuron (such as a LIF neuron), which has the function of integrating and accumulating input pulses and the function of emitting pulses. The SNN uses pulse sequences as input. The main parameters of the SNN include weights, thresholds, leakage constants, set voltages, Refractory period, synaptic delay, etc. The trained SNN has high-precision classification, recognition and other functions. There are two main methods to obtain the trained neural network: one is to obtain the trained SNN through offline mapping, and to train MLP (see Figure 2), CNN (see Figure 3), RNN through stochastic gradient descent commonly used in training ANN. (See Figure 4), LSTM (see Figure 5) and other ANNs, after obtaining the ANN that meets the index requirements (such as classification, recognition accuracy, etc.), the training process is completed, and then the parameters of the trained ANN are mapped to the SNN with the same topology , the input of ANN is coded by pulse sequence (for example, the pulse sequence of Poisson distribution) as the input of SNN, so as to obtain the trained SNN; one is to obtain the trained SNN through online training, and establish a self-organizing SNN (see Figure 6) or SNN with other structures, using learning rules such as synaptic spike timing-dependent plasticity (STDP), using pulse sequences (such as Poisson distribution pulse sequences, time-coded pulse sequences, etc.) to train SNN through online learning, and adjust during training SNN weights, thresholds, leakage constants, set voltages, refractory periods, synaptic delays and other parameters, after obtaining the SNN that meets the index requirements (such as classification, recognition accuracy, etc.), the training process is completed, and the weight of the SNN is fixed after the training is over. , threshold, leakage constant, setting voltage, refractory period, synaptic delay and other parameters, so as to obtain the trained SNN.
S2:选取需要量化的一个或多个参数。S2: Select one or more parameters to be quantized.
可以一次量化一个参数,也可以一次量化多个参数。可以量化的参数包括权值、阈值、泄露常数、置位电压、不应期、突触延迟等。You can quantize one parameter at a time, or you can quantize multiple parameters at a time. Parameters that can be quantified include weights, thresholds, leakage constants, set voltages, refractory periods, synaptic delays, etc.
S3:分别统计某一层或某几层或所有层参数分布情况。S3: Statistically calculate the parameter distribution of a certain layer or several layers or all layers.
针对某一个需要量化的参数,统计SNN某一层或某几层或所有层的参数并画出参数分布图。For a certain parameter that needs to be quantified, the parameters of a certain layer or a few layers or all layers of the SNN are counted and the parameter distribution diagram is drawn.
S4:尝试对参数进行区间划分。S4: Try to divide the parameters into intervals.
选取参数区间划分方法和区间数目,区间的划分方法可采用均分法、非均分法、置信区间划分法等,划分区间的方法和数目可以根据具体的神经网络结构和任务类型以及指标要求,通过参数调整经验进行尝试和调整。在S3所述参数分布图基础上,采用均分法对权值(参阅图7)、阈值(参阅图8)、泄漏常数(参阅图9)、置位电压(参阅图10)、不应期(参阅图11)、突触延迟(参阅图12)等参数进行区间划分后的结果在附图中给出。Select the parameter interval division method and the number of intervals. The interval division method can be divided into equal division method, non-uniform division method, confidence interval division method, etc. The method and number of division intervals can be based on the specific neural network structure, task type and index requirements. Experiment and adjust with parameter tuning experience. On the basis of the parameter distribution diagram described in S3, the weight (see Figure 7), threshold (see Figure 8), leakage constant (see Figure 9), set voltage (see Figure 10), refractory period (Refer to FIG. 11 ), synaptic delay (refer to FIG. 12 ) and other parameters after the interval division results are given in the accompanying drawings.
S5:根据区间对参数进行量化。S5: Quantify the parameters according to the interval.
遍历所有区间内的参数,将所有分布在同一区间内的参数量化为同一个值(即一个量化值),量化值的大小和正负根据具体的神经网络结构和任务类型以及指标要求,通过参数调整经验进行尝试和调整。Traverse all the parameters in the interval, and quantize all the parameters distributed in the same interval to the same value (that is, a quantization value). The size and sign of the quantization value are based on the specific neural network structure, task type, and index requirements. Adjust experience to try and adjust.
S6:获得参数量化SNN。S6: Obtain parameter quantized SNN.
用量化后的参数替换原始SNN中对应参数,获得参数量化SNN。Replace the corresponding parameters in the original SNN with the quantized parameters to obtain the parameter quantized SNN.
S7:测试参数量化SNN。S7: Test parameter quantization SNN.
采用原始SNN的输入作为输入,对参数量化SNN进行测试,若测试结果满足指标要求则结束,否则返回重新选取参数区间划分方法和区间数目,并对参数进行区间划分和后续过程。The input of the original SNN is used as the input, and the parameter quantized SNN is tested. If the test result meets the index requirements, it ends. Otherwise, it returns to reselect the parameter interval division method and the number of intervals, and performs interval division and subsequent processes on the parameters.
参阅图13,下面以利用MLP实现MNIST手写数字识别任务为例来对该量化方法进行进一步的解释,包括以下步骤:Referring to Figure 13, the quantification method is further explained by using MLP to realize the MNIST handwritten digit recognition task as an example, including the following steps:
S8:设定目标识别正确率。S8: Set the correct rate of target recognition.
即SI所述指标要求,设定神经网络系统对MNIST测试集的目标识别正确率。That is to say, the index requirements described in SI set the target recognition accuracy rate of the neural network system on the MNIST test set.
S9:使用BP算法训练MLP并将训练好的权值直接映射到SNN。S9: Use the BP algorithm to train the MLP and directly map the trained weights to the SNN.
即S1所述离线训练方法,在本例中,训练MLP时候需要满足一些特定的条件:(1)MLP的所有单元都应使用Relu函数作为激活函数;(2)在训练过程中,将神经元的偏差固定为0。That is, the offline training method described in S1. In this example, some specific conditions need to be met when training the MLP: (1) All units of the MLP should use the Relu function as the activation function; (2) During the training process, the neuron The bias is fixed at 0.
S10:设置SNN的阈值和最大频率。S10: Setting a threshold and a maximum frequency of the SNN.
这是SNN的特有参数。SNN的输入需要改变为脉冲形式,所以需要对输入图片进行编码,在本例中使用泊松分布频率编码的方式对图片的每个像素点进行编码,脉冲的频率和输入像素的大小呈正相关。脉冲的最大频率和LIF神经元的阈值根据映射参数的大小及后续反馈的识别率,通过参数调整经验进行尝试和调整。This is a characteristic parameter of SNN. The input of the SNN needs to be changed to pulse form, so the input picture needs to be encoded. In this example, each pixel of the picture is encoded using the Poisson distribution frequency coding method. The frequency of the pulse is positively correlated with the size of the input pixel. The maximum frequency of pulses and the threshold of LIF neurons are tried and adjusted through parameter adjustment experience according to the size of the mapping parameters and the recognition rate of subsequent feedback.
S11:测试SNN识别率。S11: Test the SNN recognition rate.
若满足S8所述目标识别正确率则进行下一步,否则返回S8重新训练MLP和后续过程。If the accuracy rate of target recognition in S8 is met, proceed to the next step, otherwise return to S8 to retrain the MLP and follow-up process.
S12:获取所有层权值分布图并均分权值的区间。S12: Obtain weight distribution maps of all layers and equally divide the weight intervals.
即S3所述统计所有层参数分布情况和S4所述尝试对参数进行区间划分。在本例中仅对权值进行统计和区间划分,尝试采用均分法进行划分,区间数目是4个。That is, as described in S3, the statistics of the distribution of parameters in all layers and as described in S4, attempt to divide the parameters into intervals. In this example, only the weights are counted and divided into intervals, and the equal division method is tried for division, and the number of intervals is 4.
S13:根据区间对权值进行量化(尝试使用区间中点进行量化)。S13: Quantize the weight according to the interval (try to use the midpoint of the interval for quantization).
即S5所述根据区间对参数进行量化。在本例中尝试使用区间中点进行量化。That is, the parameters are quantized according to intervals as described in S5. In this example try quantization using the midpoint of the interval.
S14:对SNN所有权值进行遍历找到最大值wmax和最小值wmin,取wmax和wmin的平均值记为w0。S14: Traversing all values of the SNN to find the maximum value wmax and the minimum value wmin, taking the average value of wmax and wmin and recording it as w0.
使用区间中点进行量化的步骤。Steps for quantization using interval midpoints.
S15:再取wmin和w0的平均值记为w-1;取wmax和w0的平均值记为w1。S15: take the average value of wmin and w0 and record it as w-1; take the average value of wmax and w0 and record it as w1.
使用区间中点进行量化的步骤。Steps for quantization using interval midpoints.
S16:再一次对所有权值遍历,如果权值介于wmin和w-1之间,令权值等于二者的平均值x1;如果介于w-1和w0之间,令权值等于二者的平均值x2,同理得到x3和x4。S16: Traversing all the values again, if the weight is between wmin and w-1, set the weight equal to the average x1 of the two; if it is between w-1 and w0, set the weight equal to both The average value of x2, similarly get x3 and x4.
使用区间中点进行量化的步骤。Steps for quantization using interval midpoints.
S17:测试SNN识别率。S17: Test the SNN recognition rate.
即S7所述测试参数量化SNN。如果满足性能指标则结束,否则返回S12重新选取区间划分方法和后续过程。That is, the test parameters described in S7 quantify the SNN. If the performance index is satisfied, then end, otherwise return to S12 to reselect the interval division method and subsequent process.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810501442.2A CN108717570A (en) | 2018-05-23 | 2018-05-23 | A kind of impulsive neural networks parameter quantification method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810501442.2A CN108717570A (en) | 2018-05-23 | 2018-05-23 | A kind of impulsive neural networks parameter quantification method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108717570A true CN108717570A (en) | 2018-10-30 |
Family
ID=63900490
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810501442.2A Pending CN108717570A (en) | 2018-05-23 | 2018-05-23 | A kind of impulsive neural networks parameter quantification method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108717570A (en) |
Cited By (32)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109635938A (en) * | 2018-12-29 | 2019-04-16 | 电子科技大学 | A kind of autonomous learning impulsive neural networks weight quantization method |
CN110059822A (en) * | 2019-04-24 | 2019-07-26 | 苏州浪潮智能科技有限公司 | One kind compressing quantization method based on channel packet low bit neural network parameter |
CN110364232A (en) * | 2019-07-08 | 2019-10-22 | 河海大学 | A Method for Predicting the Strength of High Performance Concrete Based on Memristor-Gradient Descent Neural Network |
CN110796231A (en) * | 2019-09-09 | 2020-02-14 | 珠海格力电器股份有限公司 | Data processing method, data processing device, computer equipment and storage medium |
WO2020155741A1 (en) * | 2019-01-29 | 2020-08-06 | 清华大学 | Fusion structure and method of convolutional neural network and pulse neural network |
CN112085190A (en) * | 2019-06-12 | 2020-12-15 | 上海寒武纪信息科技有限公司 | Neural network quantitative parameter determination method and related product |
WO2020253692A1 (en) * | 2019-06-17 | 2020-12-24 | 浙江大学 | Quantification method for deep learning network parameters |
WO2021036908A1 (en) * | 2019-08-23 | 2021-03-04 | 安徽寒武纪信息科技有限公司 | Data processing method and apparatus, computer equipment and storage medium |
WO2021036890A1 (en) * | 2019-08-23 | 2021-03-04 | 安徽寒武纪信息科技有限公司 | Data processing method and apparatus, computer device, and storage medium |
CN113111997A (en) * | 2020-01-13 | 2021-07-13 | 中科寒武纪科技股份有限公司 | Method, apparatus and computer-readable storage medium for neural network data quantization |
CN113111758A (en) * | 2021-04-06 | 2021-07-13 | 中山大学 | SAR image ship target identification method based on pulse neural network |
CN113723598A (en) * | 2020-05-26 | 2021-11-30 | 上海寒武纪信息科技有限公司 | Neural network computing method and device, board card and computer readable storage medium |
CN113974607A (en) * | 2021-11-17 | 2022-01-28 | 杭州电子科技大学 | A sleep snore detection system based on spiking neural network |
US11397579B2 (en) | 2018-02-13 | 2022-07-26 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
US11437032B2 (en) | 2017-09-29 | 2022-09-06 | Shanghai Cambricon Information Technology Co., Ltd | Image processing apparatus and method |
US11442785B2 (en) | 2018-05-18 | 2022-09-13 | Shanghai Cambricon Information Technology Co., Ltd | Computation method and product thereof |
US11513586B2 (en) | 2018-02-14 | 2022-11-29 | Shanghai Cambricon Information Technology Co., Ltd | Control device, method and equipment for processor |
US11544059B2 (en) | 2018-12-28 | 2023-01-03 | Cambricon (Xi'an) Semiconductor Co., Ltd. | Signal processing device, signal processing method and related products |
US11609760B2 (en) | 2018-02-13 | 2023-03-21 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
US11630666B2 (en) | 2018-02-13 | 2023-04-18 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
US11676028B2 (en) | 2019-06-12 | 2023-06-13 | Shanghai Cambricon Information Technology Co., Ltd | Neural network quantization parameter determination method and related products |
US11703939B2 (en) | 2018-09-28 | 2023-07-18 | Shanghai Cambricon Information Technology Co., Ltd | Signal processing device and related products |
US11762690B2 (en) | 2019-04-18 | 2023-09-19 | Cambricon Technologies Corporation Limited | Data processing method and related products |
US11789847B2 (en) | 2018-06-27 | 2023-10-17 | Shanghai Cambricon Information Technology Co., Ltd | On-chip code breakpoint debugging method, on-chip processor, and chip breakpoint debugging system |
US11847554B2 (en) | 2019-04-18 | 2023-12-19 | Cambricon Technologies Corporation Limited | Data processing method and related products |
CN117391175A (en) * | 2023-11-30 | 2024-01-12 | 中科南京智能技术研究院 | A spiking neural network quantification method and system for brain-like computing platforms |
US11966583B2 (en) | 2018-08-28 | 2024-04-23 | Cambricon Technologies Corporation Limited | Data pre-processing method and device, and related computer device and storage medium |
US12001955B2 (en) | 2019-08-23 | 2024-06-04 | Anhui Cambricon Information Technology Co., Ltd. | Data processing method, device, computer equipment and storage medium |
US12112257B2 (en) | 2019-08-27 | 2024-10-08 | Anhui Cambricon Information Technology Co., Ltd. | Data processing method, device, computer equipment and storage medium |
US12205003B2 (en) | 2019-08-26 | 2025-01-21 | Shanghai Cambricon Information Technology Co., Ltd | Data processing method and apparatus, and related product |
US12314866B2 (en) | 2018-07-17 | 2025-05-27 | Shanghai Cambricon Information Technology Co., Ltd | Parallel processing of network model operations |
US12333671B2 (en) | 2020-02-24 | 2025-06-17 | Cambricon Technologies Corporation Limited | Data quantization processing method and apparatus, electronic device and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106022614A (en) * | 2016-05-22 | 2016-10-12 | 广州供电局有限公司 | Data mining method of neural network based on nearest neighbor clustering |
CN107704917A (en) * | 2017-08-24 | 2018-02-16 | 北京理工大学 | A kind of method of effectively training depth convolutional neural networks |
-
2018
- 2018-05-23 CN CN201810501442.2A patent/CN108717570A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106022614A (en) * | 2016-05-22 | 2016-10-12 | 广州供电局有限公司 | Data mining method of neural network based on nearest neighbor clustering |
CN107704917A (en) * | 2017-08-24 | 2018-02-16 | 北京理工大学 | A kind of method of effectively training depth convolutional neural networks |
Cited By (52)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11437032B2 (en) | 2017-09-29 | 2022-09-06 | Shanghai Cambricon Information Technology Co., Ltd | Image processing apparatus and method |
US11630666B2 (en) | 2018-02-13 | 2023-04-18 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
US12073215B2 (en) | 2018-02-13 | 2024-08-27 | Shanghai Cambricon Information Technology Co., Ltd | Computing device with a conversion unit to convert data values between various sizes of fixed-point and floating-point data |
US11740898B2 (en) | 2018-02-13 | 2023-08-29 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
US11720357B2 (en) | 2018-02-13 | 2023-08-08 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
US11709672B2 (en) | 2018-02-13 | 2023-07-25 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
US11704125B2 (en) | 2018-02-13 | 2023-07-18 | Cambricon (Xi'an) Semiconductor Co., Ltd. | Computing device and method |
US11397579B2 (en) | 2018-02-13 | 2022-07-26 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
US11507370B2 (en) | 2018-02-13 | 2022-11-22 | Cambricon (Xi'an) Semiconductor Co., Ltd. | Method and device for dynamically adjusting decimal point positions in neural network computations |
US11663002B2 (en) | 2018-02-13 | 2023-05-30 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
US11609760B2 (en) | 2018-02-13 | 2023-03-21 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
US11620130B2 (en) | 2018-02-13 | 2023-04-04 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
US11513586B2 (en) | 2018-02-14 | 2022-11-29 | Shanghai Cambricon Information Technology Co., Ltd | Control device, method and equipment for processor |
US11442786B2 (en) | 2018-05-18 | 2022-09-13 | Shanghai Cambricon Information Technology Co., Ltd | Computation method and product thereof |
US11442785B2 (en) | 2018-05-18 | 2022-09-13 | Shanghai Cambricon Information Technology Co., Ltd | Computation method and product thereof |
US11789847B2 (en) | 2018-06-27 | 2023-10-17 | Shanghai Cambricon Information Technology Co., Ltd | On-chip code breakpoint debugging method, on-chip processor, and chip breakpoint debugging system |
US12314866B2 (en) | 2018-07-17 | 2025-05-27 | Shanghai Cambricon Information Technology Co., Ltd | Parallel processing of network model operations |
US11966583B2 (en) | 2018-08-28 | 2024-04-23 | Cambricon Technologies Corporation Limited | Data pre-processing method and device, and related computer device and storage medium |
US11703939B2 (en) | 2018-09-28 | 2023-07-18 | Shanghai Cambricon Information Technology Co., Ltd | Signal processing device and related products |
US11544059B2 (en) | 2018-12-28 | 2023-01-03 | Cambricon (Xi'an) Semiconductor Co., Ltd. | Signal processing device, signal processing method and related products |
CN109635938A (en) * | 2018-12-29 | 2019-04-16 | 电子科技大学 | A kind of autonomous learning impulsive neural networks weight quantization method |
CN109635938B (en) * | 2018-12-29 | 2022-05-17 | 电子科技大学 | Weight quantization method for autonomous learning impulse neural network |
WO2020155741A1 (en) * | 2019-01-29 | 2020-08-06 | 清华大学 | Fusion structure and method of convolutional neural network and pulse neural network |
US11847554B2 (en) | 2019-04-18 | 2023-12-19 | Cambricon Technologies Corporation Limited | Data processing method and related products |
US11934940B2 (en) | 2019-04-18 | 2024-03-19 | Cambricon Technologies Corporation Limited | AI processor simulation |
US11762690B2 (en) | 2019-04-18 | 2023-09-19 | Cambricon Technologies Corporation Limited | Data processing method and related products |
CN110059822A (en) * | 2019-04-24 | 2019-07-26 | 苏州浪潮智能科技有限公司 | One kind compressing quantization method based on channel packet low bit neural network parameter |
US12093148B2 (en) | 2019-06-12 | 2024-09-17 | Shanghai Cambricon Information Technology Co., Ltd | Neural network quantization parameter determination method and related products |
US11675676B2 (en) | 2019-06-12 | 2023-06-13 | Shanghai Cambricon Information Technology Co., Ltd | Neural network quantization parameter determination method and related products |
US11676029B2 (en) | 2019-06-12 | 2023-06-13 | Shanghai Cambricon Information Technology Co., Ltd | Neural network quantization parameter determination method and related products |
CN112085190A (en) * | 2019-06-12 | 2020-12-15 | 上海寒武纪信息科技有限公司 | Neural network quantitative parameter determination method and related product |
US11676028B2 (en) | 2019-06-12 | 2023-06-13 | Shanghai Cambricon Information Technology Co., Ltd | Neural network quantization parameter determination method and related products |
CN112085190B (en) * | 2019-06-12 | 2024-04-02 | 上海寒武纪信息科技有限公司 | Method for determining quantization parameter of neural network and related product |
WO2020253692A1 (en) * | 2019-06-17 | 2020-12-24 | 浙江大学 | Quantification method for deep learning network parameters |
CN110364232B (en) * | 2019-07-08 | 2021-06-11 | 河海大学 | High-performance concrete strength prediction method based on memristor-gradient descent method neural network |
CN110364232A (en) * | 2019-07-08 | 2019-10-22 | 河海大学 | A Method for Predicting the Strength of High Performance Concrete Based on Memristor-Gradient Descent Neural Network |
WO2021036908A1 (en) * | 2019-08-23 | 2021-03-04 | 安徽寒武纪信息科技有限公司 | Data processing method and apparatus, computer equipment and storage medium |
WO2021036890A1 (en) * | 2019-08-23 | 2021-03-04 | 安徽寒武纪信息科技有限公司 | Data processing method and apparatus, computer device, and storage medium |
US12001955B2 (en) | 2019-08-23 | 2024-06-04 | Anhui Cambricon Information Technology Co., Ltd. | Data processing method, device, computer equipment and storage medium |
US12165039B2 (en) | 2019-08-23 | 2024-12-10 | Anhui Cambricon Information Technology Co., Ltd. | Neural network quantization data processing method, device, computer equipment and storage medium |
US12205003B2 (en) | 2019-08-26 | 2025-01-21 | Shanghai Cambricon Information Technology Co., Ltd | Data processing method and apparatus, and related product |
US12112257B2 (en) | 2019-08-27 | 2024-10-08 | Anhui Cambricon Information Technology Co., Ltd. | Data processing method, device, computer equipment and storage medium |
CN110796231A (en) * | 2019-09-09 | 2020-02-14 | 珠海格力电器股份有限公司 | Data processing method, data processing device, computer equipment and storage medium |
CN113111997B (en) * | 2020-01-13 | 2024-03-22 | 中科寒武纪科技股份有限公司 | Method, apparatus and related products for neural network data quantization |
CN113111997A (en) * | 2020-01-13 | 2021-07-13 | 中科寒武纪科技股份有限公司 | Method, apparatus and computer-readable storage medium for neural network data quantization |
US12333671B2 (en) | 2020-02-24 | 2025-06-17 | Cambricon Technologies Corporation Limited | Data quantization processing method and apparatus, electronic device and storage medium |
CN113723598A (en) * | 2020-05-26 | 2021-11-30 | 上海寒武纪信息科技有限公司 | Neural network computing method and device, board card and computer readable storage medium |
CN113111758B (en) * | 2021-04-06 | 2024-01-12 | 中山大学 | SAR image ship target recognition method based on impulse neural network |
CN113111758A (en) * | 2021-04-06 | 2021-07-13 | 中山大学 | SAR image ship target identification method based on pulse neural network |
CN113974607B (en) * | 2021-11-17 | 2024-04-26 | 杭州电子科技大学 | Sleep snore detecting system based on pulse neural network |
CN113974607A (en) * | 2021-11-17 | 2022-01-28 | 杭州电子科技大学 | A sleep snore detection system based on spiking neural network |
CN117391175A (en) * | 2023-11-30 | 2024-01-12 | 中科南京智能技术研究院 | A spiking neural network quantification method and system for brain-like computing platforms |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108717570A (en) | A kind of impulsive neural networks parameter quantification method | |
CN109754066B (en) | Method and apparatus for generating a fixed-point neural network | |
US12131258B2 (en) | Joint pruning and quantization scheme for deep neural networks | |
US10984308B2 (en) | Compression method for deep neural networks with load balance | |
CN106575377B (en) | Classifier updates on common features | |
Boutros et al. | Quantface: Towards lightweight face recognition by synthetic data low-bit quantization | |
CN110555523A (en) | short-range tracking method and system based on impulse neural network | |
JP2022501677A (en) | Data processing methods, devices, computer devices, and storage media | |
Wang et al. | Echo state networks regulated by local intrinsic plasticity rules for regression | |
JP6847386B2 (en) | Neural network regularization | |
CN109635938B (en) | Weight quantization method for autonomous learning impulse neural network | |
CN110445646A (en) | A kind of method for obligating resource based on attention mechanism and flux prediction model | |
WO2020118553A1 (en) | Method and device for quantizing convolutional neural network, and electronic device | |
CN114766024A (en) | Method and apparatus for pruning neural networks | |
CN114039870B (en) | Real-time bandwidth prediction method for video streaming applications in cellular networks based on deep learning | |
Li et al. | Reduction 93.7% time and power consumption using a memristor-based imprecise gradient update algorithm | |
CN113822416A (en) | Spiking neural network reward optimization method and device, electronic equipment and storage medium | |
Profentzas et al. | Microtl: Transfer learning on low-power iot devices | |
CN116681159A (en) | Short-term power load prediction method based on whale optimization algorithm and DRESN | |
KR20220048832A (en) | Artificial neural network pruning method and apparatus | |
CN113177627B (en) | Optimization system, retraining system, method thereof, processor and readable medium | |
Wani et al. | Training supervised deep learning networks | |
CN114091652A (en) | Pulse neural network model training method, processing chip and electronic device | |
Yang et al. | A structure optimization algorithm of neural networks for large-scale data sets | |
Roy et al. | Hardware efficient, neuromorphic dendritically enhanced readout for liquid state machines |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20181030 |