CPC G06N 20/00 (2019.01) | 7 Claims |
1. A calibration method for a neural network model, comprising:
determining layer attribute information of each to-be-calibrated layer in a model; and
determining a group to which each of the to-be-calibrated layers is assigned according to the total available resources and the layer attribute information of each of the to-be-calibrated layers;
wherein the layer attribute information of any of the to-be-calibrated layers comprises layer required resources, the layer required resources being resources needing to be occupied when the to-be-calibrated layer is calibrated; and the total available resources are the total resources used for calibration, wherein the resources are memory resources; and
wherein the determining a group to which each of the to-be-calibrated layers is assigned according to the total available resources and the layer attribute information of each of the to-be-calibrated layers comprises:
determining the to-be-calibrated layer with the greatest layer required resources as a target layer from the to-be-calibrated layers not in a group;
determining a group to which the target layer is assigned at least according to the layer attribute information of the target layer;
subtracting the layer required resources for the target layer from the group available resources of the group to which the target layer is assigned; and
if there are still to-be-calibrated layers not in a group, returning to the step of determining the to-be-calibrated layer with the greatest layer required resources as a target layer from the to-be-calibrated layers not in a group.
|