CPC G06N 3/082 (2013.01) [G06F 11/0751 (2013.01); G06F 11/0793 (2013.01)] | 11 Claims |
1. A neural network optimization method for optimizing a neural network for operating on a device having a hardware constrained calculation platform performed by a processor, comprising:
selecting an operator to be replaced from a plurality of operators in a network layer according to a predetermined condition;
replacing the operator to be replaced by a plurality of equivalent operators according to a calculation function corresponding to the operator to be replaced, wherein the plurality of equivalent operators comprises a target operator;
pre-calculating for a first operator among the plurality of equivalent operators to complete a calculation function of the first operator, and inputting a calculation result into the target operator;
identifying a second operator according to data change conditions of the plurality of equivalent operators, and combining the second operator with the target operator; and
deleting the first operator,
wherein a first power needed by the processor to operate the neural network prior to applying the optimization method is greater than a second power needed by the processor to operate the neural network after applying the optimization method, and
wherein a first granularity of the neural network prior to applying the optimization method and a second granularity of the neural network after applying the optimization method are the same.
|