Patent ID: 11928599
Assignee: INSPUR SUZHOU INTELLIGENT TECHNOLOGY CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A method for model compression of a neural network on a calculation platform in an embedded system, comprising the following steps: recording, by at least one processor, input and output parameters of each layer of network in a network structure; dividing, by the at least one processor, the network structure into a plurality of small networks according to the input and output parameters; setting, by the at least one processor, a pruning flag bit of a first convolutional layer in each small network to be 0 to obtain a small pruned network; training each small pruned network, by means of a dynamic channel pruning algorithm or a channel pruning algorithm based on automatic machine learning that is performed on the calculation platform in the embedded system, to obtain a network weight and a weight mask; recording, by the at least one processor, a pruned channel index number of each convolutional layer of any small pruned network that has a weight mask of 0; and carrying out, by the at least one processor, decomposition calculation on each small pruned network according to the pruned channel index number, so as to obtain a pruned neural network model to reduce demand of storage space and optimize a model calculation process for the embedded system, wherein the step of recording, by the at least one processor, the input and output parameters of each layer of network in the network structure comprises:
recording, by the at least one processor, an input count, an output count, an input name and an output name of each layer of network in the network structure, wherein the step of dividing, by the at least one processor, the network structure into the plurality of small networks according to the input and output parameters comprises: when both the input count and the output count of the current network layer are 1 and the input name thereof is inconsistent with input name of any other network layer, assigning, by the at least one processor, the current network layer and a previous network layer into the same small network; when either the input count or the output count of the current network layer is not 1, assigning, by the at least one processor, the current network layer into one small network; and when both the input count and the output count of the current network layer are 1 and the input name thereof is consistent with input name of one of other network layers, assigning, by the at least one processor, the current network layer into one small network.