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

Claim 2:
3. A device for model compression of a neural network on a calculation platform in an embedded system, wherein the device comprises: at least one processor; and a memory, wherein the memory stores program codes that can be run by the processor, and when the program codes are run by the processor, the following steps are carried out: recording input and output parameters of each layer of network in a network structure; dividing the network structure into a plurality of small networks according to the input and output parameters; setting 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 a pruned channel index number of each convolutional layer of any small pruned network that has a weight mask of 0; and carrying out 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 the input and output parameters of each layer of network in the network structure comprises: recording 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 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 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 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 the current network layer into one small network.