Deep Learning Model Training Method and System
AssigneeHuawei Technologies Co., Ltd.
InventorsXiaolong Bai, Pengfei Li, Zhenyu Zhang
Life of this patent
Estimating the term…
Abstract
A deep learning model training method includes generating N first gradient sets in a back propagation (BP) calculation in a jth iteration of N deep learning models, adjusting a communication sequence of gradients included in each of the first gradient sets to obtain an adjusted communication sequence, and sending, according to the adjusted communication sequence, the gradients included in each of the N first gradient sets to the parameter storage space.
Claims20
A method applied to a training system, wherein the training system comprises N deep learning models, wherein each of the N deep learning models comprises n layers of neurons, wherein a training process of each of the N deep learning models comprises a plurality of iterations, wherein each of the iterations comprises a forward propagation (FP) calculation and a back propagation (BP) calculation, wherein N is a positive integer greater than 1, wherein n is a positive integer greater than 1, and wherein the method comprises:
- generating N first gradient sets in a first BP calculation in a jth iteration of the N deep learning models, wherein each of the N first gradient sets comprises a first gradient corresponding to a first parameter matrix of a first neuron at each of the n layers of one deep learning model of the N deep learning models, and wherein j is a positive integer greater than zero;
- adjusting a communication sequence of gradients comprised in each of the N first gradient sets to obtain an adjusted communication sequence;
- sending, according to the adjusted communication sequence, the gradients to a parameter storage space of the training system;
- obtaining a second gradient set based on the N first gradient sets that are stored in the parameter storage space;
- and
- correcting a second parameter matrix of a second neuron at each of the n layers of neurons of each of the N deep learning models based on a second gradient comprised in the second gradient set to perform a first FP calculation in a (j+1)th iteration on each of the N deep learning models.
A system comprising:
- a parameter storage space;
- a memory configured to store:
- instructions;
- and
- N deep learning models, wherein each of the N deep learning models comprises n layers of neurons, wherein a training process of each of the N deep learning models comprises a plurality of iterations, wherein each iteration comprises a forward propagation (FP) calculation and a back propagation (BP) calculation, wherein N is a positive integer greater than 1, wherein n is a positive integer greater than 1, wherein each of the N deep learning models is configured to generate a first gradient set in a first BP calculation in a jth iteration, wherein the first gradient set comprises a first gradient corresponding to a first parameter matrix of a first neuron at each of the n layers of a corresponding deep learning model, and wherein j is a positive integer greater than zero;
- and
- a processor coupled to the parameter storage space and the memory, wherein the instructions cause the processor to be configured to:
- adjust a communication sequence of gradients comprised in each of N first gradient sets to obtain an adjusted communication sequence;
- send, to the parameter storage space according to the adjusted communication sequence, the gradients;
- obtain a second gradient set based on the N first gradient sets that are stored in the parameter storage space;
- and
- correct the first parameter matrix based on a second gradient comprised in the second gradient set to perform a first FP calculation in a (j+1)th iteration of each of the N deep learning models.
A computer program product comprising computer-executable instructions stored on a non-transitory computer-readable medium that, when executed by a processor, cause an apparatus to:
- generate N first gradient sets in a first back propagation (BP) calculation in a jth iteration of N deep learning models, wherein the apparatus is applied to a training system, wherein the training system comprises the N deep learning models, wherein each of the N deep learning models comprises n layers of neurons, wherein a training process of each of the N deep learning models comprises a plurality of iterations, wherein each of the iterations comprises a forward propagation (FP) calculation and a BP calculation, wherein N is a positive integer greater than 1, wherein n is a positive integer greater than 1, wherein each of the N first gradient sets comprises a first gradient corresponding to a first parameter matrix of a first neuron at each of the n layers of one deep learning model of the N deep learning models, and wherein j is a positive integer greater than zero;
- adjust a communication sequence of gradients comprised in each of the N first gradient sets to obtain an adjusted communication sequence;
- send, according to the adjusted communication sequence, the gradients to a parameter storage space of the training system;
- obtain a second gradient set based on the N first gradient sets that are stored in the parameter storage space;
- and
- correct a second parameter matrix of a second neuron at each of the n layers of neurons of each of the N deep learning models based on a second gradient comprised in the second gradient set to perform a first FP calculation in a (j+1)th iteration on each of the N deep learning models.
Dependencies are inferred from the claim text.