IP Library Granted Patent US 12,277,500
Granted Patent B2
US 12,277,500 · App. 17/324,536 · Granted Apr 15, 2025

Neural network optimization method, electronic device and processor

Inventors: Yudong Li (Fujian, CN); Xiaolong Liu (Fujian, CN)
Assignee: SIGMASTAR TECHNOLOGY LTD.
G06N3/082G06F11/0751G06F11/0793
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,277,500
App. No.
17/324,536
Granted
Apr 15, 2025
Kind
B2
Abstract

The present invention discloses a neural network optimization method. An operator to be replaced is selected from multiple operators in a network layer according to a predetermined condition, and the operator to be replaced is replaced by multiple equivalent operators according to a calculation function corresponding to the operator to be replaced, wherein the multiple equivalent operators include a target operator. Pre-calculating is performed for a first operator among the multiple equivalent operators, and the calculation result is inputted into the target operator. A second operator is identified according to data change conditions of the multiple equivalent operators, and the second operator is combined with the target operator to complete optimization of a neural network model. The present invention can further perform lossless conversion of the operators in the neural network, further improving calculation performance on the basis of a simplified network structure.

Claims (34)

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.

2. The neural network optimization method according to claim 1 , wherein the first operator is a constant operator.

3. The neural network optimization method according to claim 1 , wherein an amount of data of the second operator before and after operation does not change.

4. The neural network optimization method according to claim 1 , wherein a neural network having been optimized by the neural network optimization method is applied to a calculation platform, and the predetermined condition comprises a function that is not supported by the calculation platform.

5. The neural network optimization method according to claim 1 , wherein the step of replacing the operator to be replaced by the plurality of equivalent operators according to the calculation function corresponding to the operator to be replaced comprises:

calculating feature information of the target operator according to a weight and a bias of the operator to be replaced; and

replacing the operator to be replaced by the plurality of equivalent operators according to the calculation function and the feature information.

6. A processor, for executing a program code to implement a neural network optimization method for optimizing a neural network for operating on a device having a hardware constrained calculation platform, the neural network optimization method 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.

7. The processor according to claim 6 , wherein the first operator is a constant operator.

8. The processor according to claim 6 , an amount of data of the second operator before and after operation does not change.

9. An electronic device, comprising a neural network calculation device, the neural network calculation device operating a neural network model having been optimized by a neural network optimization method, the neural network optimization method for optimizing a neural network for operating on the calculation device having a hardware constrained calculation platform 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 device to operate the neural network prior to applying the optimization method is greater than a second power needed by the device 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.

10. The electronic device according to claim 9 , wherein the first operator is a constant operator.

11. The electronic device according to claim 9 , an amount of data of the second operator before and after operation does not change.

Assignments (2)
CHANGE OF NAME Recorded Aug 19, 2021
From: XIAMEN SIGMASTAR TECHNOLOGY LTD.
To: SIGMASTAR TECHNOLOGY LTD.
Reel/Frame 057307/0913 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 19, 2021
From: LI, YUDONG; LIU, XIAOLONG
To: XIAMEN SIGMASTAR TECHNOLOGY LTD.
Reel/Frame 056288/0648 →
Priority Claims (1)
CN 202010924255.2 · Sep 4, 2020 · national
Continuity (1)
Related Publication 20220076123A1 · Mar 10, 2022
References Cited (5)
US 20160358070A1 · Brothers · 2016 [cited by examiner]
US 20190303762A1 · Sui · 2019 [cited by examiner]
US 20210158131A1 · Jain · 2021 [cited by examiner]
US 20220051104A1 · Interlandi · 2022 [cited by examiner]
Deng, “Model Compression and Hardware Acceleration for Neural Networks: a Comprehensive Survey”, IEEE, Date of publication Mar. 20, 2020. (Year: 2020). [cited by examiner]