CN108764454A - The Processing with Neural Network method compressed and/or decompressed based on wavelet transformation - Google Patents
The Processing with Neural Network method compressed and/or decompressed based on wavelet transformation Download PDFInfo
- Publication number
- CN108764454A CN108764454A CN201810408237.1A CN201810408237A CN108764454A CN 108764454 A CN108764454 A CN 108764454A CN 201810408237 A CN201810408237 A CN 201810408237A CN 108764454 A CN108764454 A CN 108764454A
- Authority
- CN
- China
- Prior art keywords
- data
- piece
- neural network
- compressed
- processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
- G06F13/28—Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/14—Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
- G06F17/148—Wavelet transforms
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Computational Mathematics (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Algebra (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
The Processing with Neural Network method that present disclose provides a kind of to be compressed and/or be decompressed based on wavelet transformation, wherein the Processing with Neural Network method includes:Under piece data are compressed and are sent on piece;The data compressed and be sent on piece are unziped it;It receives the data after the decompression and executes neural network computing;The data that neural network computing obtains are compressed and are sent under piece;And the data compressed and be sent under piece are unziped it and are stored as under piece data;Wherein, it is based on wavelet transformation and the compression and/or decompression operation is carried out to data.The Processing with Neural Network method that the disclosure is compressed and/or decompressed based on wavelet transformation reduces IO amounts, reduces time and energy expense by carrying out data compression when load is with storage data.
Description
Technical field
The disclosure belongs to field of computer technology, relates more specifically to a kind of Processing with Neural Network system based on wavelet transformation
System and method.
Background technology
Artificial neural network (Artificial Neural Networks, ANNs) is referred to as neural network (Neural
Networks, NNs).It is a kind of imitation animal nerve network behavior feature, carries out the algorithm number of distributed parallel information processing
Learn model.This network relies on the complexity of system, by adjusting the interconnected relationship between internal great deal of nodes, thus
Achieve the purpose that handle information.The concept of deep learning (dee ρ learning) is derived from the research of artificial neural network.Containing how hidden
The multilayer perceptron of layer is exactly a kind of deep learning structure.Deep learning forms more abstract high level by combining low-level feature
Attribute classification or feature are indicated, to find that the distributed nature of data indicates.
Current various neural computing devices, the problem of often facing memory access bottleneck, load are caused with data are stored
Prodigious time and energy expense.
Invention content
(1) technical problems to be solved
Based on problem above, the purpose of the disclosure be to propose a kind of Processing with Neural Network system based on wavelet transformation and
Method, for solving at least one of above technical problem.
(2) technical solution
In order to achieve the above object, as an aspect of this disclosure, a kind of nerve net based on wavelet transformation is provided
Network processing method, including:
Under piece data are compressed and are sent on piece;
The data compressed and be sent on piece are unziped it;
It receives the data after the decompression and executes neural network computing;
The data that neural network computing obtains are compressed and are sent under piece;And
The data compressed and be sent under piece are unziped it and are stored as under piece data;
Wherein, it is based on wavelet transformation and the compression and/or decompression operation is carried out to data.
In some embodiments, the data for unziping it and compressing include neuron number evidence in neural network and
Weight data.
In some embodiments, the step of carrying out the compression and/or decompression operation to data based on wavelet transformation
In, wavelet transformation is carried out to data using wavelet basis function, the wavelet basis function includes Ha Er basic functions, Daubechies small
Wave basic function, Biorthogonal wavelet basis functions, Mexican Hat wavelet basis functions, Coiflets wavelet basis functions,
Symlets wavelet basis functions, Morlet wavelet basis functions, Meyer wavelet basis functions, Gaus wavelet basis functions, Dmeyer small echos
Basic function, ReverseBior wavelet basis functions.
In some embodiments, using the wavelet basis function by threshold method, interception method, give up high frequency and take low frequency method pair
Data are compressed.
In some embodiments, the wavelet transformation is one-dimensional wavelet transformation or two-dimensional wavelet transformation.
In some embodiments, in the step of carrying out the squeeze operation to data based on wavelet transformation, small echo is utilized
Basic function indicates the data for needing to compress, and carries out multi-level decomposition to it according to tower structure, obtains multistage approximate part and details
Part, selective casts out detail section, that is, realizes the squeeze operation;The decompression is being carried out to data based on wavelet transformation
In the step of contracting operation, corresponding approximate parts at different levels are restored step by step with detail section, that is, realize the decompression operation.
In some embodiments, squeeze operation and decompression operation are carried out using compression instruction and decompressed instruction, it is described
Compression instructs:Domain 1, for storing instruction type;Whether domain 2 is for storing source address on piece information;Domain 3, for depositing
Destination address is stored up whether on piece information;Domain 4, for storing whether source address uses register;Domain 5, for storage purposes
Whether location uses register;Domain 6, for storing source address;Domain 7, for storage purposes address;Domain 8 is used for storage register
Number.
In some embodiments, the step of under piece is compressed and on piece decompress the step of between further include:It is deposited on piece
Storage instruction and the data that on piece is sent to after under piece is compressed;
Further include before the step of carrying out neural network computing:Described instruction is decoded as microcommand;
The data using the microcommand and after on piece decompresses carry out neural network computing as a result,.
In some embodiments, on piece store instruction and the step of be sent to after under piece is compressed the data of on piece it
Before, further include:The data that on piece is sent to after under piece is compressed are pre-processed.
In some embodiments, realize the data between on piece and under piece by PCIe buses, DMA, wireless network
Transmission.
(3) advantageous effect
(1) disclosure can be compressed data using wavelet transformation, accelerate to effectively reduce neural network
IO amounts needed for device, reduce energy consumption, improve processing speed;In addition, being unziped it to data using wavelet transformation, restore
Former data meet the data precision demand of Processing with Neural Network.
(2) disclosure can carry out denoising etc. beneficial to operation using wavelet transformation to data, improve the quality of data.
Description of the drawings
Fig. 1 is the block diagram according to one embodiment Processing with Neural Network system of the disclosure.
Fig. 2 is according to another embodiment Processing with Neural Network system block diagrams of the disclosure.
Fig. 3 is according to one embodiment computing device block diagram of the disclosure.
Fig. 4 is according to another embodiment computing device of the disclosure and Processing with Neural Network system block diagrams.
Fig. 5 is according to the another embodiment computing device of the disclosure and Processing with Neural Network system block diagrams.
Fig. 6 is according to another embodiment computing device block diagram of the disclosure.
Fig. 7 is according to the another embodiment computing device block diagram of the disclosure.
Fig. 8 is according to embodiment of the present disclosure Processing with Neural Network method flow diagram.
Specific implementation mode
To make the purpose, technical scheme and advantage of the disclosure be more clearly understood, below in conjunction with specific embodiment, and reference
Attached drawing is described in further detail the disclosure.
In order to solve the problems, such as that existing various neural computing devices face memory access bottleneck, reduce in load and storage
Time caused by when data and energy expense, the disclosure compresses data using wavelet transformation, specifically using small echo
Basic function carries out wavelet transformation to input/output data, to be compressed to data.
Wavelet transformation (wavelet transform, WT) is a kind of transform analysis method, inherits and developed Fu in short-term
The thought of vertical leaf transformation localization, while the shortcomings of window size does not change with frequency is overcome again, one is capable of providing with frequency
" T/F " window that rate changes is the ideal tools for carrying out signal time frequency analysis and processing.Wavelet analysis for signal with
Image compression is an importance of wavelet transformation application.Its feature is compression ratio height, and compression speed is fast, can be protected after compression
The feature invariant of signal and image is held, and can be anti-interference in transmission.There are many compression method based on wavelet analysis, typically
Have best based method of wavelet packet etc., these methods may serve to in neural network using to data compress, to
Reduce IO expenses.
In some embodiments, as shown in Figure 1, the Processing with Neural Network system based on wavelet transformation includes:
Under piece compression unit, for being compressed under piece data and being sent on piece;And
On piece computing device is connect with the under piece compression unit, for receiving the number compressed and be sent on piece
According to execution neural network computing;
Wherein, the compression unit compresses the under piece data based on wavelet transformation.
The present embodiment reduces IO quantity, reduces time and energy by reloading under piece data compression on piece
Expense.
In some embodiments, as shown in Fig. 2, the Processing with Neural Network system include under sheet above compression unit and
On piece computing device further includes:Under piece decompression unit;And the on piece computing device includes on piece decompression unit and on piece
Compression unit;Wherein
The under piece compression unit, for being compressed under piece data and being sent on piece;
The on piece decompression unit is set in the computing device, for being compressed simultaneously through the under piece compression unit
The data for being sent on piece unzip it;
The on piece compression unit is set in the computing device, for being compressed on piece data and being sent to piece
Under;And
The under piece decompression unit is set to outside the computing device, for being compressed simultaneously through the on piece compression unit
The data for being sent under piece unzip it.According to actual conditions, if can be also loaded again after being sent to the data of under piece
It on piece, then can select not decompress it, also no longer it is compressed when loading later.As a result, by piece data pressure
Contracting is exported again under piece, is equally reduced IO quantity, is reduced time and energy expense.
In above-described embodiment, the compression unit compresses its input data based on wavelet transformation, specifically, utilizing
Wavelet basis function carries out wavelet transformation squeeze operation;The decompression unit decompresses its input data based on wavelet transformation
Contracting, is reconstructed data using corresponding basic function;The operation that the two executes is inverse operation, i.e. decompression is condensed to compression
Inverse operation.The wavelet transformation squeeze operation can be any one wavelet transformation squeeze operation, and including but not limited to " house is high
Frequently, take low frequency ", " threshold method ", " interception method " etc., the wavelet basis function can be any one wavelet basis function, including but
Be not limited to Ha Er basic functions (Haar basis function), Daubechies wavelet basis, Biorthogonal wavelet basis,
Mexican Hat wavelet basis etc..
Optionally, corresponding wavelet transformation compression compression, decompression operation are realized using special instruction set.Namely
It says, compression & decompression operation can both be completed using special instruction, and can also acquiescently be added in LOAD instruction
When carrying data, it is automatically performed the operation of compression & decompression.
Below by using wavelet transformation to compression of images for specifically introduce disclosure squeeze operation process.One is chosen first
Wavelet basis function indicates original image using one group of basic function;Then carry out multi-level decomposition to it, isolation can with but it is unlimited
According to tower structure to X-Y scheme carry out multi-level decomposition.Specifically, first doing two-dimensional wavelet transformation to image, approximation is obtained
(low frequency) part (respective average) and details (high frequency) part (corresponding detail coefficients).Then pairing approximation (low frequency) part again into
Row next stage decomposes, and so repeats.Later as the case may be, the mode for casting out the high fdrequency component in basic function can be taken,
The modes such as some components can be cast out according to a predetermined threshold, neglecting some influences little detail section.For convolution god
Through the characteristic pattern (feature map) in network, may be used such as above-mentioned same method.For neural network weight data,
Wavelet transformation can also be used, such as wavelet compression is carried out to each convolution kernel, in another example the full articulamentum of neural network is weighed
Value regards a matrix as, carries out wavelet compression.Although above-mentioned wavelet transformation generally refers to two-dimensional wavelet transformation, to power
The wavelet transformation of value or other data types (such as voice) is not limited to two-dimensional wavelet transformation, can also be one-dimensional wavelet transform,
And it is compressed.When unziping it, corresponding approximate parts at different levels are restored step by step with detail section.
Illustrate that the disclosure is based on wavelet transformation and utilizes wavelet basis for below using Haar wavelet transform function as wavelet basis function
Function carries out the process of data compression.Such as compressed based on Haar wavelet transform function pair picture, it is simple for the sake of we illustrate pair
The picture for multiplying 2 sizes for one 2 carries out wavelet compression.If its pixel value is [9 73 5], it is with the process of haar wavelet transform:
The average value (averaging) for calculating adjacent pixel pair obtains the new images that a width resolution ratio is original image 1/2:[8 4].This
When image information partial loss, in order to which the image reconstruction formed from 2 pixels goes out the original image of 4 pixels, it is necessary to every
First pixel value of a pixel pair subtracts detail coefficients (detail of the average value as image of this pixel
Coefficient it) preserves.Therefore, original image can be used two following average values and two detail coefficients to indicate:[8 4 1 -
1].The image that the first step converts can be further converted later, the process of original image Two Stages is as shown in table 1 below:
1 resolution ratio of table | Average value | Detail coefficients |
4 | [9 7 3 5] | |
2 | [8 4] | [1 -1] |
1 | [6] | [2] |
Since the data compression and decompression based on wavelet transformation is mutual inverse operation.Correspondingly, when unziping it, root
Approximate parts at different levels and detail section are restored step by step according to above-mentioned average value and detail coefficients, are specifically repeated no more.This public affairs
Load (load), storage (store) on piece mentioned in opening, under piece operate, i.e. I/O operation, can be by PCIe buses
Etc. transmission data is carried out, can be by DMA, can also be this is not restricted by wireless network transmissions data, as long as
The transmission mode referred in the disclosure can be used in transmission data between above-mentioned computing device and his device.
In addition, though be in above-described embodiment operation is unziped it to data using decompression unit, but about
The operation unziped it to data in open can also be carried out (same using the arithmetic element of neural computing device
Sample, compression unit had both may be used to carry out in squeeze operation, can also be carried out using arithmetic element).If using operation list
Member can then save the hardware costs that decompression unit is brought so that area smaller, but increase the negative of certain arithmetic element
Load so that the time of calculation stages is elongated in assembly line, therefore the case where more suitable for I/O operation accounting bigger.If increasing special
Decompression unit, then can make full use of pipelining so that decompression unit and arithmetic element concurrent working will be compressed
Operate the part as load data manipulation.
In some embodiments, as shown in figure 3, the computing device includes:Decompression unit 101, refers to storage unit 102
Enable control unit 107 and arithmetic element 108;Wherein,
The storage unit is for storing the data after operational order and compressed operation;
The decompression unit is connect with the storage unit, after receiving the squeeze operation that the storage unit is sent
Data, and carry out decompression operation;
Described instruction control unit is connect with the storage unit, is referred to for receiving the operation that the storage unit is sent
It enables, and is decoded as corresponding microcommand;
The arithmetic element is connect with the decompression unit and described instruction control unit, for receiving the microcommand
And the data after decompressed operation, and carry out neural network computing.The arithmetic element carries out neural network computing and obtains
Operation result can feed back to the storage unit of the computing device, under piece can also be sent to.
Further, as shown in figure 4, the computing device may also include on piece compression unit 111, for the operation
The operation result of unit carries out compression and retransmits under piece.Correspondingly, the Processing with Neural Network system can also further comprise
Under piece decompression unit 112, for being unziped it to the data for being sent under piece after on piece compression unit compression, from
And it is stored under piece.
As shown in figure 5, the Processing with Neural Network system can also include under piece compression unit 113, under piece number
According to input before the computing device, data are compressed, to reduce IO expenses.
In some embodiments, as shown in fig. 6, the computing device includes:Storage unit 102, the first input-buffer list
First 105, second input-buffer unit 106, instruction control unit 107, decompression unit 101 and arithmetic element 108.Wherein institute
It can be neuron buffer unit to state the first input-buffer unit, and the second input-buffer unit can be that weights caching is single
Member.
Optionally, the computing device may also include direct memory access (Direct Memory Access, DMA) unit
103, instruction cache unit 104 and output buffer unit 109.
Wherein, the storage unit for store operational order (specifically may include but be not limited to neural network computing instruction,
Non- neural network computing instruction, addition instruction, convolution instruction etc.) and input data (specifically may include but be not limited at compression
In being generated in the position relationship data of input data, input data after reason, operation result and other neural network computings
Between data etc.).The input data includes but not limited to input weights and input neuron number evidence, and the input data can wrap
It includes at least one input weights and/or at least one input neuron, particular number is not construed as limiting, i.e., the described input data.
The direct memory access DMA unit is used in the storage unit 102 and described instruction buffer unit 104, institute
It states between the second input-buffer unit 106, the first input-buffer unit 105 and the output buffer unit 109 into line number
According to read-write.
More specifically, the DMA unit 103 can read operational order from the storage unit 102, and by the operation
Instruction is sent to instruction control unit 107, or caches to instruction cache unit 104.
The DMA unit 103 can also be read from the storage unit 102 input weights or treated input weights,
It is cached with being sent in the first input storage unit 105 or second input storage unit 106.Correspondingly, DMA unit 103
Can also be read from the storage unit 102 input neuron or treated input neuron, deposited with being sent to the first input
Storage unit 105 or second inputs in storage unit 106.Wherein, the first input storage unit 105 and second input storage is single
The data cached in member 106 are different, such as the first input-buffer unit 105 is neuron buffer unit, are stored with input god
Neuron is inputted through first or treated, the second input-buffer unit 106 is weights buffer unit, storage input weights or place
Weights after reason;Vice versa.
Described instruction buffer unit 104 is for caching operational order.
Described instruction control unit 107 can be used for obtaining operational order from described instruction buffer unit or storage unit,
Further the operational order can be decoded as corresponding microcommand, so that the associated components in the arithmetic element can be known
Not and execute.
The output buffer unit 109 can be used for caching the operation result of the arithmetic element output.
The arithmetic element is used to carry out corresponding data operation processing according to the microcommand that instruction control unit is sent, with
Obtain operation result.
The decompression unit to data for unziping it processing, by compressed data convert.
Certainly, similar with previous embodiment, the computing device may also include on piece compression unit, for the calculating
The operation result of device carries out compression and retransmits under piece.Correspondingly, the Processing with Neural Network system can also further comprise
Under piece decompression unit, for being unziped it to the data for being sent under piece after on piece compression unit compression, to
It is stored under piece.The Processing with Neural Network system can also include under piece compression unit, for being inputted in institute under piece data
Before stating computing device, data are compressed, to reduce IO quantity.
The operational order may include:Operation domain and operation code, by taking convolution algorithm instructs as an example, as shown in table 2,
In, register number (optional, register can also be register file) 0, (optional, register can also be to post to register number
Storage heap) 1, register number (optional, register can also be register file) 2, register number (optional, also may be used by register
To be register file) 3, register number (optional, register can also be register file) 4 can be operation domain.
2 operational order form of table
In some embodiments, as shown in fig. 7, unlike previous embodiment computing device, the present embodiment calculates dress
It further includes pretreatment unit 110 to set, for being pre-processed to the data for inputting storage unit.It is described to deposit such as in the disclosure
The input data cached in storage unit can be by the preprocessing module treated input data etc..The pretreatment includes
But be not limited to it is following processing any one of or multinomial combination:Gaussian filtering, binaryzation, normalization, regularization, abnormal data
Screening etc., the disclosure does not limit.Other function modules of the present embodiment are similar with previous embodiment, and details are not described herein again.This
Open includes that corresponding wavelet transformation compression, decompression operation are realized using compression instruction, decompressed instruction.The compression refers to
It enables, shown in the form of decompressed instruction table 3 specific as follows.
The compression of table 3 instruction and decompression instruction type
In addition, can also include other kinds of compression unit in the computing device, such as quantify compression unit, thus
Other modes (such as quantifying) can be used to be compressed to data and occupy storage resource amount to reduce data, or even reduce data
Operand improves data-handling efficiency.
In the disclosure, the under piece data, on piece data include neuron number evidence and weight data in neural network.Institute
It states compression unit to compress the data for being input to the compression unit based on wavelet transformation, the decompression unit is based on small
Wave conversion unzips it the data for being input to the decompression unit, decompresses namely reconstructs, for restoring former data.
In some embodiments, as shown in figure 8, the disclosure also provides a kind of Processing with Neural Network side based on wavelet transformation
Method, including:
Under piece data are compressed and are sent to on piece, i.e. under piece compression and load step;
The data compressed and be sent on piece are unziped it, i.e. on piece decompression step;
It receives the data after the decompression and executes neural network computing, is i.e. on piece calculation step;
The data that neural network computing obtains are compressed and are sent to under piece, i.e. on piece compression step;And
Unzip it and be stored as under piece data to the compression and the data that are sent under piece, i.e., under piece decompression and
Storing step;
Wherein, it is based on wavelet transformation and the compression and/or decompression operation is carried out to data.
Specifically, in the step of carrying out the compression and/or decompression operation to data based on wavelet transformation, utilization is small
Wave basic function to data carry out wavelet transformation, the wavelet basis function include Ha Er basic functions, Daubechies wavelet basis functions,
Biorthogonal wavelet basis functions, Mexican Hat wavelet basis functions, Coiflets wavelet basis functions, Symlets wavelet basis
Function, Morlet wavelet basis functions, Meyer wavelet basis functions, Gaus wavelet basis functions, Dmeyer wavelet basis functions,
ReverseBior wavelet basis functions.The wavelet transformation can be one-dimensional wavelet transform or two-dimensional wavelet transformation.
More specifically, in the step of carrying out the squeeze operation to data based on wavelet transformation, wavelet basis letter is utilized
Number indicates the data for needing to compress, and carries out multi-level decomposition to it according to tower structure, obtains multistage approximate part and detail section,
Selectivity cast out detail section (can by threshold method, interception method, give up high frequency and low frequency method taken to cast out detail section, to right
Data are compressed), that is, realize the squeeze operation;In the step of carrying out the decompression operation to data based on wavelet transformation
In, corresponding approximate parts at different levels are restored step by step with detail section, that is, realize the decompression operation.(detailed process is above
Exemplary illustration, details are not described herein again).
In some embodiments, the step of under piece is compressed and on piece decompress the step of between further include:It is deposited on piece
Storage instruction and the data that on piece is sent to after under piece is compressed, i.e. on piece storing step;
Further include before the step of carrying out neural network computing:Described instruction is decoded as microcommand, i.e. on piece decodes
Step;
The data using the microcommand and after on piece decompresses carry out neural network computing as a result,.
Before on piece storing step, further include:The data that on piece is sent to after under piece is compressed are located in advance
Reason, i.e. on piece pre-treatment step.
In some embodiments, squeeze operation and decompression operation are carried out using compression instruction and decompressed instruction, it is described
Compression instructs:Domain 1, for storing instruction type;Domain 2, for whether storing source address on piece information;Domain 3, for depositing
Destination address is stored up whether on piece information;Domain 4, for storing whether source address uses register;Domain 5, for storage purposes
Whether location uses register;Domain 6, for storing source address;Domain 7, for storage purposes address;Domain 8 is used for storage register
Number, with reference to shown in aforementioned table 3.
In above-mentioned Processing with Neural Network method, be related between on piece and under piece data transmission can by PCIe buses,
DMA, wireless network are realized.
In the disclosure, the data of the compression and decompression operation either neuron number evidence in neural network,
It can also be the weight data in neural network.This squeeze operation can be obtained as the part in neural metwork training stage
The compression method of data or weights;It can also be used as a kind of operator operation of neural network computing.
In some embodiments, the disclosure additionally provides a kind of computer readable storage medium, and storage is used for electron number
According to the computer program of exchange, wherein the computer program makes computer execute the method.
In some embodiments, the disclosure additionally provides a kind of chip, and the chip includes computing device as described above.
In some embodiments, the disclosure additionally provides a kind of chip-packaging structure, and the chip-packaging structure includes such as
The upper chip.
In some embodiments, the disclosure additionally provides a kind of board, and the board includes chip package as described above
Structure.
In some embodiments, the disclosure additionally provides a kind of electronic equipment, and the electronic equipment includes as described above
Board.
In some embodiments, the electronic equipment includes data processing equipment, robot, computer, printer, scanning
Instrument, tablet computer, intelligent terminal, mobile phone, automobile data recorder, navigator, sensor, camera, server, cloud server,
Camera, video camera, projecting apparatus, wrist-watch, earphone, mobile storage, wearable device, the vehicles, household electrical appliance, and/or medical treatment
Equipment.
In some embodiments, the vehicles include aircraft, steamer and/or vehicle;The household electrical appliance include electricity
Depending on, air-conditioning, micro-wave oven, refrigerator, electric cooker, humidifier, washing machine, electric light, gas-cooker, kitchen ventilator;The Medical Devices include
Nuclear Magnetic Resonance, B ultrasound instrument and/or electrocardiograph.
Particular embodiments described above has carried out further in detail the purpose, technical solution and advantageous effect of the disclosure
Describe in detail bright, it should be understood that the foregoing is merely the specific embodiment of the disclosure, be not limited to the disclosure, it is all
Within the spirit and principle of the disclosure, any modification, equivalent substitution, improvement and etc. done should be included in the protection of the disclosure
Within the scope of.
Claims (10)
1. a kind of Processing with Neural Network method based on wavelet transformation, including:
Under piece data are compressed and are sent on piece;
The data compressed and be sent on piece are unziped it;
It receives the data after the decompression and executes neural network computing;
The data that neural network computing obtains are compressed and are sent under piece;And
The data compressed and be sent under piece are unziped it and are stored as under piece data;
Wherein, it is based on wavelet transformation and the compression and/or decompression operation is carried out to data.
2. Processing with Neural Network method according to claim 1, wherein the data for unziping it and compressing include
Neuron number evidence in neural network and weight data.
3. Processing with Neural Network method according to claim 1, wherein carrying out the pressure to data based on wavelet transformation
In the step of contracting and/or decompression operation, wavelet transformation is carried out to data using wavelet basis function, the wavelet basis function includes
Ha Er basic functions, Daubechies wavelet basis functions, Biorthogonal wavelet basis functions, Mexican Hat wavelet basis functions,
Coiflets wavelet basis functions, Symlets wavelet basis functions, Morlet wavelet basis functions, Meyer wavelet basis functions, Gaus are small
Wave basic function, Dmeyer wavelet basis functions, ReverseBior wavelet basis functions.
4. Processing with Neural Network method according to claim 3, wherein using the wavelet basis function by threshold method,
Interception method gives up high frequency and low frequency method is taken to compress data.
5. Processing with Neural Network method according to claim 4, wherein the wavelet transformation be one-dimensional wavelet transformation or
Two-dimensional wavelet transformation.
6. Processing with Neural Network method according to claim 1, wherein carrying out the pressure to data based on wavelet transformation
In the step of contracting operation, the data for indicating to need to compress using wavelet basis function carry out multi-level decomposition according to tower structure to it,
Multistage approximate part and detail section are obtained, selective casts out detail section, that is, realizes the squeeze operation;Based on small echo
In the step of transformation carries out the decompression operation to data, corresponding approximate parts at different levels are restored step by step with detail section,
Realize the decompression operation.
7. Processing with Neural Network method according to claim 1, wherein pressed using compression instruction and decompressed instruction
Contracting operation and decompression operation, the compression instruction include:Domain 1, for storing instruction type;Domain 2 is for storing source address
It is no on piece information;Domain 3, whether address is on piece information for storage purposes;Domain 4, for whether storing source address using posting
Storage;Domain 5, for storage purposes address whether use register;Domain 6, for storing source address;Domain 7, for storage purposes
Location;Domain 8 is used for storage register number.
8. Processing with Neural Network method according to claim 1, wherein
Further include between the step of the step of under piece is compressed and on piece decompress:In on piece store instruction and after under piece is compressed
It is sent to the data of on piece;
Further include before the step of carrying out neural network computing:Described instruction is decoded as microcommand;
The data using the microcommand and after on piece decompresses carry out neural network computing as a result,.
9. Processing with Neural Network method according to claim 8, wherein
Before the step of being sent on piece store instruction and after under piece is compressed the data of on piece, further include:To described through piece
The data that on piece is sent to after lower compression are pre-processed.
10. Processing with Neural Network method according to claim 2, wherein realized by PCIe buses, DMA, wireless network
The data are transmitted between on piece and under piece.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810408237.1A CN108764454B (en) | 2018-04-28 | 2018-04-28 | Neural network processing method based on wavelet transform compression and/or decompression |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810408237.1A CN108764454B (en) | 2018-04-28 | 2018-04-28 | Neural network processing method based on wavelet transform compression and/or decompression |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108764454A true CN108764454A (en) | 2018-11-06 |
CN108764454B CN108764454B (en) | 2022-02-25 |
Family
ID=64009022
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810408237.1A Active CN108764454B (en) | 2018-04-28 | 2018-04-28 | Neural network processing method based on wavelet transform compression and/or decompression |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108764454B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110399970A (en) * | 2019-05-05 | 2019-11-01 | 首都经济贸易大学 | Wavelet convolution wavelet neural network and intelligence analysis method and system |
CN111353593A (en) * | 2018-12-24 | 2020-06-30 | 上海寒武纪信息科技有限公司 | Data processing method, device, processor and storage medium |
CN111353592A (en) * | 2018-12-24 | 2020-06-30 | 上海寒武纪信息科技有限公司 | Data processing method, computer system and storage medium |
CN111353594A (en) * | 2018-12-24 | 2020-06-30 | 上海寒武纪信息科技有限公司 | Data processing method, device, processor and storage medium |
CN111431539A (en) * | 2020-03-04 | 2020-07-17 | 杭州嘉楠耘智信息科技有限公司 | Neural network data compression method and device and computer readable storage medium |
CN115830298A (en) * | 2023-02-17 | 2023-03-21 | 江苏羲辕健康科技有限公司 | Medicine supervision code identification method and system based on neural network |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1568466A (en) * | 2001-09-26 | 2005-01-19 | 交互设备有限公司 | System and method for communicating media signals |
WO2009149926A2 (en) * | 2008-06-10 | 2009-12-17 | Intelligement Ag | System and method for the computer-based analysis of large quantities of data |
CN102754078A (en) * | 2009-09-30 | 2012-10-24 | 信飞***公司 | Enhanced multi-processor waveform data exchange using compression and decompression |
CN102855644A (en) * | 2012-09-10 | 2013-01-02 | 北京航空航天大学 | Large-scale topographic data compression and decompression method based on wavelet self-feedback |
CN106447034A (en) * | 2016-10-27 | 2017-02-22 | 中国科学院计算技术研究所 | Neutral network processor based on data compression, design method and chip |
CN106529670A (en) * | 2016-10-27 | 2017-03-22 | 中国科学院计算技术研究所 | Neural network processor based on weight compression, design method, and chip |
CN106612437A (en) * | 2016-01-11 | 2017-05-03 | 四川用联信息技术有限公司 | Graphic image compression method |
CN106991477A (en) * | 2016-01-20 | 2017-07-28 | 南京艾溪信息科技有限公司 | A kind of artificial neural network compression-encoding device and method |
CN107491811A (en) * | 2017-09-01 | 2017-12-19 | 中国科学院计算技术研究所 | Method and system and neural network processor for accelerans network processing unit |
-
2018
- 2018-04-28 CN CN201810408237.1A patent/CN108764454B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1568466A (en) * | 2001-09-26 | 2005-01-19 | 交互设备有限公司 | System and method for communicating media signals |
WO2009149926A2 (en) * | 2008-06-10 | 2009-12-17 | Intelligement Ag | System and method for the computer-based analysis of large quantities of data |
CN102754078A (en) * | 2009-09-30 | 2012-10-24 | 信飞***公司 | Enhanced multi-processor waveform data exchange using compression and decompression |
CN102855644A (en) * | 2012-09-10 | 2013-01-02 | 北京航空航天大学 | Large-scale topographic data compression and decompression method based on wavelet self-feedback |
CN106612437A (en) * | 2016-01-11 | 2017-05-03 | 四川用联信息技术有限公司 | Graphic image compression method |
CN106991477A (en) * | 2016-01-20 | 2017-07-28 | 南京艾溪信息科技有限公司 | A kind of artificial neural network compression-encoding device and method |
CN106447034A (en) * | 2016-10-27 | 2017-02-22 | 中国科学院计算技术研究所 | Neutral network processor based on data compression, design method and chip |
CN106529670A (en) * | 2016-10-27 | 2017-03-22 | 中国科学院计算技术研究所 | Neural network processor based on weight compression, design method, and chip |
CN107491811A (en) * | 2017-09-01 | 2017-12-19 | 中国科学院计算技术研究所 | Method and system and neural network processor for accelerans network processing unit |
Non-Patent Citations (4)
Title |
---|
JAEHYEONG SIM 等: "14.6 A 1.42TOPS/W Deep Convolutional Neural Network Recognition Processor for Intelligent IoE Systems", 《2016 IEEE INTERNATIONAL SOLID-STATE CIRCUITS CONFERENCE》 * |
JONG HWAN KO 等: "Adaptive Weight Compression for Memory-Efficient Neural Networks", 《DESIGN,AUTOMATION & TEST IN EUROPE CONFERENCE & EXHIBITION》 * |
YOONHO BOO 等: "Structured Sparse Ternary Weight Coding of Deep Neural Networks for Efficient Hardware Implementations", 《ARXIV:1707.03684V1》 * |
徐锋涛: "基于小波变换的地震勘探数据压缩的研究", 《中国优秀硕士学位论文全文数据库基础科学辑》 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111353593A (en) * | 2018-12-24 | 2020-06-30 | 上海寒武纪信息科技有限公司 | Data processing method, device, processor and storage medium |
CN111353592A (en) * | 2018-12-24 | 2020-06-30 | 上海寒武纪信息科技有限公司 | Data processing method, computer system and storage medium |
CN111353594A (en) * | 2018-12-24 | 2020-06-30 | 上海寒武纪信息科技有限公司 | Data processing method, device, processor and storage medium |
CN111353592B (en) * | 2018-12-24 | 2022-12-02 | 上海寒武纪信息科技有限公司 | Data processing method, computer system and storage medium |
CN110399970A (en) * | 2019-05-05 | 2019-11-01 | 首都经济贸易大学 | Wavelet convolution wavelet neural network and intelligence analysis method and system |
CN110399970B (en) * | 2019-05-05 | 2021-10-01 | 首都经济贸易大学 | Wavelet convolution wavelet neural network and information analysis method and system |
CN111431539A (en) * | 2020-03-04 | 2020-07-17 | 杭州嘉楠耘智信息科技有限公司 | Neural network data compression method and device and computer readable storage medium |
CN111431539B (en) * | 2020-03-04 | 2023-12-08 | 嘉楠明芯(北京)科技有限公司 | Compression method and device for neural network data and computer readable storage medium |
CN115830298A (en) * | 2023-02-17 | 2023-03-21 | 江苏羲辕健康科技有限公司 | Medicine supervision code identification method and system based on neural network |
Also Published As
Publication number | Publication date |
---|---|
CN108764454B (en) | 2022-02-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108764454A (en) | The Processing with Neural Network method compressed and/or decompressed based on wavelet transformation | |
CN109032669B (en) | Neural network processing device and method for executing vector minimum value instruction | |
CN113688855B (en) | Data processing method, federal learning training method, related device and equipment | |
CN108615074A (en) | Processing with Neural Network system and method based on compressed sensing | |
US11727276B2 (en) | Processing method and accelerating device | |
WO2022105714A1 (en) | Data processing method, machine learning training method and related apparatus, and device | |
WO2018108126A1 (en) | Neural network convolution operation device and method | |
CN108733348B (en) | Fused vector multiplier and method for performing operation using the same | |
CN111079764B (en) | Low-illumination license plate image recognition method and device based on deep learning | |
CN108665062A (en) | A kind of Processing with Neural Network system reducing IO expenses based on wavelet transformation | |
CN108629410A (en) | Based on principal component analysis dimensionality reduction and/or rise the Processing with Neural Network method tieed up | |
Zhao et al. | Image quality assessment based on complementary local feature extraction and quantification | |
CN108960415B (en) | Processing apparatus and processing system | |
CN116580290B (en) | Unmanned aerial vehicle identification method, unmanned aerial vehicle identification device and storage medium | |
CN105023021A (en) | Characteristic matching method based on principal direction template | |
CN110175673B (en) | Processing method and acceleration device | |
CN109389210A (en) | Processing method and processing unit | |
CN108629409A (en) | A kind of Processing with Neural Network system reducing IO expenses based on principal component analysis | |
CN113128673B (en) | Data processing method, storage medium, neural network processor and electronic device | |
CN111784557A (en) | Method and device for processing image data, board card and readable storage medium | |
CN113238975A (en) | Memory, integrated circuit and board card for optimizing parameters of deep neural network | |
CN113238976A (en) | Cache controller, integrated circuit device and board card | |
Li et al. | A research and strategy of remote sensing image denoising algorithms | |
Satapathy et al. | Optimized openCL™ kernels for frequency domain image high-boost filters using image vectorization technique | |
CN111382852A (en) | Data processing device, method, chip and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |