Model training method and related device
AssigneeHuawei Technologies Co., Ltd.
InventorsDequan YU, Yin ZHAO
Life of this patent
Estimating the term…
Abstract
This application discloses a model training method, including: obtaining training data; using the training data as an input of a model, and in a training process of the model, calculating a parameter by using a first precision range, to obtain a calculated value; and if the calculated value overflows the first precision range, recalculating the parameter by using a second precision range, and performing iterative training on the model for one or more times by using a recalculated parameter, where the second precision range includes the first precision range, or the second precision range partially overlaps the first precision range.
Claims19
A model training method, wherein the method comprises:
- obtaining training data;
- using the training data as an input of a model, and in a training process of the model, calculating a parameter by using a first precision range, to obtain a calculated value;
- and
- if the calculated value overflows the first precision range, recalculating the parameter by using a second precision range, and performing iterative training on the model for one or more times by using a recalculated parameter, wherein the second precision range comprises the first precision range, or the second precision range partially overlaps the first precision range.
A training device, wherein the training device comprises:
- an obtaining unit, configured to obtain training data;
- and
- a calculation unit, configured to use the training data as an input of a model, and in a training process of the model, calculate a parameter by using a first precision range, to obtain a calculated value, wherein
- the calculation unit is further configured to:
- if the calculated value overflows the first precision range, recalculate the parameter by using a second precision range, and perform iterative training on the model for one or more times by using a recalculated parameter, wherein the second precision range comprises the first precision range, or the second precision range partially overlaps the first precision range.
A computer storage medium, comprising computer instructions, wherein when the computer instructions are run on a training device, the training device is enabled to perform the following steps:
- obtaining training data;
- using the training data as an input of a model, and in a training process of the model, calculating a parameter by using a first precision range, to obtain a calculated value;
- and
- if the calculated value overflows the first precision range, recalculating the parameter by using a second precision range, and performing iterative training on the model for one or more times by using a recalculated parameter, wherein the second precision range comprises the first precision range, or the second precision range partially overlaps the first precision range.
Dependencies are inferred from the claim text.