WO2021051556A1 - 深度学习权值更新方法、系统、计算机设备及存储介质 - Google Patents

深度学习权值更新方法、系统、计算机设备及存储介质 Download PDF

Info

Publication number
WO2021051556A1
WO2021051556A1 PCT/CN2019/117553 CN2019117553W WO2021051556A1 WO 2021051556 A1 WO2021051556 A1 WO 2021051556A1 CN 2019117553 W CN2019117553 W CN 2019117553W WO 2021051556 A1 WO2021051556 A1 WO 2021051556A1
Authority
WO
WIPO (PCT)
Prior art keywords
neural network
network model
training
deep neural
weight
Prior art date
Application number
PCT/CN2019/117553
Other languages
English (en)
French (fr)
Inventor
王健宗
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021051556A1 publication Critical patent/WO2021051556A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Definitions

  • the embodiments of the present application relate to the field of artificial neural networks, and in particular to a method, system, computer device, and non-volatile computer-readable storage medium for updating weights of deep learning.
  • Batch normalization is a commonly used method of normalizing sample features when training neural network models. It is to subtract the mean and divide the variance of the sample data to optimize the distribution of the data and speed up the training of the neural network. But batch normalization has a limit on the number of training samples. When the number of samples is 1, batch normalization will not work.
  • this application aims to solve the problem of the limitation of batch normalization on samples and the slow convergence speed of neural networks.
  • the purpose of the embodiments of the present application is to provide a method, system, computer equipment, and non-volatile computer-readable storage medium for updating weights of deep learning based on parameter rewriting, which can not perform batch normalization on samples.
  • the problem of quantity limitation speeds up the convergence speed of the neural network model.
  • an embodiment of the present application provides a deep learning weight update method, the method includes:
  • the update formula for parameter update is:
  • the weight vector W n represents the respective neuron update
  • v represents the unit vector W n
  • g represents the scalar W n
  • the g
  • , v n-1 represents the depth
  • the respective weight vectors are updated according to the calculation output.
  • an embodiment of the present application also provides a deep learning weight update system, including:
  • a training module configured to input training samples into the deep neural network model, and obtain calculation output from the deep neural network model
  • the update module is configured to update the respective weight vectors according to the calculation output.
  • an embodiment of the present application further provides a computer device.
  • the computer device includes a memory, a processor, and computer-readable instructions stored on the memory and running on the processor, and the processor executes
  • the computer-readable instructions implement the following steps:
  • the update formula for parameter update is:
  • the weight vector W n represents the respective neuron update
  • v represents the unit vector W n
  • g represents the scalar W n
  • the g
  • , v n-1 represents the depth
  • the respective weight vectors are updated according to the calculation output.
  • embodiments of the present application also provide a non-volatile computer-readable storage medium
  • the non-volatile computer-readable storage medium stores computer-readable instructions
  • the computer-readable instructions can be Executed by at least one processor, so that the at least one processor executes the following steps:
  • the update formula for parameter update is:
  • the weight vector W n represents the respective neuron update
  • v represents the unit vector W n
  • g represents the scalar W n
  • the g
  • , v n-1 represents the depth
  • the respective weight vectors are updated according to the calculation output.
  • the deep learning weight update method, system, computer device, and non-volatile computer-readable storage medium provided by the embodiments of the present application update the weight of the deep neural network model based on parameter rewriting, which can be free from batch normalization.
  • the limitation of the number of samples speeds up the convergence speed of the neural network model.
  • FIG. 1 is a flowchart of the steps of a deep learning weight update method provided by an embodiment of this application;
  • FIG. 2 is a schematic diagram of program modules of a deep learning weight update system provided by an embodiment of the application
  • FIG. 3 is a schematic diagram of the hardware structure of a computer device provided by an embodiment of the application.
  • FIG. 1 shows a flowchart of the deep learning weight update method according to the first embodiment of the present application. It can be understood that the flowchart in this method embodiment is not used to limit the order of execution of the steps.
  • the following is an exemplary description with computer equipment as the main body of execution, and the details are as follows:
  • step S100 a deep neural network model is constructed according to multiple neuron output functions.
  • y the output value of the neuron
  • an excitation function
  • X a multi-dimensional input feature
  • W represents a weight vector
  • It represents the weight of the input in the neuron
  • b represents the deviation scalar of the neuron.
  • a neural network is composed of one input layer, one or more hidden layers, and one output layer, and the number of hidden layers of the deep neural network is greater than or equal to two.
  • the respective weight vectors W and the respective deviation scalars b are initialized, and the initialization refers to pre-processing. It is assumed that the respective weight vector W and the respective bias scalar b are randomly selected in the value domain.
  • Step S102 Perform parameter update on each weight vector in the deep neural network model to obtain each updated weight vector.
  • the update formula used for parameter update is:
  • the weight vector W n represents the respective neuron update
  • v represents the unit vector W n
  • g represents the scalar W n
  • the g
  • , v n-1 represents the depth
  • v 0 takes the value of v when the weight vector W is initialized.
  • Step S104 input training samples into the deep neural network model, and obtain calculation output from the deep neural network model.
  • each weight vector is used to perform forward propagation calculation to obtain a calculation output.
  • the forward propagation calculation means that the training samples are forward calculated layer by layer through the deep neural network model, and then the output layer outputs the calculated output.
  • the calculation output and the preset target output are also input into a preset training error formula to calculate training Error
  • the training error before judging whether back propagation needs to be performed according to the training error, is also compared with a preset expected value. If the training error is greater than the preset expected value, backpropagation is required; if the training error is not greater than the preset expected value, stop training the deep neural network, and use the various weight vectors as the Each weight vector after the update of the deep neural network model.
  • the training error is 0.005 and the preset expected value is 0.1. After judging that the training error is not greater than the expected value, the training of the deep neural network is stopped, and the respective weight vectors are all The weight vector after the update of the deep neural network.
  • each weight vector is updated according to a weight update formula, and the weight update formula is :
  • W(n) represents the weight vector of the corresponding neuron during the nth training of the deep neural network model
  • W(n+1) represents the n+1th training of the deep neural network model
  • the weight vector of the corresponding neuron at time ⁇ W(n) represents the change of the weight vector of the corresponding neuron in the direction of gradient descent when the deep neural network model is trained for the nth time
  • represents the learning rate
  • the gradient descent direction refers to a training direction that can make the training error less than the expected value in the fastest time.
  • the backpropagation returns the training error to each neuron in each layer, and solves the partial derivative function according to the training error and the weight of each neuron, and then according to the partial derivative function Solve and update the respective weight vectors.
  • the respective weight vectors can also be updated according to the change values of the vector v and the scalar g,
  • the change value of the scalar g in the gradient descent direction is: among them Represents the partial derivative function of the error function to the parameter g, Represents the partial derivative function of the error function to the weight W;
  • the change value of the vector v in the gradient descent direction is: among them Represents the partial derivative of the error function to the parameter v. Since the parameter rewriting is performed on the weight W, the original change in the weight W can be transformed into the change in the parameters v and g.
  • the partial derivative function of the error function with respect to the parameter g and the partial derivative function of the error function with respect to the parameter v are derivated to obtain the The change value of the scalar g and the change value of the parameter v. Then, the scalar g and the vector v are updated with the change value of the scalar g and the change value of the vector v. Finally, the respective weight vectors are updated according to the updated scalar g and vector v.
  • the respective weight vectors are used to continue training the deep neural network model, and obtain the corresponding Calculate the output, and then recalculate the corresponding training error according to the training error formula with the calculated output and the target output.
  • the training error is not greater than the preset expected value or the number of training times reaches the preset number of training times, stop training the neural network.
  • the calculation output is obtained from the deep neural network model, and then the respective weight vectors are updated according to the calculation output.
  • a deep neural network is used to classify the blue points and red points in a certain image data set.
  • the training effect obtained is: the gradient descent speed is 41.9968s, and the classification accuracy rate is 93%; when the weight update method is used, every iteration of the deep neural network is After the weight vectors are updated, the training effect obtained is: the gradient descent speed is 40.8717s, which is 1.12 seconds faster than the original gradient descent speed, and the classification accuracy rate is 96%, which is 3% higher than the original.
  • the embodiment of the present application updates the weights of the deep neural network model based on parameter rewriting, which can avoid the limitation of batch normalization on the number of samples, and can also speed up the convergence speed of the neural network model.
  • FIG. 2 shows a schematic diagram of program modules of the deep learning weight update system according to the second embodiment of the present application.
  • the deep learning weight update system 20 may include or be divided into one or more program modules.
  • the one or more program modules are stored in a storage medium and executed by one or more processors.
  • the above-mentioned deep learning weight update method can be realized.
  • the program module referred to in the embodiments of the present application refers to a series of computer-readable instruction segments that can complete specific functions. The following description will specifically introduce the functions of each program module in this embodiment:
  • the construction module 200 is used to construct a deep neural network model according to multiple neuron output functions.
  • the vector represents the weight of the input in the neuron, and b represents the deviation scalar of the neuron.
  • a neural network is composed of one input layer, one or more hidden layers, and one output layer, and the number of hidden layers of the deep neural network is greater than or equal to two.
  • the respective weight vectors W and the respective deviation scalars b are initialized, and the initialization refers to pre-processing. It is assumed that the respective weight vector W and the respective bias scalar b are randomly selected in the value domain.
  • the parameter update module 202 is configured to update the parameters of each weight vector in the deep neural network model to obtain each updated weight vector.
  • the update formula used for parameter update is:
  • the weight vector W n represents the respective neuron update
  • v represents the unit vector W n
  • g represents the scalar W n
  • the g
  • , v n-1 represents the depth
  • v 0 takes the value of v when the weight vector W is initialized.
  • the training module 204 is configured to input training samples into the deep neural network model and obtain calculation output from the deep neural network model.
  • the training module 204 uses the respective weight vectors to perform forward propagation calculations to obtain calculation outputs.
  • the forward propagation calculation refers to the forward calculation of the training samples through the deep neural network model layer by layer, and then the output layer outputs the calculation output.
  • the training module 204 in the step of updating the respective weight vectors according to the calculation output, also inputs the calculation output and the preset target output into a preset training error
  • the training module 204 before judging whether back propagation is required according to the training error, also compares the training error with a preset expected value. If the training error is greater than the preset expected value, backpropagation is required; if the training error is not greater than the preset expected value, stop training the deep neural network, and use the respective weight vectors W as all The weight vector after the update of the deep neural network model.
  • the training error is 0.005 and the preset expected value is 0.1. After judging that the training error is not greater than the expected value, the training of the deep neural network is stopped, and the respective weight vectors are all The weight vector after the update of the deep neural network.
  • Each weight vector of the training module 204 is updated according to a weight update formula, and the weight The update formula is: Wherein, W(n) represents the weight vector of the corresponding neuron during the nth training of the deep neural network model, and W(n+1) represents the n+1th training of the deep neural network model The weight vector of the corresponding neuron at time, ⁇ W(n) represents the change of the weight vector of the corresponding neuron in the direction of gradient descent when the deep neural network model is trained for the nth time, and ⁇ represents the learning rate , Represents the partial derivative function of the weight vector of the corresponding neuron.
  • the gradient descent direction refers to a training direction that can make the training error less than the expected value in the fastest time.
  • the backpropagation returns the training error to each neuron in each layer, and solves the partial derivative function according to the training error and the weight of each neuron, and then according to the partial derivative function Solve and update the respective weight vectors.
  • the training module 204 may also update the vector v and the scalar g according to the change value.
  • Each weight vector, where the change value of the scalar g in the gradient descent direction is:, where Represents the partial derivative function of the error function to the parameter g, Represents the partial derivative function of the error function to the weight W; the change value of the vector v in the gradient descent direction is: among them Represents the partial derivative of the error function to the parameter v. Since the parameter rewriting is performed on the weight W, the original change in the weight W can be transformed into the change in the parameters v and g.
  • the training module 204 when performing the back propagation calculation, obtains the partial derivative function of the parameter g by the error function and the partial derivative function of the parameter v by the error function. Guide to obtain the change value of the scalar g and the change value of the parameter v. Then, the scalar g and the vector v are updated with the change value of the scalar g and the change value of the vector v. Finally, the respective weight vectors are updated according to the updated scalar g and vector v.
  • the training module 204 uses the respective weight vectors to continue the training of the depth
  • the neural network model and the corresponding calculation output are obtained, and then the calculation output and the target output are recalculated corresponding training errors according to the training error formula.
  • the training error is not greater than the preset expected value or the number of training times reaches the preset number of training times, stop training the neural network.
  • the update module 206 is configured to update the respective weight vector according to the calculation output.
  • the update module 206 obtains a calculation output from the deep neural network model, and then updates the respective weight vector according to the calculation output.
  • a deep neural network is used to classify the blue points and red points in a certain image data set.
  • the training effect obtained is: the gradient descent speed is 41.9968s, and the classification accuracy rate is 93%; when the weight update method is used, every iteration of the deep neural network is After the weight vectors are updated, the training effect obtained is: the gradient descent speed is 40.8717s, which is 1.12 seconds faster than the original gradient descent speed, and the classification accuracy rate is 96%, which is 3% higher than the original.
  • the embodiment of the present application updates the weights of the deep neural network model based on parameter rewriting, which can avoid the limitation of batch normalization on the number of samples, and can also speed up the convergence speed of the neural network model.
  • the computer device 2 is a device that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored instructions.
  • the computer device 2 may be a rack server, a blade server, a tower server, or a cabinet server (including an independent server or a server cluster composed of multiple servers).
  • the computer device 2 at least includes, but is not limited to, a memory 21, a processor 22, a network interface 23, and a deep learning weight update system 20 that can be connected to each other in communication via a system bus. among them:
  • the memory 21 includes at least one type of non-volatile computer-readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), Random access memory (RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk Wait.
  • the memory 21 may be an internal storage unit of the computer device 2, for example, a hard disk or a memory of the computer device 2.
  • the memory 21 may also be an external storage device of the computer device 2, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc.
  • the memory 21 may also include both the internal storage unit of the computer device 2 and its external storage device.
  • the memory 21 is generally used to store the operating system and various application software installed in the computer device 2, for example, the program code of the deep learning weight update system 20 in the second embodiment.
  • the memory 21 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 22 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments.
  • the processor 22 is generally used to control the overall operation of the computer device 2.
  • the processor 22 is used to run the program code or process data stored in the memory 21, for example, to run the deep learning weight update system 20, so as to implement the deep learning weight update method of the first embodiment.
  • the network interface 23 may include a wireless network interface or a wired network interface, and the network interface 23 is generally used to establish a communication connection between the computer device 2 and other electronic devices.
  • the network interface 23 is used to connect the computer device 2 with an external terminal through a network, and establish a data transmission channel and a communication connection between the computer device 2 and the external terminal.
  • the network may be Intranet, Internet, Global System of Mobile Communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G Network, Bluetooth (Bluetooth), Wi-Fi and other wireless or wired networks.
  • FIG. 3 only shows the computer device 2 with components 20-23, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
  • the deep learning weight update system 20 stored in the memory 21 can also be divided into one or more program modules, and the one or more program modules are stored in the memory 21 and are One or more processors (the processor 22 in this embodiment) are executed to complete the application.
  • FIG. 2 shows a schematic diagram of program modules for implementing the deep learning weight update system 20.
  • the deep learning weight update system 20 can be divided into a building module 200, a parameter update module 202, Training module 204 and update module 206.
  • the program module referred to in the present application refers to a series of computer-readable instruction segments that can complete specific functions, and is more suitable than a program to describe the execution process of the deep learning weight update system 20 in the computer device 2.
  • the specific functions of the program modules 200-206 have been described in detail in the second embodiment, and will not be repeated here.
  • This embodiment also provides a non-volatile computer-readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory ( SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disks, optical disks, servers, App application malls, etc., on which storage There are computer-readable instructions, and the corresponding functions are realized when the program is executed by the processor.
  • the non-volatile computer-readable storage medium of this embodiment is used to store the deep learning weight update system 20, and the processor executes the following steps:
  • the update formula for parameter update is:
  • the weight vector W n represents the respective neuron update
  • v represents the unit vector W n
  • g represents the scalar W n
  • the g
  • , v n-1 represents the depth
  • the respective weight vectors are updated according to the calculation output.

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)
  • Image Analysis (AREA)
  • Feedback Control In General (AREA)

Abstract

一种基于参数重写的深度学习权值更新方法,包括步骤:根据多个神经元输出函数构建深度神经网络模型(S100);对所述深度神经网络模型中的各个权值向量进行参数更新以得到更新后的各个权值向量(S102);将训练样本输入至神经网络模型中,并从所述深度神经网络模型中获取计算输出(S104);根据所述计算输出对所述各个权值向量进行更新(S106),能够对权值参数进行重写,避免了批量归一化对样本数量的限制的问题,同时,还提高了神经网络的收敛速度,加快了神经网络的训练过程。

Description

深度学习权值更新方法、系统、计算机设备及存储介质
本申请申明2019年09月16日递交的申请号为201910872174.X、名称为“深度学习权值更新方法、系统、计算机设备及存储介质”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本申请实施例涉及人工神经网络领域,尤其涉及一种深度学习权值更新方法、系统、计算机设备及非易失性计算机可读存储介质。
背景技术
批量归一化是在对神经网络模型进行训练时常用的样本特征归一化方法,就是对样本数据进行减均值除方差,使得数据的分布优化,加快神经网络的训练速度。但是批量归一化对训练样本的数量有限制,当样本数量为1时,批量归一化就起不了作用。
发明人发现,使用批量归一化需要保存每个时间步长下,小批量的均值和方差,效率低且占内存,一定程度上会拖慢神经网络的收敛速度。
故,本申请旨在解决批量归一化对样本的限制和神经网络收敛速度慢的问题。
发明内容
有鉴于此,本申请实施例的目的是提供一种基于参数重写的深度学习权值更新方法、系统、计算机设备及非易失性计算机可读存储介质,能够不受批量归一化对样本数量的限制问题,加快神经网络模型的收敛速度。
为实现上述目的,本申请实施例提供了一种深度学习权值更新方法,所述方法包括:
根据多个神经元输出函数构建深度神经网络模型,其中,每个所述神经元的输出函数为y=φ(WX+b),其中y表示相应神经元的输出值,φ表示一个激励函数,X表示多维输入特征,W表示一个权值向量,b表示所述相应神经元的偏差标量;
对所述深度神经网络模型中的各个权值向量进行参数更新以得到更新后的各个权值向量,其中,用于参数更新的更新公式为:
Figure PCTCN2019117553-appb-000001
其中,W n表示相应神经元更新后的权值向量,v表示W n的单位向量,g表示W n的标量,所述g=||W n||,v n-1表示对所述深度神经网络模型第n-1次训练时的所述各个权值向量的单位向量;
将训练样本输入至所述深度神经网络模型中,并从所述深度神经网络模型中获取计算输出;
根据所述计算输出对所述各个权值向量进行更新。
为了实现上述目的,本申请实施例还提供一种深度学习权值更新系统,包括:
构建模块,用于根据多个神经元输出函数构建深度神经网络模型,其中,每个所述神经元的输出函数为y=φ(WX+b),其中y表示相应神经元的输出值,φ表示一个激励函数,X表示多维输入特征,W表示一个权值向量,b表示所述相应神经元的偏差标量;
参数更新模块,用于对所述深度神经网络模型中的各个权值向量进行参数更新以得到更新后的各个权值向量,其中,用于参数更新的更新公式为:
Figure PCTCN2019117553-appb-000002
其中,W n表示相应神经元更新后的权值向量,v表示W n的单位向量,g表示W n的标量,所述g=||W n||,v n-1表示对所述深度神经网络模型第n-1次训练时的所述各个权值向量的单位向量;
训练模块,用于将训练样本输入至所述深度神经网络模型中,并从所述深度神经网络模型中获取计算输出;
更新模块,用于根据所述计算输出对所述各个权值向量进行更新。
为了实现上述目的,本申请实施例还提供一种计算机设备,所述计算机设备包括存储器、处理器以及存储在所述存储器上并可在处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现以下步骤:
根据多个神经元输出函数构建深度神经网络模型,其中,每个所述神经元的输出函数为y=φ(WX+b),其中y表示相应神经元的输出值,φ表示一个激励函数,X表示多维输入特征,W表示一个权值向量,b表示所述相应神经元的偏差标量;
对所述深度神经网络模型中的各个权值向量进行参数更新以得到更新后的各个权值向量,其中,用于参数更新的更新公式为:
Figure PCTCN2019117553-appb-000003
其中,W n表示相应神经元更新后的权值向量,v表示W n的单位向量,g表示W n的标量,所述g=||W n||,v n-1表示对所述深度神经网络模型第n-1次训练时的所述各个权值向量的单位向量;
将训练样本输入至所述深度神经网络模型中,并从所述深度神经网络模型中获取计算输出;
根据所述计算输出对所述各个权值向量进行更新。
为了实现上述目的,本申请实施例还提供一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质内存储有计算机可读指令,所述计算机可读指令可被至少一个处理器所执行,以使所述至少一个处理器执行以下步骤:
根据多个神经元输出函数构建深度神经网络模型,其中,每个所述神经元的输出函数为y=φ(WX+b),其中y表示相应神经元的输出值,φ表示一个激励函数,X表示多维输入特征,W表示一个权值向量,b表示所述相应神经元的偏差标量;
对所述深度神经网络模型中的各个权值向量进行参数更新以得到更新后的各个权值向量,其中,用于参数更新的更新公式为:
Figure PCTCN2019117553-appb-000004
其中,W n表示相应神经元更新后的权值向量,v表示W n的单位向量,g表示W n的标量,所述g=||W n||,v n-1表示对所述深度神经网络模型第n-1次训练时的所述各个权值向量的单位向量;
将训练样本输入至所述深度神经网络模型中,并从所述深度神经网络模型中获取计算输出;
根据所述计算输出对所述各个权值向量进行更新。
本申请实施例提供的深度学习权值更新方法、系统、计算机设备及非易失性计算机可读存储介质,基于参数重写对深度神经网络模型的权值进行更新,能够不受批量归一化对样本数量的限制问题,加快神经网络模型的收敛速度。
以下结合附图和具体实施例对本申请进行详细描述,但不作为对本申请的限定。
附图说明
图1为本申请实施例提供的深度学习权值更新方法的步骤流程图;
图2为本申请实施例提供的深度学习权值更新系统的程序模块示意图;
图3为本申请实施例提供的计算机设备的硬件结构示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不 存在,也不在本申请要求的保护范围之内。
以下实施例将以计算机设备2为执行主体进行示例性描述。
实施例一
请参阅图1,示出了本申请实施例一之深度学习权值更新方法的步骤流程图。可以理解,本方法实施例中的流程图不用于对执行步骤的顺序进行限定。下面以计算机设备为执行主体进行示例性描述,具体如下:
步骤S100,根据多个神经元输出函数构建深度神经网络模型。
具体的,每个神经元的输出函数为y=φ(WX+b),其中y表示所述神经元的输出值,φ表示一个激励函数,X表示多维输入特征,W表示一个权值向量,表示所述输入在所述神经元所占的权重,b表示所述神经元的偏差标量,当所述输入大于所述激励函数的阈值时,所述神经元才会产生输出。
常见地,一个神经网络由一个输入层、一个或多个隐藏层、一个输出层组成,所述深度神经网络隐藏层的层数大于或等于2。
在一较佳实施例中,根据多个神经元输出函数构建所述深度神经网络模型之前,对所述各个权值向量W和所述各个偏差标量b进行初始化,所述初始化指的是在预设值域内为所述各个权值向量W和所述各个偏置标量b随机取值。
步骤S102,对所述深度神经网络模型中的各个权值向量进行参数更新以得到更新后的各个权值向量。
具体的,用于参数更新的更新公式为:
Figure PCTCN2019117553-appb-000005
其中,W n表示相应神经元更新后的权值向量,v表示W n的单位向量,g表示W n的标量,所述g=||W n||,v n-1表示对所述深度神经网络模型第n-1次训练时的所述各个权值向量的单位向量,
Figure PCTCN2019117553-appb-000006
是单位向量v的初始值,同时
Figure PCTCN2019117553-appb-000007
也是w n的初始系数。在本实施例中,v 0取初始化所述权值向量W时的v值。
步骤S104,将训练样本输入至所述深度神经网络模型中,并从所述深度神经网络模型中获取计算输出。
具体的,利用所述各个权值向量执行前向传播计算,获得计算输出。所述前向传播计 算指的是所述训练样本经过所述深度神经网络模型一层一层地向前计算,然后由所述输出层输出计算输出。
在一较佳实施例中,根据所述计算输出对所述各个权值向量进行更新的步骤中,还将所述计算输出与预设的目标输出输入至预设的训练误差公式中以计算训练误差,所述训练误差公式为:
Figure PCTCN2019117553-appb-000008
其中,W表示相应权值向量,J(W)表示训练误差,t k表示第k次训练的目标输出,z k表示第k次训练的计算输出,所述k为正整数,且所述k=1,2…c。然后根据所述训练误差判断是否需要执行反向传播,当不需要执行所述反向传播时,将所述各个权值向量作为所述深度神经网络模型更新后的各个权值向量。示例性的,在第1次训练中,预设的目标输出为0.5,计算输出为0.4,则训练误差为
Figure PCTCN2019117553-appb-000009
Figure PCTCN2019117553-appb-000010
在另一较佳实施例中,根据所述训练误差判断是否需要执行反向传播之前,还将所述训练误差与预设期望值进行比较。如果所述训练误差大于所述预设期望值,则需要反向传播;如果所述训练误差不大于所述预设期望值,停止训练所述深度神经网络,并将所述各个权值向量作为所述深度神经网络模型更新后的各个权值向量。示例性的,在第1次训练中,训练误差为0.005,预设的期望值为0.1,经判断,训练误差不大于期望值,则停止训练所述深度神经网络,所述各个权值向量即为所述深度神经网络更新后的权值向量。
在另一较佳实施例中,如果所述训练误差大于所述预设期望值,则需要反向传播,并将所述各个权值向量根据权值更新公式进行更新,所述权值更新公式为:
Figure PCTCN2019117553-appb-000011
Figure PCTCN2019117553-appb-000012
其中,W(n)表示对所述深度神经网络模型第n次训练时的所述相应神经元的权值向量,W(n+1)表示对所述深度神经网络模型第n+1次训练时的所述相应神经元的权值向量,ΔW(n)表示对所述深度神经网络模型第n次训练时所述相应神经元的权值向量在梯度下降方向上的变化,η表示学习率,
Figure PCTCN2019117553-appb-000013
表示所述相应神经元的权值向量的偏导函数。
需要说明的是,所述梯度下降方向指的是能使所述训练误差最快时间内小于所述期望值的训练方向。所述反向传播将所述训练误差返回到各层的各个神经元,并根据所述训练误差和所述各个神经元的权值对所述偏导函数求解,然后根据所述偏导函数的解更新所述各个权值向量。
在另一较佳实施例中,如果所述训练误差大于所述预设期望值,则需要反向传播,还可以根据所述向量v和所述标量g的变化值更新所述各个权值向量,其中,所述标量g在 所述梯度下降方向上的变化值为:
Figure PCTCN2019117553-appb-000014
其中
Figure PCTCN2019117553-appb-000015
表示所述误差函数对所述参数g的偏导函数,
Figure PCTCN2019117553-appb-000016
表示所述误差函数对所述权值W的偏导函数;所述向量v在所述梯度下降方向上的变化值为:
Figure PCTCN2019117553-appb-000017
其中
Figure PCTCN2019117553-appb-000018
表示所述误差函数对所述参数v的偏导。由于对所述权值W执行了参数重写,因此原本求权值W的变化可以转变成求参数v和g的变化。
示例性的,当执行所述反向传播计算时,通过对所述误差函数对所述参数g的偏导函数和所述误差函数对所述参数v的偏导函数进行求导,得到所述标量g的变化值和所述参数v的变化值。然后,用所述标量g的变化值和所述向量v的变化值更新标量g和向量v。最后,根据更新的标量g和向量v更新所述各个权值向量。
在另一较佳实施例中,当根据所述向量v和所述标量g的梯度更新所述各个权值向量之后,用所述各个权值向量继续训练所述深度神经网络模型,并获取相应的计算输出,然后将所述计算输出与目标输出根据所述训练误差公式重新计算对应的训练误差。当所述训练误差不大于所述预设期望值或者训练次数达到预设训练次数时,停止训练神经网络。
S106,根据所述计算输出对所述各个权值向量进行更新。
具体的,从所述深度神经网络模型中获取计算输出,然后根据所述计算输出对所述各个权值向量进行更新。
示例性的,利用深度神经网络对某一图像数据集中的蓝点和红点分类,当使用随机初始化时方法对权值向量进行取值时,需要从标准正态分布中取值赋予权值向量,然后用权值向量训练深度神经网络,得到的训练效果为:梯度下降速度为41.9968s,分类准确率为93%;当使用所述权值更新方法在深度神经网络的每一次迭代中对每个权值向量进行更新后,得到的训练效果为:梯度下降速度为40.8717s,比原来的梯度下降速度快了1.12秒,分类准确率为96%,比原来提高了3%。
本申请实施例基于参数重写对深度神经网络模型的权值进行更新,可以不受批量归一化对样本数量的限制问题,还可以加快神经网络模型的收敛速度。
实施例二
请继续参阅图2,示出了本申请实施例二之深度学习权值更新系统的程序模块示意图。在本实施例中,深度学习权值更新系统20可以包括或被分割成一个或多个程序模块,一个或者多个程序模块被存储于存储介质中,并由一个或多个处理器所执行,以完成本申请, 并可实现上述深度学习权值更新方法。本申请实施例所称的程序模块是指能够完成特定功能的一系列计算机可读指令段。以下描述将具体介绍本实施例各程序模块的功能:
构建模块200,用于根据多个神经元输出函数构建深度神经网络模型。
具体的,每个所述神经元的输出函数为y=φ(WX+b),其中y表示所述神经元的输出值,φ是一个激励函数,X表示多维输入特征,W是一个权值向量,表示所述输入在所述神经元所占的权重,b表示所述神经元的偏差标量,当所述输入大于所述激励函数的阈值时,所述神经元才会产生输出。
常见地,一个神经网络由一个输入层、一个或多个隐藏层、一个输出层组成,所述深度神经网络隐藏层的层数大于或等于2。
在一较佳实施例中,根据多个神经元输出函数构建所述深度神经网络模型之前,对所述各个权值向量W和所述各个偏差标量b进行初始化,所述初始化指的是在预设值域内为所述各个权值向量W和所述各个偏置标量b随机取值。
参数更新模块202,用于对所述深度神经网络模型中的各个权值向量进行参数更新以得到更新后的各个权值向量。
具体的,用于参数更新的更新公式为:
Figure PCTCN2019117553-appb-000019
其中,W n表示相应神经元更新后的权值向量,v表示W n的单位向量,g表示W n的标量,所述g=||W n||,v n-1表示对所述深度神经网络模型第n-1次训练时的所述各个权值向量的单位向量,
Figure PCTCN2019117553-appb-000020
是单位向量v的初始值,同时
Figure PCTCN2019117553-appb-000021
也是w n的初始系数。在本实施例中,v 0取初始化所述权值向量W时的v值。
训练模块204,用于将训练样本输入至所述深度神经网络模型中,并从所述深度神经网络模型中获取计算输出。
具体的,所述训练模块204利用所述各个权值向量执行前向传播计算,获得计算输出。所述前向传播计算指的是所述训练样本经过所述深度神经网络模型一层一层地向前计算,然后由所述输出层输出计算输出。
在一较佳实施例中,根据所述计算输出对所述各个权值向量进行更新的步骤中,所述训练模块204还将所述计算输出与预设的目标输出输入至预设的训练误差公式中以计算训练误差,所述训练误差公式为:
Figure PCTCN2019117553-appb-000022
其中,W表示相应权值向量,J(W)表 示训练误差,t k表示第k次训练的目标输出,z k表示第k次训练的计算输出,所述k为正整数,且所述k=1,2…c。然后根据所述训练误差判断是否需要执行反向传播,当不需要执行所述反向传播时,将所述各个权值向量作为所述深度神经网络模型更新后的各个权值向量。示例性的,在第1次训练中,预设的目标输出为0.5,计算输出为0.4,则训练误差为
Figure PCTCN2019117553-appb-000023
在另一较佳实施例中,根据所述训练误差判断是否需要执行反向传播之前,所述训练模块204还将所述训练误差与预设期望值进行比较。如果所述训练误差大于所述预设期望值,则需要反向传播;如果所述训练误差不大于所述预设期望值,停止训练所述深度神经网络,并将所述各个权值向量W作为所述深度神经网络模型更新后的权值向量。示例性的,在第1次训练中,训练误差为0.005,预设的期望值为0.1,经判断,训练误差不大于期望值,则停止训练所述深度神经网络,所述各个权值向量即为所述深度神经网络更新后的权值向量。
在另一较佳实施例中,如果所述训练误差大于所述预设期望值,则需要反向传播,所述训练模块204所述各个权值向量根据权值更新公式进行更新,所述权值更新公式为:
Figure PCTCN2019117553-appb-000024
其中,W(n)表示对所述深度神经网络模型第n次训练时的所述相应神经元的权值向量,W(n+1)表示对所述深度神经网络模型第n+1次训练时的所述相应神经元的权值向量,ΔW(n)表示对所述深度神经网络模型第n次训练时所述相应神经元的权值向量在梯度下降方向上的变化,η表示学习率,
Figure PCTCN2019117553-appb-000025
表示所述相应神经元的权值向量的偏导函数。
需要说明的是,所述梯度下降方向指的是能使所述训练误差最快时间内小于所述期望值的训练方向。所述反向传播将所述训练误差返回到各层的各个神经元,并根据所述训练误差和所述各个神经元的权值对所述偏导函数求解,然后根据所述偏导函数的解更新所述各个权值向量。
在另一较佳实施例中,如果所述训练误差大于所述预设期望值,则需要反向传播,所述训练模块204还可以根据所述向量v和所述标量g的变化值更新所述各个权值向量,其中,所述标量g在所述梯度下降方向上的变化值为:,其中
Figure PCTCN2019117553-appb-000026
表示所述误差函数对所述参数g的偏导函数,
Figure PCTCN2019117553-appb-000027
表示所述误差函数对所述权值W的偏导函数;所述向量v在所述梯度下降方向上的变化值为:
Figure PCTCN2019117553-appb-000028
其中
Figure PCTCN2019117553-appb-000029
表示所述误差函数对所述参数v的偏导。由于对所述权值W执行了参数重写,因此原本求权值W的 变化可以转变成求参数v和g的变化。
示例性的,当执行所述反向传播计算时,所述训练模块204通过对所述误差函数对所述参数g的偏导函数和所述误差函数对所述参数v的偏导函数进行求导,得到所述标量g的变化值和所述参数v的变化值。然后,用所述标量g的变化值和所述向量v的变化值更新标量g和向量v。最后,根据更新的标量g和向量v更新所述各个权值向量。
在另一较佳实施例中,当根据所述向量v和所述标量g的梯度更新所述各个权值向量之后,所述训练模块204用所述各个权值向量继续所述训练所述深度神经网络模型,并获取相应的计算输出,然后将所述计算输出与目标输出根据所述训练误差公式重新计算对应的训练误差。当所述训练误差不大于所述预设期望值或者训练次数达到预设训练次数时,停止训练神经网络。
更新模块206,用于根据所述计算输出对所述各个权值向量进行更新。
具体的,所述更新模块206从所述深度神经网络模型中获取计算输出,然后根据所述计算输出对所述各个权值向量进行更新。
示例性的,利用深度神经网络对某一图像数据集中的蓝点和红点分类,当使用随机初始化时方法对权值向量进行取值时,需要从标准正态分布中取值赋予权值向量,然后用权值向量训练深度神经网络,得到的训练效果为:梯度下降速度为41.9968s,分类准确率为93%;当使用所述权值更新方法在深度神经网络的每一次迭代中对每个权值向量进行更新后,得到的训练效果为:梯度下降速度为40.8717s,比原来的梯度下降速度快了1.12秒,分类准确率为96%,比原来提高了3%。
本申请实施例基于参数重写对深度神经网络模型的权值进行更新,可以不受批量归一化对样本数量的限制问题,还可以加快神经网络模型的收敛速度。
实施例三
参阅图3,是本申请实施例三之计算机设备的硬件架构示意图。本实施例中,所述计算机设备2是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。该计算机设备2可以是机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。如图3所示,所述计算机设备2至少包括,但不限于,可通过系统总线相互通信连接存储器21、处理器22、网络接口23、以及深度学习权值更新系统20。其中:
本实施例中,存储器21至少包括一种类型的非易失性计算机可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访 问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器21可以是计算机设备2的内部存储单元,例如该计算机设备2的硬盘或内存。在另一些实施例中,存储器21也可以是计算机设备2的外部存储设备,例如该计算机设备2上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,存储器21还可以既包括计算机设备2的内部存储单元也包括其外部存储设备。本实施例中,存储器21通常用于存储安装于计算机设备2的操作系统和各类应用软件,例如实施例二的深度学习权值更新系统20的程序代码等。此外,存储器21还可以用于暂时地存储已经输出或者将要输出的各类数据。
处理器22在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器22通常用于控制计算机设备2的总体操作。本实施例中,处理器22用于运行存储器21中存储的程序代码或者处理数据,例如运行深度学习权值更新系统20,以实现实施例一的深度学习权值更新方法。
所述网络接口23可包括无线网络接口或有线网络接口,该网络接口23通常用于在所述计算机设备2与其他电子装置之间建立通信连接。例如,所述网络接口23用于通过网络将所述计算机设备2与外部终端相连,在所述计算机设备2与外部终端之间的建立数据传输通道和通信连接等。所述网络可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯系统(Global System of Mobile communication,GSM)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi等无线或有线网络。
需要指出的是,图3仅示出了具有部件20-23的计算机设备2,但是应理解的是,并不要求实施所有示出的部件,可以替代的实施更多或者更少的部件。
在本实施例中,存储于存储器21中的所述深度学习权值更新系统20还可以被分割为一个或者多个程序模块,所述一个或者多个程序模块被存储于存储器21中,并由一个或多个处理器(本实施例为处理器22)所执行,以完成本申请。
例如,图2示出了所述实现深度学习权值更新系统20的程序模块示意图,该实施例中,所述基于深度学习权值更新系统20可以被划分为构建模块200、参数更新模块202、训练模块204和更新模块206。其中,本申请所称的程序模块是指能够完成特定功能的一系列计算机可读指令段,比程序更适合于描述所述深度学习权值更新系统20在所述计算机设备2中的执行过程。所述程序模块200-206的具体功能在实施例二中已有详细描述,在此不再赘述。
实施例四
本实施例还提供一种非易失性计算机可读存储介质,如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘、服务器、App应用商城等等,其上存储有计算机可读指令,程序被处理器执行时实现相应功能。本实施例的非易失性计算机可读存储介质用于存储深度学习权值更新系统20,被处理器执行如下步骤:
根据多个神经元输出函数构建深度神经网络模型,其中,每个所述神经元的输出函数为y=φ(WX+b),其中y表示相应神经元的输出值,φ表示一个激励函数,X表示多维输入特征,W表示一个权值向量,b表示所述相应神经元的偏差标量;
对所述深度神经网络模型中的各个权值向量进行参数更新以得到更新后的各个权值向量,其中,用于参数更新的更新公式为:
Figure PCTCN2019117553-appb-000030
其中,W n表示相应神经元更新后的权值向量,v表示W n的单位向量,g表示W n的标量,所述g=||W n||,v n-1表示对所述深度神经网络模型第n-1次训练时的所述各个权值向量的单位向量;
将训练样本输入至所述深度神经网络模型中,并从所述深度神经网络模型中获取计算输出;
根据所述计算输出对所述各个权值向量进行更新。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种深度学习权值更新方法,所述方包括:
    根据多个神经元输出函数构建深度神经网络模型,其中,每个所述神经元的输出函数为y=Φ(WX+b),其中y表示相应神经元的输出值,Φ表示一个激励函数,X表示多维输入特征,W表示一个权值向量,b表示所述相应神经元的偏差标量;
    对所述深度神经网络模型中的各个权值向量进行参数更新以得到更新后的各个权值向量,其中,用于参数更新的更新公式为:
    Figure PCTCN2019117553-appb-100001
    其中,W n表示相应神经元更新后的权值向量,v表示W n的单位向量,g表示W n的标量,所述g=||W n||,v n-1表示对所述深度神经网络模型第n-1次训练时的所述各个权值向量的单位向量;
    将训练样本输入至所述深度神经网络模型中,并从所述深度神经网络模型中获取计算输出;
    根据所述计算输出对所述各个权值向量进行更新。
  2. 根据权利要求1所述的深度学习权值更新方法,所述根据多个神经元输出函数构建深度神经网络模型的步骤之前,还包括:
    对所述各个权值向量和各个偏差标量进行初始化。
  3. 根据权利要求1所述的深度学习权值更新方法,所述根据所述计算输出对所述各个权值向量进行更新,包括:
    将所述计算输出与预设的目标输出按照训练误差公式计算训练误差,其中,所述训练误差公式为:
    Figure PCTCN2019117553-appb-100002
    其中,J(W)表示训练误差,t k表示对所述深度神经网络模型第k次训练的目标输出,z k表示对所述深度神经网络模型第k次训练的计算输出,所述k为正整数,且所述k=1,2…c;
    根据所述训练误差判断是否需要执行反向传播;
    当不需要执行所述反向传播时,将所述各个权值向量作为所述深度神经网络模型更新后的各个权值向量。
  4. 根据权利要求3所述的深度学习权值更新方法,所述根据所述训练误差判断是否需要执行反向传播,包括:
    将所述训练误差与预设期望值进行比较;及
    当所述训练误差大于所述预设期望值时,执行所述反向传播,以对所述各个权值向量 进行更新。
  5. 根据权利要求4所述的深度学习权值更新方法,所述将所述训练误差与预设期望值进行比较的步骤之后,包括:
    当所述训练误差不大于所述预设期望值时,则不需要执行所述反向传播,获取所述各个权值向量,并将所述各个权值向量作为所述深度神经网络模型更新后的各个权值向量。
  6. 根据权利要求4所述的深度学习权值更新方法,所述当所述训练误差大于所述预设期望值时,执行所述反向传播,以对所述各个权值向量进行更新,包括:
    将所述各个权值向量根据权值更新公式进行更新,其中,所述权值更新公式为:W(n+1)=W(n)+ΔW(n),
    Figure PCTCN2019117553-appb-100003
    W(n)表示对所述深度神经网络模型第n次训练时的所述相应神经元的权值向量,W(n+1)表示对所述深度神经网络模型第n+1次训练时的所述相应神经元的权值向量,ΔW(n)表示对所述深度神经网络模型第n次训练时所述相应神经元的权值向量在梯度下降方向上的变化,η表示学习率,
    Figure PCTCN2019117553-appb-100004
    表示所述训练误差对所述相应神经元的权值向量的偏导函数。
  7. 根据权利要求1所述的深度学习权值更新方法,所述根据所述计算输出对所述各个权值向量进行更新,还包括:
    计算所述深度神经网络模型的训练次数;
    当所述训练次数不小于预设的期望训练次数时,停止训练所述深度神经网络模型。
  8. 一种深度学习权值更新系统,包括:
    构建模块,用于根据多个神经元输出函数构建深度神经网络模型,其中,每个所述神经元的输出函数为y=Φ(WX+b),其中y表示相应神经元的输出值,Φ表示一个激励函数,X表示多维输入特征,W表示一个权值向量,b表示所述相应神经元的偏差标量;
    参数更新模块,用于对所述深度神经网络模型中的各个权值向量进行参数更新以得到更新后的各个权值向量,其中,用于参数更新的更新公式为:
    Figure PCTCN2019117553-appb-100005
    其中,W n表示相应神经元更新后的权值向量,v表示W n的单位向量,g表示W n的标量,所述g=||W n||,v n-1表示对所述深度神经网络模型第n-1次训练时的所述各个权值向量的单位向量;
    训练模块,用于将训练样本输入至所述深度神经网络模型中,并从所述深度神经网络模型中获取计算输出;
    更新模块,用于根据所述计算输出对所述各个权值向量进行更新。
  9. 一种计算机设备,所述计算机设备存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述计算机可读指令被处理器执行时实现以下步骤:
    根据多个神经元输出函数构建深度神经网络模型,其中,每个所述神经元的输出函数y=Φ(WX+b),其中y表示相应神经元的输出值,Φ表示一个激励函数,X表示多维输入特征,W表示一个权值向量,b表示所述相应神经元的偏差标量;
    对所述深度神经网络模型中的各个权值向量进行参数更新以得到更新后的各个权值向量,其中,用于参数更新的更新公式为:
    Figure PCTCN2019117553-appb-100006
    其中,W n表示相应神经元更新后的权值向量,v表示W n的单位向量,g表示W n的标量,所述g=||W n||,v n-1表示对所述深度神经网络模型第n-1次训练时的所述各个权值向量的单位向量;
    将训练样本输入至所述深度神经网络模型中,并从所述深度神经网络模型中获取计算输出;
    根据所述计算输出对所述各个权值向量进行更新。
  10. 根据权利要求9所述的计算机设备,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    对所述各个权值向量和各个偏差标量进行初始化。
  11. 根据权利要求9所述的计算机设备,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    将所述计算输出与预设的目标输出按照训练误差公式计算训练误差,其中,所述训练误差公式为:
    Figure PCTCN2019117553-appb-100007
    其中,J(W)表示训练误差,t k表示对所述深度神经网络模型第k次训练的目标输出,z k表示对所述深度神经网络模型第k次训练的计算输出,所述k为正整数,且所述k=1,2…c;
    根据所述训练误差判断是否需要执行反向传播;
    当不需要执行所述反向传播时,将所述各个权值向量作为所述深度神经网络模型更新后的各个权值向量。
  12. 根据权利要求11所述的计算机设备,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    将所述训练误差与预设期望值进行比较;及
    当所述训练误差大于所述预设期望值时,执行所述反向传播,以对所述各个权值向量 进行更新。
  13. 根据权利要求12所述的计算机设备,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    当所述训练误差不大于所述预设期望值时,则不需要执行所述反向传播,获取所述各个权值向量,并将所述各个权值向量作为所述深度神经网络模型更新后的各个权值向量。
  14. 根据权利要求12所述的计算机设备,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    将所述各个权值向量根据权值更新公式进行更新,其中,所述权值更新公式为:W(n+1)=W(n)+ΔW(n),
    Figure PCTCN2019117553-appb-100008
    W(n)表示对所述深度神经网络模型第n次训练时的所述相应神经元的权值向量,W(n+1)表示对所述深度神经网络模型第n+1次训练时的所述相应神经元的权值向量,ΔW(n)表示对所述深度神经网络模型第n次训练时所述相应神经元的权值向量在梯度下降方向上的变化,η表示学习率,
    Figure PCTCN2019117553-appb-100009
    表示所述训练误差对所述相应神经元的权值向量的偏导函数。
  15. 根据权利要求12所述的计算机设备,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    根据所述向量v和所述标量g的变化值更新所述各个权值向量,所述标量g在所述梯度下降方向上的变化值为:
    Figure PCTCN2019117553-appb-100010
    其中
    Figure PCTCN2019117553-appb-100011
    表示所述误差函数对所述参数g的偏导函数,所述向量v在所述梯度下降方向上的变化值为:
    Figure PCTCN2019117553-appb-100012
    Figure PCTCN2019117553-appb-100013
    其中
    Figure PCTCN2019117553-appb-100014
    表示所述误差函数对所述参数v的偏导。
  16. 一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质内存储有计算机可读指令,所述计算机可读指令可被至少一个处理器所执行,以使所述至少一个处理器执行以下步骤:
    根据多个神经元输出函数构建深度神经网络模型,其中,每个所述神经元的输出函数y=Φ(WX+b),其中y表示相应神经元的输出值,Φ表示一个激励函数,X表示多维输入特征,W表示一个权值向量,b表示所述相应神经元的偏差标量;
    对所述深度神经网络模型中的各个权值向量进行参数更新以得到更新后的各个权值向量,其中,用于参数更新的更新公式为:
    Figure PCTCN2019117553-appb-100015
    其中,W n表示相应神经元 更新后的权值向量,v表示W n的单位向量,g表示W n的标量,所述g=||W n||,v n-1表示对所述深度神经网络模型第n-1次训练时的所述各个权值向量的单位向量;
    将训练样本输入至所述深度神经网络模型中,并从所述深度神经网络模型中获取计算输出;
    根据所述计算输出对所述各个权值向量进行更新。
  17. 根据权利要求16所述的非易失性计算机可读存储介质,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    对所述各个权值向量和各个偏差标量进行初始化。
  18. 根据权利要求16所述的非易失性计算机可读存储介质,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    将所述计算输出与预设的目标输出按照训练误差公式计算训练误差,其中,所述训练误差公式为:
    Figure PCTCN2019117553-appb-100016
    其中,J(W)表示训练误差,t k表示对所述深度神经网络模型第k次训练的目标输出,z k表示对所述深度神经网络模型第k次训练的计算输出,所述k为正整数,且所述k=1,2…c;
    根据所述训练误差判断是否需要执行反向传播;
    当不需要执行所述反向传播时,将所述各个权值向量作为所述深度神经网络模型更新后的各个权值向量。
  19. 根据权利要求18所述的非易失性计算机可读存储介质,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    将所述训练误差与预设期望值进行比较;及
    当所述训练误差大于所述预设期望值时,执行所述反向传播,以对所述各个权值向量进行更新。
  20. 根据权利要求19所述的非易失性计算机可读存储介质,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    当所述训练误差不大于所述预设期望值时,则不需要执行所述反向传播,获取所述各个权值向量,并将所述各个权值向量作为所述深度神经网络模型更新后的各个权值向量。
PCT/CN2019/117553 2019-09-16 2019-11-12 深度学习权值更新方法、系统、计算机设备及存储介质 WO2021051556A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910872174.X 2019-09-16
CN201910872174.XA CN110782030A (zh) 2019-09-16 2019-09-16 深度学习权值更新方法、系统、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021051556A1 true WO2021051556A1 (zh) 2021-03-25

Family

ID=69383461

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117553 WO2021051556A1 (zh) 2019-09-16 2019-11-12 深度学习权值更新方法、系统、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN110782030A (zh)
WO (1) WO2021051556A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111340205B (zh) * 2020-02-18 2023-05-12 中国科学院微小卫星创新研究院 一种针对空间应用的神经网络芯片抗辐照系统及方法
CN113642592B (zh) * 2020-04-27 2024-07-05 武汉Tcl集团工业研究院有限公司 一种训练模型的训练方法、场景识别方法、计算机设备
CN111860828B (zh) * 2020-06-15 2023-11-28 北京仿真中心 一种神经网络的训练方法、存储介质和设备
CN111860789A (zh) * 2020-07-31 2020-10-30 Oppo广东移动通信有限公司 模型训练方法、终端及存储介质
CN113505832B (zh) * 2021-07-09 2023-10-10 合肥云诊信息科技有限公司 用于图像分类任务的神经网络批分组响应的bgrn归一化方法
CN114979033B (zh) * 2022-06-13 2023-05-09 华北理工大学 一种基于可编程数据平面的网内神经计算系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106997484A (zh) * 2016-01-26 2017-08-01 阿里巴巴集团控股有限公司 一种优化用户信用模型建模过程的方法及装置
CN107392310A (zh) * 2016-05-16 2017-11-24 北京陌上花科技有限公司 神经网络模型训练方法及装置
CN109472345A (zh) * 2018-09-28 2019-03-15 深圳百诺名医汇网络技术有限公司 一种权重更新方法、装置、计算机设备和存储介质

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766876B (zh) * 2017-09-19 2019-08-13 平安科技(深圳)有限公司 驾驶模型训练方法、驾驶人识别方法、装置、设备及介质

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106997484A (zh) * 2016-01-26 2017-08-01 阿里巴巴集团控股有限公司 一种优化用户信用模型建模过程的方法及装置
CN107392310A (zh) * 2016-05-16 2017-11-24 北京陌上花科技有限公司 神经网络模型训练方法及装置
CN109472345A (zh) * 2018-09-28 2019-03-15 深圳百诺名医汇网络技术有限公司 一种权重更新方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
CN110782030A (zh) 2020-02-11

Similar Documents

Publication Publication Date Title
WO2021051556A1 (zh) 深度学习权值更新方法、系统、计算机设备及存储介质
WO2020143225A1 (zh) 神经网络的训练方法、训练装置和电子设备
US11954418B2 (en) Grouping of Pauli strings using entangled measurements
WO2018039011A1 (en) Asychronous training of machine learning model
US20150379075A1 (en) Maintaining diversity in multiple objective function solution optimization
WO2022095432A1 (zh) 神经网络模型训练方法、装置、计算机设备及存储介质
US11636175B2 (en) Selection of Pauli strings for Variational Quantum Eigensolver
CN110956263A (zh) 一种二值化神经网络的构建方法、存储介质及终端设备
US20200104276A1 (en) Machine learning implementation in processing systems
CN113011532A (zh) 分类模型训练方法、装置、计算设备及存储介质
WO2019061667A1 (zh) 电子装置、数据处理方法、系统及计算机可读存储介质
TWI705378B (zh) 針對rpc資訊的向量處理方法、裝置以及設備
CN111144574A (zh) 使用指导者模型训练学习者模型的人工智能系统和方法
CN113344213A (zh) 知识蒸馏方法、装置、电子设备及计算机可读存储介质
CN117422037A (zh) 模拟芯片自动化布局模型训练方法及自动化布局方法
CN116187422A (zh) 神经网络的参数更新方法及相关设备
TWI767122B (zh) 模型建構方法、系統及非揮發性電腦可讀取記錄媒體
CN113127648B (zh) 数据验证方法和装置、电子设备、计算机可读介质
US11461665B2 (en) Systems and methods of a Boolean network development environment
CN113591398A (zh) 基于深度强化学习的智能作业分批方法、装置及电子设备
CN115688893B (zh) 内存调度方法及装置、电子设备和存储介质
US20230409667A1 (en) Selection of pauli strings for variational quantum eigensolver
CN113420841B (zh) 有毒样本数据生成方法及装置
CN116108926B (zh) 量子计算方法、装置、设备及存储介质
EP4030354A1 (en) Method and apparatus with neural network processing

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19945599

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19945599

Country of ref document: EP

Kind code of ref document: A1