[go: up one dir, main page]

CN117391175A - A spiking neural network quantification method and system for brain-like computing platforms - Google Patents

A spiking neural network quantification method and system for brain-like computing platforms Download PDF

Info

Publication number
CN117391175A
CN117391175A CN202311624398.1A CN202311624398A CN117391175A CN 117391175 A CN117391175 A CN 117391175A CN 202311624398 A CN202311624398 A CN 202311624398A CN 117391175 A CN117391175 A CN 117391175A
Authority
CN
China
Prior art keywords
neural network
quantization
network model
format
precision
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.)
Granted
Application number
CN202311624398.1A
Other languages
Chinese (zh)
Other versions
CN117391175B (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.)
Zhongke Nanjing Intelligent Technology Research Institute
Original Assignee
Zhongke Nanjing Intelligent Technology Research Institute
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 Zhongke Nanjing Intelligent Technology Research Institute filed Critical Zhongke Nanjing Intelligent Technology Research Institute
Priority to CN202311624398.1A priority Critical patent/CN117391175B/en
Publication of CN117391175A publication Critical patent/CN117391175A/en
Application granted granted Critical
Publication of CN117391175B publication Critical patent/CN117391175B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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/0495Quantised networks; Sparse networks; Compressed networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Magnetic Resonance Imaging Apparatus (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The invention discloses a pulse neural network quantification method and a pulse neural network quantification system for a brain-like computing platform, wherein the method comprises the following steps: loading and storing a pulse neural network model of the pre-training full-precision float32, and marking the pulse neural network model as a pulse neural network model T1; modifying the impulse neural network model T1 to obtain an impulse neural network model T2; training the pulse neural network model T2 in a quantization process by selecting a calibration data set to select a proper scaling quantization scale factor scale and a zero zp so as to minimize precision loss before and after quantization; deploying the trained impulse neural network model T2 to a brain-like computing platform; the truly asynchronous impulse neural network calculation is realized, and no precision is lost.

Description

一种用于类脑计算平台的脉冲神经网络量化方法及系统A spiking neural network quantification method and system for brain-like computing platforms

技术领域Technical field

本发明属于人工智能模型压缩领域,具体涉及脉冲神经网络量化方法及系统。The invention belongs to the field of artificial intelligence model compression, and specifically relates to a pulse neural network quantification method and system.

背景技术Background technique

脉冲神经网络是第三代神经网络,其原理时模拟生物神经元脉冲发放的模式实现网络层间信息交互,并且由于其脉冲特性,卷积和全连接的乘加操作直接转为加法操作,能够大幅减少计算量。由于当前CPU和GPU均属于同步计算架构,难以发挥脉冲神经网络的优势。Impulsive neural network is the third generation neural network. Its principle is to simulate the impulse firing mode of biological neurons to realize information interaction between network layers. Due to its impulse characteristics, convolution and fully connected multiplication and addition operations are directly converted into addition operations, which can Significantly reduces the amount of calculations. Since both current CPUs and GPUs are synchronous computing architectures, it is difficult to take advantage of the spiking neural network.

问天是一种基于脉冲神经网络的大规模并行、通用型超级类脑计算机。问天是基于ARM芯片的计算架构,int8量化后的模型,不仅能够起到加速的作用,结合硬件int8架构,实现精度无损迁移部署。但由于脉冲神经网络稀疏性,模型精度丢失给模型整体精度带来严重的影响。Wentian is a massively parallel, general-purpose super brain-like computer based on spiking neural networks. Wentian is based on the computing architecture of ARM chips. The int8 quantized model can not only play a role in acceleration, but also combine with the hardware int8 architecture to achieve precision and lossless migration deployment. However, due to the sparsity of the spiking neural network, the loss of model accuracy has a serious impact on the overall accuracy of the model.

发明内容Contents of the invention

本发明提供了一种用于类脑计算平台的脉冲神经网络量化方法,以解决因表示精度不足引起精度丢失的技术问题。The present invention provides a pulse neural network quantification method for a brain-like computing platform to solve the technical problem of accuracy loss caused by insufficient representation accuracy.

为达到上述目的,本发明所采用的技术方案是:In order to achieve the above objects, the technical solutions adopted by the present invention are:

本发明第一方面提供了一种用于类脑计算平台的脉冲神经网络量化方法,包括:The first aspect of the present invention provides a spiking neural network quantification method for a brain-like computing platform, including:

加载并保存预训练全精度float32的脉冲神经网络模型,记为脉冲神经网络模型T1;Load and save the pre-trained full-precision float32 spiking neural network model, recorded as spiking neural network model T1;

对脉冲神经网络模型T1进行修改获得脉冲神经网络模型T2的过程为:The process of modifying the spiking neural network model T1 to obtain the spiking neural network model T2 is:

对脉冲神经网络模型T1的输入层和输出层插入伪量化节点,由输入层将输入特征从全精度float32格式量化为int8格式,由输出层将输出特征从int8格式反量化为全精度float32格式;Pseudo quantization nodes are inserted into the input layer and output layer of the spiking neural network model T1. The input layer quantizes the input features from the full-precision float32 format to the int8 format, and the output layer inversely quantizes the output features from the int8 format to the full-precision float32 format;

将脉冲神经网络模型T1中线性算子定义至伪量化节点,将输入伪量化节点的特征参数从int8格式反量化全精度float32格式,再经过伪量化节点计算后量化回int8格式;Define the linear operator in the impulse neural network model T1 to the pseudo quantization node, dequantize the characteristic parameters of the input pseudo quantization node from the int8 format to the full precision float32 format, and then quantize it back to the int8 format after calculation by the pseudo quantization node;

将脉冲神经网络模型T1改为欧拉数值解形式,然后将卷积算子、批归一化处理、LIF神经元算子做算子折叠,并对脉冲神经网络模型T1中各层权重和激活函数插入观察节点,所述观察节点用于计算和保存每个通道下每组权重的最大值和最小值以及量化范围,获得脉冲神经网络模型T2;Change the spiking neural network model T1 to the Euler numerical solution form, then fold the convolution operator, batch normalization process, and LIF neuron operator, and adjust the weights and activations of each layer in the spiking neural network model T1 The function inserts an observation node, which is used to calculate and save the maximum and minimum values of each group of weights under each channel, as well as the quantization range, to obtain the impulse neural network model T2;

选取校准数据集对脉冲神经网络模型T2进行量化过程的训练,以选取合适的缩放量化放因子scale和零点zp使得量化前后精度损失最小;将训练后的脉冲神经网络模型T2部署至类脑计算平台。Select the calibration data set to train the spiking neural network model T2 in the quantification process to select the appropriate scaling factor scale and zero point zp to minimize the loss of accuracy before and after quantification; deploy the trained spiking neural network model T2 to the brain-inspired computing platform .

进一步地,将脉冲神经网络模型T1改为欧拉数值解形式的表达公式为:Furthermore, the expression formula of changing the impulse neural network model T1 into Euler's numerical solution form is:

其中,V(t)是t时刻的膜电位,Vreset为重置电位,Vthreshold为阈值电位,X(t)为输入,S(t)是t时刻的脉冲,Φ为阶跃函数,τ为时间衰减常数。Among them, V(t) is the membrane potential at time t, V reset is the reset potential, V threshold is the threshold potential, X(t) is the input, S(t) is the pulse at time t, Φ is the step function, τ is the time decay constant.

进一步地,将卷积算子、批归一化处理、LIF神经元算子做算子折叠的方法包括:Furthermore, methods for operator folding of convolution operators, batch normalization processing, and LIF neuron operators include:

所述脉冲神经网络模型T1的卷积算子、批归一化处理、LIF神经元算子表达公式为:The expression formulas of the convolution operator, batch normalization process, and LIF neuron operator of the spiking neural network model T1 are:

将卷积算子、批归一化处理、LIF神经元算子做算子折叠的表达公式为:The expression formula for operator folding of the convolution operator, batch normalization processing, and LIF neuron operator is:

公式中,wn代表第n层权重,wn+1代表第n+1层权重,bn+1第n+1层偏置,xn+2(t)代表第n+2层第t时刻的输出值,xn+1(t)代表第n+1层第t时刻的输出值,xn-1(t)代表第n-1层第t时刻的输出值,xn(t)代表第n层第t时刻的输出值,σ2为方差,μ为均值,∈=1e-5;。In the formula, w n represents the n-th layer weight, w n+1 represents the n+1-th layer weight, b n+1 represents the n+1-th layer bias, x n+2 (t) represents the n+2-th layer t The output value at time, x n+1 (t) represents the output value of the n+1th layer at time t, x n-1 (t) represents the output value of the n-1th layer at time t, x n (t) Represents the output value of the nth layer at the tth moment, σ 2 is the variance, μ is the mean, ∈ = 1e-5;.

进一步地,选取校准数据集对脉冲神经网络模型T2进行量化过程的训练,以选取合适的缩放量化放因子scale和零点zp使得量化前后精度损失最小的方法包括:Furthermore, the calibration data set is selected to train the impulse neural network model T2 in the quantization process, so as to select the appropriate scaling and quantization amplification factor scale and zero point zp to minimize the loss of accuracy before and after quantization. Methods include:

利用校准数据集对脉冲神经网络模型T2进行训练,将脉冲神经网络模型T2反向传播过程中阶跃函数Φ设定为sigmoid函数,通过观察节点计算和保存每个通道下每组权重的最大值和最小值以及量化范围,进而计算出缩放量化放因子scale和零点zp;根据缩放量化放因子scale和零点zp执行从全精度float32格式转化至int8格式的量化操作或者从int8格式转化为全精度float32格式的反量化操作。Use the calibration data set to train the spiking neural network model T2, set the step function Φ in the back propagation process of the spiking neural network model T2 as a sigmoid function, and calculate and save the maximum value of each group of weights under each channel by observing the nodes. and the minimum value and quantization range, and then calculate the scaling quantization amplification factor scale and zero point zp; according to the scaling quantization amplification factor scale and zero point zp, perform the quantization operation from the full-precision float32 format to the int8 format or convert from the int8 format to the full-precision float32 format dequantization operation.

进一步地,执行从全精度float32格式转化至int8格式的量化操作,表达公式为:Furthermore, the quantization operation is performed from the full-precision float32 format to the int8 format. The expression formula is:

公式中,xQ为量化输出特征,x表示为量化输入特征,clamp(·)将量化输入特征x经过量化后的截断0到Nlevels-1范围;Nlevels表示为int8格式的最大值。In the formula, x Q is the quantized output feature, x represents the quantized input feature, and clamp(·) passes the quantified input feature x through Quantized truncated 0 to N levels -1 range; N levels are expressed as the maximum value in int8 format.

进一步地,执行从int8格式转化为全精度float32格式的反量化操作,表达公式为:Further, perform an inverse quantization operation from int8 format to full-precision float32 format. The expression formula is:

xfloat=(xQ-zp)scalex float =(x Q -zp)scale

公式中,xfloat表示为反量化输出特征;xQ为量化输出特征。In the formula, x float represents the inverse quantization output feature; x Q represents the quantization output feature.

进一步地,将训练后的脉冲神经网络模型T2部署至类脑计算平台的方法包括:通过按照训练后的脉冲神经网络模型T2一比一的创建population,将训练后的脉冲神经网络模型T2部署到类脑计算平台上,将算子折叠后的权重按照FromListConnector一对一指定神经元编号的方式连接神经元并给连接赋值折叠后的权重wn+1′;将神经元的偏置电流I_offset设置为bn+1′,并将神经元膜电容C设置为τ。Further, the method of deploying the trained spiking neural network model T2 to the brain-like computing platform includes: by creating a population according to the trained spiking neural network model T2 one-to-one, deploying the trained spiking neural network model T2 to On the brain-like computing platform, connect the folded weights of the operators to the neurons in the manner of specifying neuron numbers one-to-one with FromListConnector and assign the folded weight w n+1′ to the connection; set the bias current I_offset of the neuron. is b n+1′ , and the neuron membrane capacitance C is set to τ.

第二方面本发明提供了一种用于类脑计算平台的脉冲神经网络量化系统,包括:In a second aspect, the present invention provides a spiking neural network quantification system for a brain-like computing platform, including:

加载模块,用于加载并保存预训练全精度float32的脉冲神经网络模型,记为脉冲神经网络模型T1;The loading module is used to load and save the pre-trained full-precision float32 impulse neural network model, recorded as impulse neural network model T1;

模型修改模块,用于对脉冲神经网络模型T1的输入层和输出层插入伪量化节点,由输入层将输入特征从全精度float32格式量化为int8格式,由输出层将输出特征从int8格式反量化为全精度float32格式;将脉冲神经网络模型T1中线性算子定义至伪量化节点,将输入伪量化节点的特征参数从int8格式反量化全精度float32格式,再经过伪量化节点计算后量化回int8格式;将脉冲神经网络模型T1改为欧拉数值解形式,然后将卷积算子、批归一化处理、LIF神经元算子做算子折叠,并对脉冲神经网络模型T1中各层权重和激活函数插入观察节点,所述观察节点用于计算和保存每个通道下每组权重的最大值和最小值以及量化范围,获得脉冲神经网络模型T2;The model modification module is used to insert pseudo quantization nodes into the input layer and output layer of the impulse neural network model T1. The input layer quantizes the input features from the full-precision float32 format to the int8 format, and the output layer dequantizes the output features from the int8 format. It is a full-precision float32 format; define the linear operator in the impulse neural network model T1 to the pseudo-quantization node, dequantize the characteristic parameters of the input pseudo-quantization node from the int8 format to the full-precision float32 format, and then quantize it back to int8 after calculation by the pseudo-quantization node Format; change the spiking neural network model T1 to the Euler numerical solution form, then fold the convolution operator, batch normalization process, and LIF neuron operator, and adjust the weight of each layer in the spiking neural network model T1 And the activation function is inserted into the observation node, which is used to calculate and save the maximum and minimum values of each group of weights under each channel and the quantization range, and obtain the spiking neural network model T2;

训练模块,用于选取校准数据集对脉冲神经网络模型T2进行量化过程的训练,以选取合适的缩放量化放因子scale和零点zp使得量化前后精度损失最小;The training module is used to select the calibration data set to train the impulse neural network model T2 in the quantization process, so as to select the appropriate scaling factor scale and zero point zp to minimize the loss of accuracy before and after quantization;

执行模块,用于将训练后的脉冲神经网络模型T2部署至类脑计算平台。The execution module is used to deploy the trained spiking neural network model T2 to the brain-like computing platform.

进一步地,训练模块用于选取校准数据集对脉冲神经网络模型T2进行量化过程的训练,以选取合适的缩放量化放因子scale和零点zp使得量化前后精度损失最小的方法包括:Further, the training module is used to select the calibration data set to train the impulse neural network model T2 in the quantization process, so as to select the appropriate scaling factor scale and zero point zp to minimize the loss of accuracy before and after quantization. Methods include:

利用校准数据集对脉冲神经网络模型T2进行训练,通过观察节点计算和保存每个通道下每组权重的最大值和最小值以及量化范围,进而计算出缩放量化放因子scale和零点zp;根据缩放量化放因子scale和零点zp执行从全精度float32格式转化至int8格式的量化操作或者从int8格式转化为全精度float32格式的反量化操作。Use the calibration data set to train the impulse neural network model T2, calculate and save the maximum and minimum values of each group of weights under each channel and the quantization range by observing the nodes, and then calculate the scaling and quantization amplification factor scale and zero point zp; according to the scaling The quantization factor scale and zero point zp perform a quantization operation from full-precision float32 format to int8 format or an inverse quantization operation from int8 format to full-precision float32 format.

第三方面本发明提供了电子设备,包括存储介质和处理器;所述存储介质用于存储指令;所述处理器用于根据所述指令进行操作以执行第一方面所述的方法。In a third aspect, the present invention provides an electronic device, including a storage medium and a processor; the storage medium is used to store instructions; and the processor is used to operate according to the instructions to perform the method described in the first aspect.

与现有技术相比,本发明的有益效果:Compared with the existing technology, the beneficial effects of the present invention are:

本发明选取校准数据集对脉冲神经网络模型T2进行量化过程的训练,以选取合适的缩放量化放因子scale和零点zp使得量化前后精度损失最小;将训练后的脉冲神经网络模型T2部署至类脑计算平台,实现真正异步的脉冲神经网络计算,并且无精度丢失。The present invention selects a calibration data set to train the spiking neural network model T2 in the quantification process, so as to select the appropriate scaling factor scale and zero point zp to minimize the loss of accuracy before and after quantification; and deploys the trained spiking neural network model T2 to the brain. Computing platform to achieve truly asynchronous spiking neural network calculations without loss of accuracy.

本发明卷积或全连接的乘加操作、批归一化的乘加操作以及LIF神经元的乘加操作,三者全都是线性乘加计算,因此能够直接将三种算子折叠为一层,避免量化过程中,反复的进行量化反量化的操作带来的精度损失;同时,由于三层折叠为一层,网络推理速度大大缩短。The present invention's convolution or fully connected multiplication and addition operations, batch normalization's multiplication and addition operations, and LIF neuron's multiplication and addition operations are all linear multiplication and addition calculations, so the three operators can be directly folded into one layer. , to avoid the accuracy loss caused by repeated quantization and anti-quantization operations during the quantization process; at the same time, because the three layers are folded into one layer, the network inference speed is greatly shortened.

附图说明Description of the drawings

图1是实施例提供的用于类脑计算平台的脉冲神经网络量化方法的流程图。Figure 1 is a flow chart of a spiking neural network quantification method for a brain-inspired computing platform provided by an embodiment.

具体实施方式Detailed ways

下面结合附图对本发明作进一步描述。以下实施例仅用于更加清楚地说明本发明的技术方案,而不能以此来限制本发明的保护范围。The present invention will be further described below in conjunction with the accompanying drawings. The following examples are only used to more clearly illustrate the technical solutions of the present invention, but cannot be used to limit the scope of the present invention.

实施例1Example 1

如图1所示,一种用于类脑计算平台的脉冲神经网络量化方法,包括:As shown in Figure 1, a spiking neural network quantification method for brain-like computing platforms includes:

加载并保存预训练全精度float32的脉冲神经网络模型,记为脉冲神经网络模型T1;Load and save the pre-trained full-precision float32 spiking neural network model, recorded as spiking neural network model T1;

对脉冲神经网络模型T1进行修改获得脉冲神经网络模型T2的过程为:The process of modifying the spiking neural network model T1 to obtain the spiking neural network model T2 is:

对脉冲神经网络模型T1的输入层和输出层插入伪量化节点,由输入层将输入特征从全精度float32格式量化为int8格式,由输出层将输出特征从int8格式反量化为全精度float32格式;Pseudo quantization nodes are inserted into the input layer and output layer of the spiking neural network model T1. The input layer quantizes the input features from the full-precision float32 format to the int8 format, and the output layer inversely quantizes the output features from the int8 format to the full-precision float32 format;

将脉冲神经网络模型T1中线性算子定义至伪量化节点,将输入伪量化节点的特征参数从int8格式反量化全精度float32格式,再经过伪量化节点计算后量化回int8格式;Define the linear operator in the impulse neural network model T1 to the pseudo quantization node, dequantize the characteristic parameters of the input pseudo quantization node from the int8 format to the full precision float32 format, and then quantize it back to the int8 format after calculation by the pseudo quantization node;

将脉冲神经网络模型T1改为欧拉数值解形式的表达公式为:The expression formula of changing the impulsive neural network model T1 into Euler's numerical solution form is:

其中,V(t)是t时刻的膜电位,Vreset为重置电位,Vthreshold为阈值电位,X(t)为输入,S(t)是t时刻的脉冲,Φ为阶跃函数,τ为时间衰减常数。Among them, V(t) is the membrane potential at time t, V reset is the reset potential, V threshold is the threshold potential, X(t) is the input, S(t) is the pulse at time t, Φ is the step function, τ is the time decay constant.

将卷积算子、批归一化处理、LIF神经元算子做算子折叠的方法包括:Methods for operator folding of convolution operators, batch normalization processing, and LIF neuron operators include:

所述脉冲神经网络模型T1的卷积算子、批归一化处理、LIF神经元算子表达公式为:The expression formulas of the convolution operator, batch normalization process, and LIF neuron operator of the spiking neural network model T1 are:

将卷积算子、批归一化处理、LIF神经元算子做算子折叠的表达公式为:The expression formula for operator folding of the convolution operator, batch normalization processing, and LIF neuron operator is:

公式中,wn代表第n层权重,wn+1代表第n+1层权重,bn+1第n+1层偏置,xn+2(t)代表第n+2层第t时刻的输出值,xn+1(t)代表第n+1层第t时刻的输出值,xn-1(t)代表第n-1层第t时刻的输出值,xn(t)代表第n层第t时刻的输出值,σ2为方差,μ为均值,∈=1e-5;避免量化过程中,反复的进行量化反量化的操作带来的精度损失;同时,由于三层折叠为一层,网络推理速度大大缩短。In the formula, w n represents the n-th layer weight, w n+1 represents the n+1-th layer weight, b n+1 represents the n+1-th layer bias, x n+2 (t) represents the n+2-th layer t The output value at time, x n+1 (t) represents the output value of the n+1th layer at time t, x n-1 (t) represents the output value of the n-1th layer at time t, x n (t) Represents the output value of the nth layer at time t, σ 2 is the variance, μ is the mean, ∈ = 1e-5; to avoid the accuracy loss caused by repeated quantization and anti-quantization operations during the quantization process; at the same time, due to the three layers Folded into one layer, the network inference speed is greatly shortened.

并对脉冲神经网络模型T1中各层权重和激活函数插入观察节点,所述观察节点用于计算和保存每个通道下每组权重的最大值和最小值以及量化范围,获得脉冲神经网络模型T2;And insert observation nodes into the weights and activation functions of each layer in the spiking neural network model T1. The observation nodes are used to calculate and save the maximum and minimum values of each group of weights and the quantization range under each channel to obtain the spiking neural network model T2. ;

选取校准数据集对脉冲神经网络模型T2进行量化过程的梯度训练,以选取合适的缩放量化放因子scale和零点zp使得量化前后精度损失最小的方法包括:Select the calibration data set to perform gradient training of the quantization process on the impulse neural network model T2 to select the appropriate scaling and quantization amplification factor scale and zero point zp to minimize the loss of accuracy before and after quantization. Methods include:

利用校准数据集对脉冲神经网络模型T2进行训练,将脉冲神经网络模型T2反向传播过程中阶跃函数Φ设定为sigmoid函数,通过观察节点计算和保存每个通道下每组权重的最大值和最小值以及量化范围,进而计算出缩放量化放因子scale和零点zp;根据缩放量化放因子scale和零点zp执行从全精度float32格式转化至int8格式的量化操作或者从int8格式转化为全精度float32格式的反量化操作。Use the calibration data set to train the spiking neural network model T2, set the step function Φ in the back propagation process of the spiking neural network model T2 as a sigmoid function, and calculate and save the maximum value of each group of weights under each channel by observing the nodes. and the minimum value and quantization range, and then calculate the scaling quantization amplification factor scale and zero point zp; according to the scaling quantization amplification factor scale and zero point zp, perform the quantization operation from the full-precision float32 format to the int8 format or convert from the int8 format to the full-precision float32 format dequantization operation.

执行从全精度float32格式转化至int8格式的量化操作,表达公式为:Perform quantization operation from full-precision float32 format to int8 format. The expression formula is:

公式中,xQ为量化输出特征,x表示为量化输入特征,clamp(·)将量化输入特征x经过量化后的截断0到Nlevels-1范围;Nlevels表示为int8格式的最大值。In the formula, x Q is the quantized output feature, x represents the quantized input feature, and clamp(·) passes the quantified input feature x through Quantized truncated 0 to N levels -1 range; N levels are expressed as the maximum value in int8 format.

执行从int8格式转化为全精度float32格式的反量化操作,表达公式为:Perform an inverse quantization operation from int8 format to full-precision float32 format. The expression formula is:

xfloat=(xQ-zp)scalex float =(x Q -zp)scale

公式中,xfloat表示为反量化输出特征。In the formula, x float represents the inverse quantization output feature.

将训练后的脉冲神经网络模型T2部署至类脑计算平台的方法包括:通过按照训练后的脉冲神经网络模型T2一比一的创建population,将训练后的脉冲神经网络模型T2部署到问天类脑计算平台上,问天类脑计算平台是一种基于脉冲神经网络的大规模并行、通用型超级类脑计算机。问天类脑计算平台是基于ARM芯片的计算架构,int8量化后的模型,不仅能够起到加速的作用,结合硬件int8架构,实现精度无损迁移部署;而问天类脑计算平台的架构与脉冲神经网络的工作原理十分温和,在没有接收到脉冲信号时,芯片维持静息状态,只有接收到脉冲的神经元所在的位置才发生计算,大大降低了计算的能耗。The method of deploying the trained spiking neural network model T2 to the brain-like computing platform includes: creating a population according to the trained spiking neural network model T2 one-to-one, and deploying the trained spiking neural network model T2 to the Wentian class On the brain computing platform, the Wentian brain-inspired computing platform is a massively parallel, general-purpose super brain-inspired computer based on spiking neural networks. The Wentian brain-inspired computing platform is based on the computing architecture of ARM chips. The int8 quantized model can not only play an acceleration role, but also combines with the hardware int8 architecture to achieve precision and lossless migration deployment. The architecture of the Wentian brain-inspired computing platform is consistent with Pulse. The working principle of the neural network is very gentle. When no pulse signal is received, the chip maintains a resting state, and calculation occurs only at the location of the neuron that received the pulse, which greatly reduces the energy consumption of calculation.

将算子折叠后的权重按照FromListConnector一对一指定神经元编号的方式连接神经元并给连接赋值折叠后的权重wn+1′;将神经元的偏置电流I_offset设置为bn+1′,并将神经元膜电容C设置为τ;实现真正异步的脉冲神经网络计算,并且无精度丢失。Connect the folded weight of the operator to the neurons in a way that specifies the neuron number one-to-one with FromListConnector, and assign the folded weight w n+1′ to the connection; set the bias current I_offset of the neuron to b n+1′ , and set the neuron membrane capacitance C to τ; achieving truly asynchronous pulse neural network calculations without loss of accuracy.

实施例2Example 2

本实施例提供了一种用于类脑计算平台的脉冲神经网络量化系统,本实施所述的脉冲神经网络量化系统可以应用于实施例1所述的脉冲神经网络量化方法,脉冲神经网络量化系统包括:This embodiment provides a spiking neural network quantification system for a brain-like computing platform. The spiking neural network quantification system described in this embodiment can be applied to the spiking neural network quantification method described in Embodiment 1. The spiking neural network quantification system include:

加载模块,用于加载并保存预训练全精度float32的脉冲神经网络模型,记为脉冲神经网络模型T1;The loading module is used to load and save the pre-trained full-precision float32 impulse neural network model, recorded as impulse neural network model T1;

模型修改模块,用于对脉冲神经网络模型T1的输入层和输出层插入伪量化节点,由输入层将输入特征从全精度float32格式量化为int8格式,由输出层将输出特征从int8格式反量化为全精度float32格式;将脉冲神经网络模型T1中线性算子定义至伪量化节点,将输入伪量化节点的特征参数从int8格式反量化全精度float32格式,再经过伪量化节点计算后量化回int8格式;将脉冲神经网络模型T1改为欧拉数值解形式,然后将卷积算子、批归一化处理、LIF神经元算子做算子折叠,并对脉冲神经网络模型T1中各层权重和激活函数插入观察节点,所述观察节点用于计算和保存每个通道下每组权重的最大值和最小值以及量化范围,获得脉冲神经网络模型T2;The model modification module is used to insert pseudo quantization nodes into the input layer and output layer of the impulse neural network model T1. The input layer quantizes the input features from the full-precision float32 format to the int8 format, and the output layer dequantizes the output features from the int8 format. It is a full-precision float32 format; define the linear operator in the impulse neural network model T1 to the pseudo-quantization node, dequantize the characteristic parameters of the input pseudo-quantization node from the int8 format to the full-precision float32 format, and then quantize it back to int8 after calculation by the pseudo-quantization node Format; change the spiking neural network model T1 to the Euler numerical solution form, then fold the convolution operator, batch normalization process, and LIF neuron operator, and adjust the weight of each layer in the spiking neural network model T1 And the activation function is inserted into the observation node, which is used to calculate and save the maximum and minimum values of each group of weights under each channel and the quantization range, and obtain the spiking neural network model T2;

训练模块,用于选取校准数据集对脉冲神经网络模型T2进行量化过程的训练,以选取合适的缩放量化放因子scale和零点zp使得量化前后精度损失最小;The training module is used to select the calibration data set to train the impulse neural network model T2 in the quantization process, so as to select the appropriate scaling factor scale and zero point zp to minimize the loss of accuracy before and after quantization;

执行模块,用于将训练后的脉冲神经网络模型T2部署至类脑计算平台。The execution module is used to deploy the trained spiking neural network model T2 to the brain-like computing platform.

所述训练模块用于选取校准数据集对脉冲神经网络模型T2进行量化过程的训练,以选取合适的缩放量化放因子scale和零点zp使得量化前后精度损失最小的方法包括:The training module is used to select the calibration data set to train the impulse neural network model T2 in the quantization process, so as to select the appropriate scaling factor scale and zero point zp to minimize the loss of accuracy before and after quantization. The method includes:

利用校准数据集对脉冲神经网络模型T2进行训练,通过观察节点计算和保存每个通道下每组权重的最大值和最小值以及量化范围,进而计算出缩放量化放因子scale和零点zp;根据缩放量化放因子scale和零点zp执行从全精度float32格式转化至int8格式的量化操作或者从int8格式转化为全精度float32格式的反量化操作。Use the calibration data set to train the impulse neural network model T2, calculate and save the maximum and minimum values of each group of weights under each channel and the quantization range by observing the nodes, and then calculate the scaling and quantization amplification factor scale and zero point zp; according to the scaling The quantization factor scale and zero point zp perform a quantization operation from full-precision float32 format to int8 format or an inverse quantization operation from int8 format to full-precision float32 format.

实施例3Example 3

本实施例提供了电子设备,包括存储介质和处理器;所述存储介质用于存储指令;所述处理器用于根据所述指令进行操作以执行实施例1所述的方法。This embodiment provides an electronic device, including a storage medium and a processor; the storage medium is used to store instructions; and the processor is used to operate according to the instructions to execute the method described in Embodiment 1.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will understand that embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce a use A device for realizing the functions specified in one process or multiple processes of the flowchart and/or one block or multiple blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions The device implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device. Instructions provide steps for implementing the functions specified in a process or processes of a flowchart diagram and/or a block or blocks of a block diagram.

以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明技术原理的前提下,还可以做出若干改进和变形,这些改进和变形也应视为本发明的保护范围。The above are only preferred embodiments of the present invention. It should be noted that those of ordinary skill in the art can also make several improvements and modifications without departing from the technical principles of the present invention. These improvements and modifications It should also be regarded as the protection scope of the present invention.

Claims (10)

1. A pulsed neural network quantification method for a brain-like computing platform, comprising:
loading and storing a pulse neural network model of the pre-training full-precision float32, and marking the pulse neural network model as a pulse neural network model T1;
the process of modifying the impulse neural network model T1 to obtain the impulse neural network model T2 is as follows:
inserting pseudo quantization nodes into an input layer and an output layer of the impulse neural network model T1, quantizing input features from a full-precision float32 format to an int8 format by the input layer, and inversely quantizing output features from the int8 format to the full-precision float32 format by the output layer;
defining a linear operator of a pulse neural network model T1 to a pseudo-quantization node, dequantizing characteristic parameters input to the pseudo-quantization node from an int8 format to a full-precision float32 format, and then quantizing the characteristic parameters back to the int8 format after calculation of the pseudo-quantization node;
changing the impulse neural network model T1 into an Euler value solution form, then folding a convolution operator, batch normalization processing and LIF neuron operators as operators, and inserting weights and activation functions of all layers in the impulse neural network model T1 into observation nodes, wherein the observation nodes are used for calculating and storing the maximum value, the minimum value and the quantization range of each group of weights under each channel to obtain an impulse neural network model T2;
training the pulse neural network model T2 in a quantization process by selecting a calibration data set to select a proper scaling quantization scale factor scale and a zero zp so as to minimize precision loss before and after quantization; and deploying the trained impulse neural network model T2 to a brain-like computing platform.
2. The method for quantification of impulse neural network according to claim 1, wherein the expression formula for changing the impulse neural network model T1 into the euler numerical solution form is:
wherein V (t) is the membrane potential at time t, V reset Is heavySetting potential, V threshold For the threshold potential, X (t) is the input, S (t) is the pulse at time t, Φ is the step function, τ is the time decay constant.
3. The pulsed neural network quantization method of claim 1, wherein the method of operator folding convolution operators, batch normalization processing, LIF neuron operators comprises:
the convolution operator, batch normalization processing and LIF neuron operator expression formulas of the impulse neural network model T1 are as follows:
the expression formula for folding the convolution operator, batch normalization processing and LIF neuron operator as the operator is as follows:
in the formula, w n Represents the weight of the nth layer, w n+1 Represents the weight of the n+1 layer, b n+1 N+1 layer bias, x n+2 (t) represents the output value at the time of the (n+2) th layer, x n+1 (t) represents the output value at the t-th time of the n+1th layer, x n-1 (t) represents the output value at the t-th time of the n-1 th layer, x n (t) represents the output value, σ, of the nth layer at the time t 2 Variance, μmean, e=1e-5; τ is the time decay constant.
4. The method for quantizing a pulsed neural network according to claim 1, wherein selecting the calibration data set to train the quantization process on the pulsed neural network model T2 to select the appropriate scaling quantization scale and zero zp to minimize the loss of accuracy before and after quantization comprises:
training the impulse neural network model T2 by using a calibration data set, setting a step function phi in the back propagation process of the impulse neural network model T2 as a sigmoid function, calculating and storing the maximum value, the minimum value and the quantization range of each group of weights under each channel through observation nodes, and further calculating a scaling quantization scale factor and a zero zp; quantization operations to convert from full precision float32 format to int8 format or inverse quantization operations to convert from int8 format to full precision float32 format are performed according to the scaled quantization scale and zero zp.
5. The method for quantizing a pulsed neural network according to claim 4, wherein the quantization operation for converting from the full-precision float32 format to the int8 format is performed by the expression:
in the formula, x Q For quantized output features, x is denoted as quantized input feature, and the quantized input feature x is passed through by a clip ()Quantized truncated 0 to N levels -1 range; n (N) levels Represented as the maximum value of the int8 format.
6. The method of claim 4, wherein the inverse quantization operation from the int8 format to the full precision float32 format is performed by the expression:
x float =(x Q -zp)scale
in the formula, x float Representation ofOutput features for inverse quantization; x is x Q To quantify the output characteristics.
7. The method of claim 1, wherein deploying the trained impulse neural network model T2 to the brain-like computing platform comprises: the method comprises the steps of creating a position according to one-to-one of a trained impulse neural network model T2, deploying the trained impulse neural network model T2 on a brain-like calculation platform, connecting neurons according to a mode that a neuron number is designated one by an operator after operator folding, and assigning a folded weight w to the connection n+1′ The method comprises the steps of carrying out a first treatment on the surface of the Setting the bias current I_offset of the neuron to b n+1′ And the neuron membrane capacitance C is set to τ.
8. A pulsed neural network quantification system for a brain-like computing platform, comprising:
the loading module is used for loading and storing a pulse neural network model of the pre-training full-precision float32 and is recorded as a pulse neural network model T1;
the model modification module is used for inserting pseudo quantization nodes into an input layer and an output layer of the impulse neural network model T1, quantizing input features from a full-precision float32 format to an int8 format by the input layer, and inversely quantizing output features from the int8 format to the full-precision float32 format by the output layer; defining a linear operator of a pulse neural network model T1 to a pseudo-quantization node, dequantizing characteristic parameters input to the pseudo-quantization node from an int8 format to a full-precision float32 format, and then quantizing the characteristic parameters back to the int8 format after calculation of the pseudo-quantization node; changing the impulse neural network model T1 into an Euler value solution form, then folding a convolution operator, batch normalization processing and LIF neuron operators as operators, and inserting weights and activation functions of all layers in the impulse neural network model T1 into observation nodes, wherein the observation nodes are used for calculating and storing the maximum value, the minimum value and the quantization range of each group of weights under each channel to obtain an impulse neural network model T2;
the training module is used for selecting a calibration data set to train the quantization process of the impulse neural network model T2 so as to select a proper scaling quantization scale factor scale and a zero zp to minimize the precision loss before and after quantization;
and the execution module is used for deploying the trained impulse neural network model T2 to the brain-like computing platform.
9. The impulse neural network quantization system according to claim 1, wherein the training module is configured to select the calibration data set to perform training of the quantization process on the impulse neural network model T2, so as to select the appropriate scaling quantization scale factor scale and zero zp to minimize the precision loss before and after quantization, and the method comprises:
training the impulse neural network model T2 by using a calibration data set, calculating and storing the maximum value, the minimum value and the quantization range of each group of weights under each channel through observation nodes, and further calculating a scaling quantization scale factor and a zero zp; quantization operations to convert from full precision float32 format to int8 format or inverse quantization operations to convert from int8 format to full precision float32 format are performed according to the scaled quantization scale and zero zp.
10. An electronic device comprising a storage medium and a processor; the storage medium is used for storing instructions; the processor is operative to perform the method of any one of claims 1 to 7 in accordance with the instructions.
CN202311624398.1A 2023-11-30 2023-11-30 A quantization method and system for pulse neural network for brain-like computing platform Active CN117391175B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311624398.1A CN117391175B (en) 2023-11-30 2023-11-30 A quantization method and system for pulse neural network for brain-like computing platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311624398.1A CN117391175B (en) 2023-11-30 2023-11-30 A quantization method and system for pulse neural network for brain-like computing platform

Publications (2)

Publication Number Publication Date
CN117391175A true CN117391175A (en) 2024-01-12
CN117391175B CN117391175B (en) 2025-02-11

Family

ID=89435892

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311624398.1A Active CN117391175B (en) 2023-11-30 2023-11-30 A quantization method and system for pulse neural network for brain-like computing platform

Country Status (1)

Country Link
CN (1) CN117391175B (en)

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108717570A (en) * 2018-05-23 2018-10-30 电子科技大学 A kind of impulsive neural networks parameter quantification method
US20180373977A1 (en) * 2015-12-21 2018-12-27 Commissariat a l'énergie atomique et aux énergies alternatives Optimized neuron circuit, and architecture and method for executing neural networks
CN109190759A (en) * 2018-08-01 2019-01-11 西安电子科技大学 Neural network model compression and accelerated method of the one kind based on { -1 ,+1 } coding
CN110581724A (en) * 2018-06-08 2019-12-17 电信科学技术研究院有限公司 Channel state information feedback method, precoding matrix determination method and device
CN110659725A (en) * 2019-09-20 2020-01-07 字节跳动有限公司 Compression and acceleration method of neural network model, data processing method and device
US20200302299A1 (en) * 2019-03-22 2020-09-24 Qualcomm Incorporated Systems and Methods of Cross Layer Rescaling for Improved Quantization Performance
US20210056382A1 (en) * 2019-08-23 2021-02-25 Micron Technology, Inc. Self select memory cell based artificial synapse
CN113723161A (en) * 2021-03-08 2021-11-30 腾讯科技(深圳)有限公司 Neural network model training method, storage medium and electronic device
CN114936619A (en) * 2022-06-21 2022-08-23 上海西井信息科技有限公司 Model quantization method, device, equipment and storage medium
CN115564636A (en) * 2022-10-18 2023-01-03 中国科学技术大学 Convolutional Neural Network Pipeline Parallel Implementation Method and System Based on Calculation Accuracy
CN115564028A (en) * 2022-11-09 2023-01-03 安谋科技(中国)有限公司 Quantification method, electronic device and readable storage medium of neural network model
CN115659281A (en) * 2022-11-16 2023-01-31 之江实验室 A method and device for adaptive accelerated operator fusion
US20230073669A1 (en) * 2020-05-18 2023-03-09 Arm Limited Optimising a neural network
CN116013293A (en) * 2022-12-26 2023-04-25 中科南京智能技术研究院 Voice wake-up method and system based on hybrid precision quantized neural network
CN116126354A (en) * 2023-01-16 2023-05-16 Oppo广东移动通信有限公司 Model deployment method, device, electronic device and storage medium
CN116301914A (en) * 2022-12-29 2023-06-23 南京逸智网络空间技术创新研究院有限公司 Convolutional neural network deployment method based on GAP8 microprocessor
CN116665658A (en) * 2023-06-07 2023-08-29 中科南京智能技术研究院 Keyword detection method and related equipment
CN117521715A (en) * 2023-11-30 2024-02-06 中科南京智能技术研究院 Intelligent brain local obstacle avoidance method, device, storage medium and equipment

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180373977A1 (en) * 2015-12-21 2018-12-27 Commissariat a l'énergie atomique et aux énergies alternatives Optimized neuron circuit, and architecture and method for executing neural networks
CN108717570A (en) * 2018-05-23 2018-10-30 电子科技大学 A kind of impulsive neural networks parameter quantification method
CN110581724A (en) * 2018-06-08 2019-12-17 电信科学技术研究院有限公司 Channel state information feedback method, precoding matrix determination method and device
CN109190759A (en) * 2018-08-01 2019-01-11 西安电子科技大学 Neural network model compression and accelerated method of the one kind based on { -1 ,+1 } coding
US20200302299A1 (en) * 2019-03-22 2020-09-24 Qualcomm Incorporated Systems and Methods of Cross Layer Rescaling for Improved Quantization Performance
US20210056382A1 (en) * 2019-08-23 2021-02-25 Micron Technology, Inc. Self select memory cell based artificial synapse
CN110659725A (en) * 2019-09-20 2020-01-07 字节跳动有限公司 Compression and acceleration method of neural network model, data processing method and device
US20230073669A1 (en) * 2020-05-18 2023-03-09 Arm Limited Optimising a neural network
CN113723161A (en) * 2021-03-08 2021-11-30 腾讯科技(深圳)有限公司 Neural network model training method, storage medium and electronic device
CN114936619A (en) * 2022-06-21 2022-08-23 上海西井信息科技有限公司 Model quantization method, device, equipment and storage medium
CN115564636A (en) * 2022-10-18 2023-01-03 中国科学技术大学 Convolutional Neural Network Pipeline Parallel Implementation Method and System Based on Calculation Accuracy
CN115564028A (en) * 2022-11-09 2023-01-03 安谋科技(中国)有限公司 Quantification method, electronic device and readable storage medium of neural network model
CN115659281A (en) * 2022-11-16 2023-01-31 之江实验室 A method and device for adaptive accelerated operator fusion
CN116013293A (en) * 2022-12-26 2023-04-25 中科南京智能技术研究院 Voice wake-up method and system based on hybrid precision quantized neural network
CN116301914A (en) * 2022-12-29 2023-06-23 南京逸智网络空间技术创新研究院有限公司 Convolutional neural network deployment method based on GAP8 microprocessor
CN116126354A (en) * 2023-01-16 2023-05-16 Oppo广东移动通信有限公司 Model deployment method, device, electronic device and storage medium
CN116665658A (en) * 2023-06-07 2023-08-29 中科南京智能技术研究院 Keyword detection method and related equipment
CN117521715A (en) * 2023-11-30 2024-02-06 中科南京智能技术研究院 Intelligent brain local obstacle avoidance method, device, storage medium and equipment

Also Published As

Publication number Publication date
CN117391175B (en) 2025-02-11

Similar Documents

Publication Publication Date Title
CN112396179B (en) A flexible deep learning network model compression method based on channel gradient pruning
US11574195B2 (en) Operation method
Benbaki et al. Fast as chita: Neural network pruning with combinatorial optimization
KR102415506B1 (en) Device and method to reduce neural network
US11657285B2 (en) Methods, systems, and media for random semi-structured row-wise pruning in neural networks
CN108446761B (en) A neural network accelerator and data processing method
US11704555B2 (en) Batch normalization layer fusion and quantization method for model inference in AI neural network engine
CN111783961A (en) Post-training quantization method and system for convolutional neural network based on activation fixed-point fitting
US12056459B2 (en) Compute in memory architecture and dataflows for depth-wise separable convolution
CN103914711B (en) A kind of improved very fast learning device and its method for classifying modes
CN111985495A (en) Model deployment method, device, system and storage medium
JP2024525332A (en) Computation-in-Memory (CIM) Architecture and Data Flow Supporting Deeply Convolutional Neural Networks (CNN)
CN110992241A (en) Heterogeneous embedded system and method for accelerating neural network target detection
KR20230091106A (en) Bank-balanced-sparse activation feature maps for neural network models
KR20210043295A (en) Method and apparatus for quantizing data of neural network
CN115240007A (en) A kind of image classification acceleration method and device based on frequency domain decomposition neural network
Kulkarni et al. Hybrid optimization for DNN model compression and inference acceleration
Karimzadeh et al. Towards energy efficient dnn accelerator via sparsified gradual knowledge distillation
CN115034372B (en) Hardware Acceleration Implementation of TB-Net for DoA Estimation
CN114897159B (en) A Method of Rapidly Inferring the Incident Angle of Electromagnetic Signal Based on Neural Network
CN117391175A (en) A spiking neural network quantification method and system for brain-like computing platforms
Park et al. Squantizer: Simultaneous learning for both sparse and low-precision neural networks
KR20190129698A (en) Electronic apparatus for compressing recurrent neural network and method thereof
Hadnagy et al. Efficient implementation of convolutional neural networks on FPGA
Kiyama et al. A quantized neural network library for proper implementation of hardware emulation

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