Supercharge Your Innovation With Domain-Expert AI Agents!

Compression method and device for deep learning model

A technology of deep learning and compression method, applied in the field of deep learning, can solve problems such as upper limit of compression, lower model performance, complex program code steps, etc., achieve the effect of reducing storage and computing consumption, maintaining performance and accuracy, and easy to understand the principle

Inactive Publication Date: 2017-11-21
深圳市深网视界科技有限公司
View PDF0 Cites 22 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0015] In order to overcome the deficiencies of the prior art, one of the purposes of the present invention is to provide a compression method for deep learning models, which can solve the problem that the existing direct construction of small models requires a lot of experiments, and the efficiency is low; removal is not important The scheme of pruning the network and then training based on the pruned network has a large upper limit of compression, which is easy to lose more information and reduce the performance of the model; the code steps of the deep compression scheme are more complicated, and the network structure needs to be understood Deeper understanding, more difficult questions
[0016] The second object of the present invention is to provide a compression device for deep learning models, which can solve the problem that the existing direct construction of small models requires a lot of experiments, and the efficiency is low; remove unimportant connections to pruning the network, In the training scheme based on the pruned network, the compression has a large upper limit, and it is easy to lose more information and reduce the performance of the model; the code steps of the deep compression scheme are more complicated, requiring a deeper understanding of the network structure, which is more difficult The problem
[0017] The third object of the present invention is to provide a compression device for deep learning models, which can solve the problem that the existing direct construction of small models requires a lot of experiments, and the efficiency is low; remove unimportant connections and pruning the network, In the training scheme based on the pruned network, the compression has a large upper limit, and it is easy to lose more information and reduce the performance of the model; the code steps of the deep compression scheme are more complicated, requiring a deeper understanding of the network structure, which is more difficult The problem

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Compression method and device for deep learning model
  • Compression method and device for deep learning model
  • Compression method and device for deep learning model

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0063] Such as figure 1 A compression method for a deep learning model, comprising the following steps:

[0064] Step S110, pruning the deep learning model according to the pruning threshold.

[0065] The deep learning model includes a plurality of network layers, the network layer includes a plurality of nodes, there are connections between the nodes, and each connection corresponds to a parameter. Further, step S110 pruning the deep learning model according to the pruning threshold specifically includes the following sub-steps:

[0066] Step S111, calculating the average value of the parameters associated with the network layer in the deep learning model;

[0067] Step S112, calculating the pruning threshold of the network layer according to the average value;

[0068] Step S113. Delete the connection in the network layer whose parameter is smaller than the pruning threshold.

[0069] Through calculation, parameters smaller than the pruning threshold are deleted, thereby...

Embodiment 2

[0108] Such as figure 2 The compression method of the shown deep learning model includes the following steps:

[0109] Step S201, storing the deep learning model.

[0110] Before pruning the deep learning model, store the deep learning model for restoring the deep learning model before pruning after over-pruning.

[0111] Step S210, pruning the deep learning model according to the pruning threshold.

[0112] Step S220, fine-tuning the pruned deep learning model.

[0113] Step S230, calculating the accuracy rate of the fine-tuned deep learning model.

[0114] Step S202, if the accuracy rate is less than the over-shrinkage threshold, acquire the stored deep learning model.

[0115] If the accuracy rate is less than the over-shrinkage threshold, it means that the pruning performed in step S210 has deleted too many connections or more important parameters, and the deep learning model before pruning can be restored, and then pruned again after adjusting the pruning strategy. ...

Embodiment 3

[0124] Such as image 3 Compression setup for deep learning models shown, including:

[0125] A pruning module 110, configured to prune the deep learning model according to a pruning threshold.

[0126] Further, pruning module 110 includes:

[0127] a first calculation unit, configured to calculate an average value of the parameters associated with the network layer in the deep learning model;

[0128] A second calculation unit, configured to calculate the pruning threshold of the network layer according to the average value;

[0129] A deleting unit, configured to delete the connection in the network layer whose parameter is smaller than the pruning threshold.

[0130] The fine-tuning module 120 is configured to fine-tune the pruned deep learning model.

[0131] Further, the fine-tuning module 120 includes:

[0132] a first acquisition unit, configured to acquire training data;

[0133] a second acquiring unit, configured to acquire a setting instruction for setting the...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a compression method and device for a deep learning model, and the method comprises the following steps: carrying out the pruning of the deep learning model according to a pruning threshold value; carrying out the fine tuning of the pruned deep learning model; calculating the accuracy of the deep learning model after fine tuning; and retraining the deep learning model after fine tuning if the accuracy is less than a preset threshold value. Through the addition of an accuracy test, it indicates that too many parameters are deleted in compression at a former step if the accuracy is less than the threshold value, and the set accuracy cannot be achieved by fine tuning through a little data, so a large amount of data is needed for the retraining of the model. The method is simple in compression steps, and the principles are easy to understand. The method is high in compression efficiency. The method can reduce the storage and computing consumption of a large-scale deep learning model, keeps the performance and accuracy, and improves the practicality of the deep learning model.

Description

technical field [0001] The invention relates to the field of deep learning, in particular to a compression method and device for a deep learning model. Background technique [0002] Deep learning is a new field in machine learning research by establishing a neural network that imitates the human brain for analysis and learning, and uses the mechanism of the human brain to explain data, such as images, sounds, and data in this paper. [0003] Deep learning allows an artificial neural network to learn its statistical laws from a large number of training data samples to make predictions about unknown events. Its essence is to build a network structure with many hidden layers and automatically learn more useful features based on massive data, thereby improving the accuracy of classification or prediction. Therefore, deep learning has been widely used in image, sound and other fields recently. [0004] During the training and learning process, the neural network continuously im...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06N3/08G06N99/00
CPCG06N3/082G06N20/00
Inventor 龚丽君马东宇赵瑞陈芳林
Owner 深圳市深网视界科技有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More