WO2018120019A1 - Compression/decompression apparatus and system for use with neural network data - Google Patents

Compression/decompression apparatus and system for use with neural network data Download PDF

Info

Publication number
WO2018120019A1
WO2018120019A1 PCT/CN2016/113497 CN2016113497W WO2018120019A1 WO 2018120019 A1 WO2018120019 A1 WO 2018120019A1 CN 2016113497 W CN2016113497 W CN 2016113497W WO 2018120019 A1 WO2018120019 A1 WO 2018120019A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
module
video
encoding
neural network
Prior art date
Application number
PCT/CN2016/113497
Other languages
French (fr)
Chinese (zh)
Inventor
陈天石
罗宇哲
郭崎
刘少礼
陈云霁
Original Assignee
上海寒武纪信息科技有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 上海寒武纪信息科技有限公司 filed Critical 上海寒武纪信息科技有限公司
Priority to PCT/CN2016/113497 priority Critical patent/WO2018120019A1/en
Publication of WO2018120019A1 publication Critical patent/WO2018120019A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons

Definitions

  • the present invention relates to the field of artificial neural network technologies, and in particular, to an apparatus and system for compression/decompression of neural network data.
  • ANNs Artificial neural networks
  • NNNs neural networks
  • neural networks have made great progress in many fields such as intelligent control and machine learning.
  • neural networks have once again become a hot issue in the field of artificial intelligence.
  • the size of neural networks has become larger and larger.
  • Google Inc. have proposed the concept of “large-scale deep learning” and hope to build intelligent computer systems through Google as a platform to integrate global information.
  • the present invention provides an apparatus and system for compression/decompression of neural network data to reduce the pressure of storage space and memory access bandwidth.
  • a compression apparatus for neural network data includes: a model conversion module 120 for converting neural network data into video-like data; and a data encoding module 131 connected to the model conversion module 120 for video encoding The data is encoded to obtain a compressed result.
  • the video-like data refers to a model conversion module.
  • each of the original neural network data is converted into a series of integer values within a preset range, corresponding to the representation of one pixel, which together constitute the corresponding video data.
  • the model conversion module 120 converts the neural network data into video-like data in one of two ways:
  • model conversion module 120 For neural network data with a data range of [-b, a], the model conversion module 120 operates as follows:
  • I is an integer in the interval [0, 255], that is, a representation of one pixel;
  • w is the true data value of the neural network data in the range [-b, a];
  • the model conversion module 120 converts the weights and offsets of the hidden layer neurons corresponding to each feature map in the convolutional neural network data, and weights and biases
  • the integers obtained after the conversion are integrated to obtain data of the corresponding video frame, and the video data of the video frame is obtained by combining the weights of the hidden layer neurons corresponding to the plurality of feature maps and the data of the similar video frames obtained by the offset.
  • the data encoding module 131 includes: an encoding sub-module for encoding the video data in a video encoding manner to obtain a data encoding result; and an integration sub-module for The data encoding result and the encoding process information are integrated to obtain a compressed result.
  • the encoding sub-module includes: a prediction unit 130a for performing predictive coding using correlation between video-like data neighboring data; and a transforming unit 130b for processing the predicted unit
  • the video-like data is orthogonally transform-encoded to compress the data
  • the quantization unit 130c is configured to perform quantization coding on the video-like data processed by the transform unit, and reduce the coding length of the data without degrading the data quality
  • the encoding unit 130d is configured to perform rate compression encoding on the video-like data processed by the quantization unit by using statistical characteristics of the data to reduce data redundancy.
  • the encoding sub-module includes: a depth auto-encoder unit 130, configured to further encode the video-like data output by the model conversion module, and output the hidden layer as a coding result; wherein the depth
  • the automatic encoder unit 130 trains by using the video-like data as a training input and an ideal output by minimizing the reconstruction error. It is basically the same data as the input class video data.
  • the compression device of the present invention further includes: a data cache module 140 for buffering neural network data; and a controller module 110 coupled to the data cache module 140, the model conversion module 120, and the data encoding module 131 for transmitting Control instructions to perform the following operations:
  • the data cache instruction is sent to the data cache module 140 to obtain the compression result from the data encoding module 131, and the compression result is cached.
  • a decompression apparatus for neural network data includes: a data decoding module 132, configured to obtain a compression result, and decode the compression result by using a video decoding manner corresponding to the compression result; and a model conversion module 120 connected to the data decoding module 132, Used to restore the decoded class video data to neural network data.
  • the data decoding module 132 includes: a de-integration sub-module for de-integrating the compression result to obtain a data encoding result and encoding process information; and a decoding sub-module for The coding mode information is extracted from the coding process information, and the data coding result is decoded by using a decoding mode corresponding to the coding mode information to obtain a class video. data.
  • the model conversion module restores the decoded video-like data to neural network data in one of two ways:
  • the model conversion module 120 operates according to the following formula to obtain the true data values of the neural network data:
  • w is the true data value of the neural network data in the range [-b, a]
  • I is the video-like data, which is an integer in the interval [0, 255].
  • the model conversion module 120 converts the data of the corresponding video frame in the video-like data, and converts each frame into a hidden layer neuron corresponding to a feature map of the convolutional neural network. Weight and offset, the data converted by each frame is integrated to obtain the weight and offset of the hidden layer neurons corresponding to each feature map of the convolutional neural network.
  • the decompression device of the present invention further includes: a data cache module 140 for buffering the compression result; and a controller module 110, coupled to the model conversion module 120, the data decoding module 132, and the data cache module 140, for Release the control instructions to do the following:
  • a data conversion instruction is sent to the model conversion module 120 to convert the video-like data into neural network data.
  • a system for compression/decompression of neural network data includes: a compression device, which is the compression device described above; and a decompression device, which is the decompression device described above; wherein the compression device and the decompression device share a data cache module 140, a controller module 110, and a model Conversion module 120.
  • the apparatus and system for compressing/decompressing neural network data of the present invention have at least one of the following beneficial effects:
  • the present invention can achieve high-efficiency compression and decompression of a large-scale neural network model, thereby greatly reducing the storage space and transmission pressure of the neural network model, thereby adapting to the trend of expanding the size of the neural network in the era of big data.
  • FIG. 1 is a block diagram showing the structure of a compression apparatus for compressing neural network data according to a first embodiment of the present invention.
  • FIG. 2 is a schematic structural view of a data encoding module in the compression device shown in FIG. 1.
  • FIG. 3 is a flow chart of a controller module in FIG. 1 transmitting a control command to perform an operation.
  • FIG. 4 is a schematic structural diagram of a decompression apparatus for decompressing a neural network data compression result according to a second embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a data decoding module in the decompression device shown in FIG. 4.
  • FIG. 6 is a controller module of the decompression device shown in FIG. 4 transmitting a control command to perform an operation Flow chart.
  • FIG. 7 is a schematic structural diagram of a compression/decompression system for neural network data compression results according to a third embodiment of the present invention.
  • 110-controller module 120-model conversion module; 140-data cache module;
  • 130a-prediction unit 130b-transform unit; 130c-quantization unit;
  • 130d-entropy coding unit 130e-depth automatic encoder unit
  • Video coding and decoding technology is a very mature technology.
  • Traditional video coding and decoding technology uses techniques such as prediction, transform and entropy coding. After deep learning, the use of deep neural networks for video encoding and decoding has become a new research hotspot.
  • the applicant found that the neural network data has the same local correlation as the pixels of the video image. Therefore, using the video codec method to encode and decode the neural network model, and then compressing the neural network model, it will be a A viable technical route.
  • a compression apparatus for compressing neural network data includes: a controller module 110, a model conversion module 120, a data encoding module 131, and a data cache module 140.
  • the data cache module 140 is configured to cache the neural network data obtained by the external storage module 200.
  • the model conversion module 120 is coupled to the data cache module 140 for converting neural network data into video-like data.
  • the data encoding module 131 is coupled to the model conversion module 120 for encoding video-like data in a video encoding manner.
  • the controller module 110 is connected to the model conversion module 120, the data encoding module 131, and the data cache module 140, and is used to issue control commands to the three to coordinate the work.
  • the controller module 110 sends a control instruction to perform the following operations:
  • Step S302 sending a data read instruction to the data cache module 140, requesting the neural network data to the external storage module 200, and buffering the neural network data;
  • neural network data refers to data that characterizes the type, structure, weight and neuron characteristics of the neural network.
  • Step S304 sending a data read instruction to the model conversion module 120 to read the neural network data from the data cache module 140;
  • Step S306 sending a data conversion instruction to the model conversion module 120, so that it converts the read neural network data into video-like data;
  • the video-like data herein refers to the original neural network data converted into a series of integer values within a preset range after the conversion by the model conversion module, such as an integer value in the interval [0, 255], Corresponding to the representation of one pixel, these integers together constitute video-like data.
  • the following two examples of specific neural network data are described:
  • the model conversion module can operate as follows:
  • I is an integer in the interval [0, 255], that is, a representation of one pixel;
  • w is the true data value of the neural network data in the range of [-b, a].
  • the model conversion module 120 converts the weights and offsets of the hidden layer neurons corresponding to each feature map in the convolutional neural network data, and integrates the integers obtained by the weight conversion to obtain data of the corresponding video frame.
  • the weight of the hidden layer neurons corresponding to the plurality of feature maps and the data of the similar video frames obtained by the offsets are combined to obtain the video-like data.
  • Step S308 sending a data read instruction to the data cache module 140, requesting the class conversion data to be requested by the model conversion module 120, and performing buffering;
  • Step S310 sending a data read instruction to the data encoding module 131 to read the video-like data from the data cache module 140;
  • Step S312 sending a data encoding instruction to the data encoding module 131, where the encoding instruction includes information of the encoding mode, so that the unit-type video data corresponding to the encoding mode is encoded to obtain a data encoding result;
  • the data encoding module 131 includes: an encoding sub-module for encoding the video data in a video encoding manner to obtain a data encoding result; and an integration sub-module for using the data
  • the coding result is integrated with the coding process information to obtain a compression result.
  • the encoding sub-module further includes: a prediction unit 130a, a transform unit 130b, a quantization unit 130c, an entropy encoding unit 130d, and a depth auto-encoder unit 130e.
  • the prediction unit 130a performs predictive coding using correlation between adjacent video-like data (neural network data).
  • the similarity of the weights of the neural network units corresponding to different feature maps predicts the weight of the neural network, and encodes the difference between the predicted value and the actual value to achieve the purpose of compression.
  • the transform unit 130b performs orthogonal transform coding on the video-like data processed by the prediction unit 130a, thereby achieving the purpose of compression.
  • the quantization unit 130c quantizes the video-like data processed by the transform unit, which can reduce the coding length of the data without degrading the data quality.
  • Q step is the quantization step size
  • FQ(u , v) is the quantized value of F(u,v)
  • round() is the rounding function (the output is the integer closest to the input real number).
  • the entropy coding unit 130d performs rate compression coding on the video-like data processed by the quantization unit by using the statistical characteristics of the data, such as Huffman coding and arithmetic coding.
  • the entropy encoding unit 130d can decode the encoded data by adopting a decoding method corresponding to the encoding method.
  • the coding mode includes: prediction, transform, quantization, and entropy coding.
  • the video-like data sequentially passes through the prediction unit 130a, the transform unit 130b, the quantization unit 130c, and the entropy coding unit 130d.
  • the output of one module is the input of the latter module.
  • a set of video data after being subjected to the prediction unit 130a, becomes a coding result of the difference between the predicted value and the actual value, enters the transform unit 130b, is further compressed by the two-dimensional DCT transform, and then enters the quantization unit 130c so that the code length thereof is shortened.
  • the coding redundancy is reduced by the Huffman coding of the entropy coding unit 130d, thereby achieving a better compression effect.
  • the depth auto-encoder unit 130e encodes the data by using the working principle of the depth auto-encoder.
  • the depth auto-encoder unit 130 trains the video-like data as a training input and an ideal output by minimizing the reconstruction error, so that the output becomes substantially the same data as the input-type video data, so that the depth auto-encoder unit will
  • the hidden layer output is used as the encoding result, and the final output is used as the decoding result. Since the number of neurons in the hidden layer is less than the number of input neurons, the input data can be compressed.
  • the depth autoencoder unit encodes the information of the decoder side of the deep autoencoder and encodes the encoded result for decoding.
  • the coding command may be one of the foregoing coding modes, or may be a combination of the above two coding modes, or may be other video coding modes.
  • the sequence of instructions in the controller module can be determined by a program written by the user, and the neural network data can be compressed by using a compression method that the user desires to use. Users can combine different coding methods by writing related programs.
  • the controller module compiles the relevant program into Order, and decode the instructions into relevant control instructions to achieve control of each module and encoding process.
  • the process of compressing data is essentially a process of encoding data, and the encoding process in the above process can be equivalently regarded as part of a compression process or a compression process.
  • Step S314 sending an integration instruction to the data encoding module 131, so that the data encoding result and the encoding process information are integrated to obtain a compression result;
  • the compression result includes two parts: the first part is the data encoding result of the neural network data, and the second part is the encoding process information.
  • the coding process information may include: information of the coding mode and information of the decoding end of the depth auto-encoder (when the depth auto-encoder unit is used).
  • Step S316 sending a data cache instruction to the data cache module 140, obtaining a compression result from the data encoding module 131, and buffering the compression result;
  • Step S318, sending a data storage instruction to the data cache module 140 to save the compression result to the external storage module 200.
  • the compression result is output to the external storage module, but in other embodiments of the present invention, the compression result may be directly transmitted, or the compression result may be cached in the data encoding module.
  • the 131 or the data cache module 140 is an optional implementation of the present invention.
  • a decompression apparatus for decompressing neural network data compression results is provided.
  • the decompression device for decompressing the neural network data compression result is similar to the compression device of the first embodiment, and includes: a controller module 110, a model conversion module 120, a data decoding module 132, and Data cache module 140.
  • the connection relationship of each module in the decompression device in this embodiment is similar to the connection relationship of the compression device in the first embodiment, and will not be described in detail herein.
  • the data cache module 140 is configured to cache the compression result.
  • the data decoding module 132 is connected to the model conversion module 120 for using a video decoder corresponding to the compression result.
  • the compression result is decoded.
  • the model conversion module 120 is connected to the data decoding module (132) for restoring the decoded video-like data to neural network data.
  • the controller module 110 is connected to the model conversion module 120, the data decoding module 132, and the data cache module 140, and is configured to issue control instructions to the three to coordinate the work.
  • the operations performed by the respective modules in the decompression device of the present embodiment are inverse to the operations performed by the corresponding modules of the compression device of the first embodiment.
  • the controller module 110 sends a control instruction to perform the following operations:
  • Step S602 sending a data read instruction to the data cache module 140, requesting the compression result to the external storage module 200, and buffering the compression result;
  • the compression result here includes two parts: the first part is the data encoding result of the neural network data, and the second part is the encoding process information.
  • Step S604 sending a data read instruction to the data decoding module 132 to read the compression result from the data cache module 140;
  • Step S606 sending a de-integration instruction to the data decoding module 132, so that it decodes the encoding process information and the data compression result from the compression result;
  • Step S608 sending a data read instruction to the data decoding module 132, and reading the encoding process information from the data decoding module 132;
  • Step S610 selecting a decoding instruction according to the encoding process information
  • the encoding process information may include: information of the encoding mode and information of the decoding end of the depth autoencoder (when the depth autoencoder unit is used). Therefore, it is possible to obtain from the encoding process information which encoding mode or combination of encoding modes is used to encode the neural network data, and accordingly generate corresponding decoding instructions.
  • the decoding instruction includes which decoding method is used to decode the data encoding result in the compression result.
  • Step S612 sending a decoding instruction to the data encoding and decoding module 132, so that it decompresses the data compression result in the compression result to obtain video-like data;
  • the data decoding module 132 includes: a de-integration sub-module, configured to de-integrate the compression result to obtain a data encoding result and encoding process information; and a decoding sub-module, configured to extract the encoding mode information from the encoding process information,
  • the data encoding result is decoded by using a decoding method corresponding to the encoding mode information to obtain video-like data.
  • the decoding submodule further includes: a prediction unit 130a, a transformation unit 130b, a quantization unit 130c, and an entropy coding unit 130d.
  • depth autoencoder unit 130e The operations performed by each unit are inverse to the related operations in the encoding module.
  • Entropy encoding unit 130d may perform an entropy decoding process corresponding to the entropy encoding method used when encoding the data, such as a decoding process of Huffman encoding.
  • the quantization unit 130c performs inverse quantization processing on the compression result processed by the entropy coding unit.
  • the following inverse quantization process is used:
  • the transform unit 130b performs inverse orthogonal transform on the data compression result processed by the quantization unit to perform decoding.
  • Equation 2-1 the inverse two-dimensional discrete cosine transform for an N ⁇ N matrix is expressed as:
  • the prediction unit 130a decodes the compression result processed by the transformation unit using the correlation between adjacent data in the original neural network data.
  • the prediction unit 130a may add the predicted value to the correlation difference to restore the original value.
  • the depth auto-encoder unit 130e decodes the neural network data encoded by the deep auto-encoder (as indicated by a broken line in FIG. 5).
  • the depth auto-encoder unit 130e first decodes the decoding end information of the depth auto-encoder used in the encoding from the input data, constructs a decoder using the decoding-end information, and uses the decoder pair.
  • the neural network data encoded by the deep autoencoder is decoded.
  • the encoding instruction may be an encoding method or a combination of two or more encoding methods.
  • the data decoding module 132 sequentially decodes the data by using a corresponding decoding manner.
  • the encoded data sequentially passes through the entropy encoding module 130d, and the quantization module 130c.
  • the transform module 130b and the prediction module 130a the output of the previous module is the input of the latter module.
  • the compressed neural network data of a set of input data encoding and decoding modules is decoded by the entropy encoding module 130d for the decoding process corresponding to the Huffman encoding, and the decoding result is input to the quantization unit 130c for inverse quantization, and then enters the transform unit 130b for reverse.
  • the transform finally enters the prediction unit 130a so that the predicted value is added to the correlation difference, thereby outputting the decoded result.
  • Step S614 sending a data read instruction to the data cache module 140, and causing the data cache module 140 to read the video-like data from the data decoding module 132, and buffering;
  • Step S616 sending a data read instruction to the model conversion module 120, so that the model conversion module 120 reads the video-like data from the data cache module 140;
  • Step S618, sending a data conversion instruction to the model conversion module 120, so that the model conversion module 120 converts the video-like data into neural network data;
  • the model conversion module (120) operates according to the following formula to obtain real data values of the neural network data:
  • w is the true data value of the neural network data in the range [-b, a]
  • I is the video-like data, which is an integer in the interval [0, 255].
  • the model conversion module 120 converts the data of the corresponding video frame in the video-like data, and converts each frame into a hidden layer corresponding to a feature map of the convolutional neural network.
  • the weights and offsets of the neurons integrate the data converted by each frame to obtain the weights and offsets of the hidden layer neurons corresponding to the feature maps of the convolutional neural network.
  • Step S620 sending a data read instruction to the data cache module 140, and causing the data cache module 140 to request the neural network data from the model conversion module 120, and buffering;
  • Step S622 send a data write command to the data cache module 140, so that the data cache module 140 writes the neural network data to the external storage module 200;
  • the decoding result is output to the external storage module, but in other embodiments of the present invention, the decoding result may be directly transmitted, or Cache the decoding result in the model conversion module or the data cache module, which are optional implementations of the present invention.
  • the decompression process is essentially a decoding process, so the decoding process in the above process can be equivalently regarded as part of the decompression process or the decompression process.
  • a compression/decompression system is also provided.
  • the compression/decompression system of the present embodiment integrates the compression device of the first embodiment and the decompression device of the second embodiment. And, the compression device and the decompression device share the controller module 110, the model conversion module 120, and the data cache module 140. And, the data encoding module 131 in the compression device and the data decoding module 132 in the decompression device are integrated into the data encoding/decoding module 130.
  • the data encoding module 131 and the data decoding module share a prediction unit 130a, a transform unit 130b, a quantization unit 130c, an entropy encoding unit 130d, and a depth auto encoder unit 130e.
  • the neural network data is stored in the external storage module 200; then, the controller module 110 sends a control command to the relevant module to control the compression process; the data cache module 140 reads the neural network data from the external storage module and caches; and then, the model
  • the conversion module 120 reads the neural network data from the data cache module 140 and converts it into class video data, and then stores the video data to the data cache module 140; then, the data encoding module 131 reads the class from the data cache module 140.
  • the video data which in turn passes through the processing of the prediction unit 130a, the transform unit 130b, the quantization unit 130c, and the entropy encoding unit 130d completes the compression process; subsequently, the data buffer module 140 reads the compressed data from the data encoding and decoding module 30. Finally, the data cache module 140 writes the compression result to the external storage module.
  • the data to be decompressed is stored in the external storage module 200, and the data is compressed by the prediction, transformation, quantization, and entropy coding processes of the neural network data; in the following process, the controller module 110 sends the control instruction.
  • the cache module 140 reads the data to be decompressed from the external storage module 200.
  • the data decoding module 132 reads the data to be decompressed from the data buffer module 140, and the data is subjected to processing by the entropy encoding unit 130d, the quantization unit 130c, the transform unit 130b, and the prediction unit 130a, and decompressed into video-like data.
  • the data cache module 140 then reads the video-like data from the data encoding and decoding module 30. Subsequently, the data cache module 140 stores the video-like data to the model conversion module 120, which converts it into neural network data. Finally, the data cache module 140 reads the neural network data from the model conversion module 120 and writes it to the external storage module 200.
  • the invention can be applied to the following (including but not limited to) scenarios: data processing, robots, computers, printers, scanners, telephones, tablets, smart terminals, mobile phones, driving recorders, navigators, sensors, cameras, cloud servers , cameras, camcorders, projectors, watches, earphones, mobile storage, wearable devices and other electronic products; aircraft, ships, vehicles and other types of transportation; televisions, air conditioners, microwave ovens, refrigerators, rice cookers, humidifiers, washing machines, Electric lights, gas stoves, range hoods and other household appliances; and including nuclear magnetic resonance instruments, B-ultrasound, electrocardiograph and other medical equipment.
  • the external storage module and the data cache module may also exist in a whole form, that is, the two modules are merged into one module having a storage function;
  • the external storage module and the data cache module may also exist in a form of local storage distributed among the modules.
  • the external storage module can be replaced by a hard disk
  • the external storage module can be replaced by an input/output module for inputting and outputting data.
  • the present invention can realize high-efficiency compression and decompression of a large-scale neural network model, thereby greatly reducing the storage space and transmission pressure of the neural network model, thereby adapting to the trend of expanding the size of the neural network in the era of big data, and can be applied to the nerve.
  • Various fields of network data have strong promotion and application value.

Abstract

A compression/decompression apparatus and system for use with neural network data. Said compression apparatus comprises: a model conversion module (120), which is used for converting neural network data into video-like data, and a data encoding module (131), which is connected to the model conversion module (120) and which is used for encoding the video-type data by using a video encoding method to obtain a compression result. Said decompression apparatus comprises: a data decoding module (132), which is used for obtaining a compression result and which decodes the compression result by using a video decoding method corresponding to the compression result; and a model conversion module (120), which is connected to the data decoding module (132) and which is used for restoring decoded video-type data to neural network data. Said system comprises said compression apparatus and decompression apparatus. The apparatus and system compress/decompress neural network data by virtue of video encoding and decoding methods, thus attaining a high compression ratio, greatly reducing the storage space and transmission burden of neural network models.

Description

用于神经网络数据的压缩/解压缩的装置和系统Apparatus and system for compression/decompression of neural network data 技术领域Technical field
本发明涉及人工神经网络技术领域,尤其涉及一种用于神经网络数据的压缩/解压缩的装置和系统。The present invention relates to the field of artificial neural network technologies, and in particular, to an apparatus and system for compression/decompression of neural network data.
背景技术Background technique
人工神经网络(ANNs),简称神经网络(NNs),是一种模仿动物神经网络行为特征,进行分布式并行信息处理的算法数学模型。这种网络依靠系统的复杂程度,通过调整内部大量节点之间相互连接的关系,达到处理信息的目的。Artificial neural networks (ANNs), referred to as neural networks (NNs), are mathematical models of algorithms that mimic the behavioral characteristics of animal neural networks and perform distributed parallel information processing. This kind of network relies on the complexity of the system to adjust the relationship between a large number of internal nodes to achieve the purpose of processing information.
目前,神经网络在智能控制、机器学习等很多领域均获得长足发展。随着深度学习的兴起,神经网络再次成为人工智能领域研究的热点问题。随着大数据与深度学习的广泛结合,神经网络的规模变得越来越大。谷歌公司(Google)的研究者提出了“大规模深度学习”的理念,希望通过Google作为平台整合全球的信息构建智能计算机系统。At present, neural networks have made great progress in many fields such as intelligent control and machine learning. With the rise of deep learning, neural networks have once again become a hot issue in the field of artificial intelligence. With the broad integration of big data and deep learning, the size of neural networks has become larger and larger. Researchers at Google Inc. have proposed the concept of “large-scale deep learning” and hope to build intelligent computer systems through Google as a platform to integrate global information.
随着深度学习技术的不断发展,当前神经网络的模型规模越来越大,对存储性能以及访存带宽需求越来越高。如果不进行压缩的话,不仅需要大量的存储空间,并且对访存带宽的要求也非常高。压缩神经网络,作为一种新的技术理念,在神经网络的规模日益增加的背景下就表现出充分的必要性。With the continuous development of deep learning technology, the current model of neural networks is getting larger and larger, and the demand for storage performance and memory access bandwidth is getting higher and higher. If you do not compress, not only a large amount of storage space is required, but also the memory bandwidth requirements are very high. Compressed neural networks, as a new technical concept, have shown sufficient necessity in the context of the increasing scale of neural networks.
发明内容Summary of the invention
(一)要解决的技术问题(1) Technical problems to be solved
鉴于上述技术问题,本发明提供了一种用于神经网络数据的压缩/解压缩的装置和系统,以减少存储空间和访存带宽的压力。In view of the above technical problems, the present invention provides an apparatus and system for compression/decompression of neural network data to reduce the pressure of storage space and memory access bandwidth.
(二)技术方案(2) Technical plan
根据本发明的一个方面,提供了一种用于神经网络数据的压缩装置。该压缩装置包括:模型转换模块120,用于将神经网络数据转化为类视频数据;以及数据编码模块131,与所述模型转换模块120相连接,用于采用视频编码的方式对所述类视频数据进行编码,得到压缩结果。According to an aspect of the invention, a compression apparatus for neural network data is provided. The compression device includes: a model conversion module 120 for converting neural network data into video-like data; and a data encoding module 131 connected to the model conversion module 120 for video encoding The data is encoded to obtain a compressed result.
优选地,本发明压缩装置中,所述类视频数据是指经过模型转换模块 的转换后,原来的每个神经网络数据被转换为一系列预设范围内的整数值,对应于一个个像素的表示,这些整数共同所构成的对应视频的数据。Preferably, in the compression device of the present invention, the video-like data refers to a model conversion module. After the conversion, each of the original neural network data is converted into a series of integer values within a preset range, corresponding to the representation of one pixel, which together constitute the corresponding video data.
优选地,本发明压缩装置中,所述模型转换模块120采用以下两种方式其中之一将神经网络数据转化为类视频数据:Preferably, in the compression device of the present invention, the model conversion module 120 converts the neural network data into video-like data in one of two ways:
第一种方式:对于数据范围在[-b,a]内的神经网络数据,模型转换模块120按以下公式操作:The first way: For neural network data with a data range of [-b, a], the model conversion module 120 operates as follows:
Figure PCTCN2016113497-appb-000001
Figure PCTCN2016113497-appb-000001
其中,I是在[0,255]区间内的整数,即一个像素的表示;w是在[-b,a]范围内的神经网络数据的真实数据值;Where I is an integer in the interval [0, 255], that is, a representation of one pixel; w is the true data value of the neural network data in the range [-b, a];
第二种方式:对于卷积神经网络数据,模型转换模块120将卷积神经网络数据中的每一种特征图对应的隐层神经元的权值和偏置进行转换,并将权值和偏置转换后得到的整数整合起来,得到对应视频帧的数据,从多种特征图对应的隐层神经元的权值和偏置得到的类似视频帧的数据结合起来就得到类视频数据。The second way: for convolutional neural network data, the model conversion module 120 converts the weights and offsets of the hidden layer neurons corresponding to each feature map in the convolutional neural network data, and weights and biases The integers obtained after the conversion are integrated to obtain data of the corresponding video frame, and the video data of the video frame is obtained by combining the weights of the hidden layer neurons corresponding to the plurality of feature maps and the data of the similar video frames obtained by the offset.
优选地,本发明压缩装置中,所述数据编码模块131包括:编码子模块,用于采用视频编码的方式对所述类视频数据进行编码,得到数据编码结果;以及整合子模块,用于将数据编码结果和编码过程信息进行整合,得到压缩结果。Preferably, in the compression device of the present invention, the data encoding module 131 includes: an encoding sub-module for encoding the video data in a video encoding manner to obtain a data encoding result; and an integration sub-module for The data encoding result and the encoding process information are integrated to obtain a compressed result.
优选地,本发明压缩装置中,所述编码子模块包括:预测单元130a,用于利用类视频数据相邻数据之间的相关性进行预测编码;变换单元130b,用于对经过预测单元处理后的类视频数据进行正交变换编码,以压缩数据;量化单元130c,用于对经过变换单元处理后的类视频数据进行量化编码,在不降低数据质量的前提下减少数据的编码长度;以及熵编码单元130d,用于利用数据的统计特性对经过量化单元处理后的类视频数据进行码率压缩编码,以减少数据冗余。Preferably, in the compression apparatus of the present invention, the encoding sub-module includes: a prediction unit 130a for performing predictive coding using correlation between video-like data neighboring data; and a transforming unit 130b for processing the predicted unit The video-like data is orthogonally transform-encoded to compress the data; the quantization unit 130c is configured to perform quantization coding on the video-like data processed by the transform unit, and reduce the coding length of the data without degrading the data quality; and entropy The encoding unit 130d is configured to perform rate compression encoding on the video-like data processed by the quantization unit by using statistical characteristics of the data to reduce data redundancy.
优选地,本发明压缩装置中,所述编码子模块包括:深度自动编码器单元130,用于对模型转换模块输出的类视频数据进一步编码,将隐层输出作为编码结果;其中,所述深度自动编码器单元130通过将类视频数据作为训练输入和理想输出利用最小化重构误差的方法进行训练,使输出成 为与输入类视频数据基本相同的数据。Preferably, in the compression device of the present invention, the encoding sub-module includes: a depth auto-encoder unit 130, configured to further encode the video-like data output by the model conversion module, and output the hidden layer as a coding result; wherein the depth The automatic encoder unit 130 trains by using the video-like data as a training input and an ideal output by minimizing the reconstruction error. It is basically the same data as the input class video data.
优选地,本发明压缩装置还包括:数据缓存模块140,用于缓存神经网络数据;控制器模块110,与所述数据缓存模块140、模型转换模块120和数据编码模块131相连接,用于发送控制指令,以执行如下操作:Preferably, the compression device of the present invention further includes: a data cache module 140 for buffering neural network data; and a controller module 110 coupled to the data cache module 140, the model conversion module 120, and the data encoding module 131 for transmitting Control instructions to perform the following operations:
向数据缓存模块140发送数据读取指令,令其向外界请求神经网络数据,并将该神经网络数据进行缓存;Sending a data read command to the data cache module 140, requesting the neural network data to be sent to the outside world, and buffering the neural network data;
向模型转换模块120发送数据读取指令,令其从数据缓存模块140中读取神经网络数据;Sending a data read instruction to the model conversion module 120 to read the neural network data from the data cache module 140;
向模型转换模块120发送数据转换指令,令其将读取的神经网络数据转换为类视频数据;Transmitting a data conversion instruction to the model conversion module 120 to convert the read neural network data into video-like data;
向数据缓存模块140发送数据读取指令,令其向模型转换模块120请求类视频数据,并进行缓存;Sending a data read instruction to the data cache module 140, requesting it to request the class video data to the model conversion module 120, and performing caching;
向数据编码模块131发送数据读取指令,令其从数据缓存模块140读取类视频数据;Sending a data read instruction to the data encoding module 131 to read the video-like data from the data cache module 140;
向数据编码模块131发送数据编码指令,该编码指令中包含编码方式的信息,令其对采用该编码方式对应的单元对类视频数据进行编码,得到数据编码结果;Transmitting, by the data encoding module 131, a data encoding instruction, where the encoding instruction includes information of the encoding mode, and encoding the unit-type video data corresponding to the encoding mode to obtain a data encoding result;
向数据编码模块131发送整合指令,令其将数据编码结果和编码过程信息进行整合,得到压缩结果;Sending an integration instruction to the data encoding module 131, so that the data encoding result and the encoding process information are integrated to obtain a compression result;
向数据缓存模块140发送数据缓存指令,令其从数据编码模块131中获得压缩结果,并将压缩结果进行缓存。The data cache instruction is sent to the data cache module 140 to obtain the compression result from the data encoding module 131, and the compression result is cached.
根据本发明的另一个方面,还提供了一种用于神经网络数据的解压缩装置。该解压缩装置包括:数据解码模块132,用于得到压缩结果,采用与压缩结果对应的视频解码方式对所述压缩结果进行解码;以及模型转换模块120,与所述数据解码模块132相连接,用于将解码后的类视频数据还原为神经网络数据。According to another aspect of the present invention, a decompression apparatus for neural network data is also provided. The decompression device includes: a data decoding module 132, configured to obtain a compression result, and decode the compression result by using a video decoding manner corresponding to the compression result; and a model conversion module 120 connected to the data decoding module 132, Used to restore the decoded class video data to neural network data.
优选地,本发明解压缩装置中,所述数据解码模块132包括:解整合子模块,用于将压缩结果进行解整合,得到数据编码结果和编码过程信息;以及解码子模块,用于从所述编码过程信息中提取编码方式信息,利用该编码方式信息对应的解码方式对所述数据编码结果进行解码,得到类视频 数据。Preferably, in the decompression device of the present invention, the data decoding module 132 includes: a de-integration sub-module for de-integrating the compression result to obtain a data encoding result and encoding process information; and a decoding sub-module for The coding mode information is extracted from the coding process information, and the data coding result is decoded by using a decoding mode corresponding to the coding mode information to obtain a class video. data.
优选地,本发明解压缩装置中,所述模型转换模块采用以下两种方式其中之一将解码后的类视频数据还原为神经网络数据:Preferably, in the decompression device of the present invention, the model conversion module restores the decoded video-like data to neural network data in one of two ways:
第一种方式:对于数据范围在[-b,a]内的神经网络数据,模型转换模块120按以下公式操作,得到神经网络数据的真实数据值:The first way: for the neural network data with the data range in [-b, a], the model conversion module 120 operates according to the following formula to obtain the true data values of the neural network data:
Figure PCTCN2016113497-appb-000002
Figure PCTCN2016113497-appb-000002
其中,w是在[-b,a]范围内的神经网络数据的真实数据值,I为类视频数据,其是在[0,255]区间内的整数。Where w is the true data value of the neural network data in the range [-b, a], and I is the video-like data, which is an integer in the interval [0, 255].
第二种方式:对于卷积神经网络数据,模型转换模块120将类视频数据中对应视频帧的数据进行转换,每一帧转换为卷积神经网络的一种特征图对应的隐层神经元的权值和偏置,将各帧转换的数据整合起来,得到卷积神经网络各特征图对应的隐层神经元的权值和偏置。The second way: for convolutional neural network data, the model conversion module 120 converts the data of the corresponding video frame in the video-like data, and converts each frame into a hidden layer neuron corresponding to a feature map of the convolutional neural network. Weight and offset, the data converted by each frame is integrated to obtain the weight and offset of the hidden layer neurons corresponding to each feature map of the convolutional neural network.
优选地,本发明解压缩装置还包括:数据缓存模块140,用于缓存压缩结果;控制器模块110,与所述模型转换模块120、数据解码模块132和数据缓存模块140连接,用于向三者下达控制指令,以执行以下操作:Preferably, the decompression device of the present invention further includes: a data cache module 140 for buffering the compression result; and a controller module 110, coupled to the model conversion module 120, the data decoding module 132, and the data cache module 140, for Release the control instructions to do the following:
向数据缓存模块140发送数据读取指令,令其向外部请求压缩结果,并将该压缩结果缓存;Sending a data read instruction to the data cache module 140, requesting the external result to be compressed, and buffering the compressed result;
向数据解码模块132发送数据读取指令,令其从数据缓存模块140中读取压缩结果;Sending a data read instruction to the data decoding module 132 to read the compressed result from the data cache module 140;
向数据解码模块132发送解整合指令,令其从所述压缩结果中解码出编码过程信息和数据压缩结果;Sending a de-integration instruction to the data decoding module 132 to decode the encoding process information and the data compression result from the compression result;
向数据解码模块132发送数据读取指令,从数据解码模块132读取编码过程信息;Sending a data read instruction to the data decoding module 132, and reading the encoding process information from the data decoding module 132;
根据编码过程信息选择解码指令;Selecting a decoding instruction according to the encoding process information;
向数据编码解码模块132发送解码指令,令其将压缩结果中的数据压缩结果进行解压缩,得到类视频数据;Sending a decoding instruction to the data encoding and decoding module 132, so that it decompresses the data compression result in the compression result to obtain video-like data;
向数据缓存模块140发送数据读取指令,令其从数据解码模块132读取类视频数据,并缓存;Sending a data read instruction to the data cache module 140, causing it to read the video-like data from the data decoding module 132, and buffering;
向模型转换模块120发送数据读取指令,令其从数据缓存模块140 中读取类视频数据;Sending a data read instruction to the model conversion module 120 to cause it to pass from the data cache module 140 Reading class video data;
向模型转换模块120发送数据转换指令,令其将类视频数据转换为神经网络数据。A data conversion instruction is sent to the model conversion module 120 to convert the video-like data into neural network data.
根据本发明的再一个方面,还提供了一种用于神经网络数据的压缩/解压缩的系统。该系统包括:压缩装置,为以上所述的压缩装置;以及解压缩装置,为以上所述的解压缩装置;其中,所述压缩装置和解压缩装置共用数据缓存模块140、控制器模块110和模型转换模块120。According to still another aspect of the present invention, a system for compression/decompression of neural network data is also provided. The system includes: a compression device, which is the compression device described above; and a decompression device, which is the decompression device described above; wherein the compression device and the decompression device share a data cache module 140, a controller module 110, and a model Conversion module 120.
(三)有益效果(3) Beneficial effects
从上述技术方案可以看出,本发明用于神经网络数据的压缩/解压缩的装置和系统至少具有以下有益效果其中之一:It can be seen from the above technical solutions that the apparatus and system for compressing/decompressing neural network data of the present invention have at least one of the following beneficial effects:
(1)借用视频编解码方法对神经网络数据进行压缩/解压缩,达到较高的压缩率,大幅减少了神经网络模型的存储空间和传输压力;(1) Using the video codec method to compress/decompress the neural network data to achieve a higher compression ratio, which greatly reduces the storage space and transmission pressure of the neural network model;
(2)在数据压缩/解压缩模块中,集成了多种与视频编解码方法类似的算法,能够大幅度加速压缩/解压缩过程;(2) In the data compression/decompression module, a variety of algorithms similar to the video codec method are integrated, which can greatly accelerate the compression/decompression process;
(3)具有专用的数据缓存模块和控制器模块来服务于多种视频编解码专用模块,支持多种视频编解码技术的组合,极大地增加了装置的灵活性和实用性,同时支持新兴的运用深度神经网络进行压缩解压的技术。(3) It has a dedicated data buffer module and controller module to serve a variety of video codec-dedicated modules, supporting a combination of multiple video codec technologies, greatly increasing the flexibility and practicability of the device, while supporting emerging A technique of compressing and decompressing using a deep neural network.
综上,本发明可以实现大规模神经网络模型的高效压缩与解压,从而大幅减少神经网络模型的存储空间和传输压力,从而适应大数据时代神经网络规模不断扩大的趋势。In summary, the present invention can achieve high-efficiency compression and decompression of a large-scale neural network model, thereby greatly reducing the storage space and transmission pressure of the neural network model, thereby adapting to the trend of expanding the size of the neural network in the era of big data.
附图说明DRAWINGS
图1为根据本发明第一实施例用于压缩神经网络数据的压缩装置的结构示意图。1 is a block diagram showing the structure of a compression apparatus for compressing neural network data according to a first embodiment of the present invention.
图2为图1所示压缩装置中数据编码模块的结构示意图。2 is a schematic structural view of a data encoding module in the compression device shown in FIG. 1.
图3为图1所示压缩装置中控制器模块发送控制指令,以执行操作的流程图。3 is a flow chart of a controller module in FIG. 1 transmitting a control command to perform an operation.
图4为本发明第二实施例用于解压缩神经网络数据压缩结果的解压缩装置的结构示意图。4 is a schematic structural diagram of a decompression apparatus for decompressing a neural network data compression result according to a second embodiment of the present invention.
图5为图4所示解压缩装置中数据解码模块的结构示意图。FIG. 5 is a schematic structural diagram of a data decoding module in the decompression device shown in FIG. 4.
图6为图4所示解压缩装置中控制器模块发送控制指令,以执行操作 的流程图。6 is a controller module of the decompression device shown in FIG. 4 transmitting a control command to perform an operation Flow chart.
图7为本发明第三实施例用于神经网络数据压缩结果的压缩/解压缩系统的结构示意图。FIG. 7 is a schematic structural diagram of a compression/decompression system for neural network data compression results according to a third embodiment of the present invention.
【本发明主要元件符号说明】[Description of main components of the present invention]
110-控制器模块;    120-模型转换模块;    140-数据缓存模块;110-controller module; 120-model conversion module; 140-data cache module;
130-数据编/解码模块;130-data encoding/decoding module;
131-数据编码模块;   132-数据解码模块;131-data encoding module; 132-data decoding module;
130a-预测单元;      130b-变换单元;     130c-量化单元;130a-prediction unit; 130b-transform unit; 130c-quantization unit;
130d-熵编码单元;    130e-深度自动编码器单元;130d-entropy coding unit; 130e-depth automatic encoder unit;
200-外部存储模块。200 - External storage module.
具体实施方式detailed description
视频编码解码技术是一项十分成熟的技术,传统的视频编码解码技术采用预测、变换和熵编码等技术,深度学习兴起后,利用深度神经网络进行视频编解码也成为新的研究热点。Video coding and decoding technology is a very mature technology. Traditional video coding and decoding technology uses techniques such as prediction, transform and entropy coding. After deep learning, the use of deep neural networks for video encoding and decoding has become a new research hotspot.
申请人经过认真地研究和比较后发现:神经网络数据与视频图像的像素一样具有局部相关性,因此运用视频编解码的方法来进行神经网络模型的编解码,进而压缩神经网络模型,将是一种可行的技术路线。After careful research and comparison, the applicant found that the neural network data has the same local correlation as the pixels of the video image. Therefore, using the video codec method to encode and decode the neural network model, and then compressing the neural network model, it will be a A viable technical route.
为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明进一步详细说明。The present invention will be further described in detail below with reference to the specific embodiments of the invention.
一、压缩装置实施例First, the compression device embodiment
在本发明的第一个示例性实施例中,提供了一种用于压缩神经网络数据的压缩装置。请参照图1,本实施例用于压缩神经网络数据的压缩装置包括:控制器模块110、模型转换模块120、数据编码模块131和数据缓存模块140。In a first exemplary embodiment of the present invention, a compression apparatus for compressing neural network data is provided. Referring to FIG. 1, the compression apparatus for compressing neural network data in this embodiment includes: a controller module 110, a model conversion module 120, a data encoding module 131, and a data cache module 140.
本实施例中,数据缓存模块140用于缓存由外部存储模块200获得的神经网络数据。模型转换模块120与数据缓存模块140相连接,用于将神经网络数据转化为类视频数据。数据编码模块131与模型转换模块120相连接,用于采用视频编码的方式对类视频数据进行编码。控制器模块110与模型转换模块120、数据编码模块131和数据缓存模块140连接,用于向三者下达控制指令,令其协调工作。 In this embodiment, the data cache module 140 is configured to cache the neural network data obtained by the external storage module 200. The model conversion module 120 is coupled to the data cache module 140 for converting neural network data into video-like data. The data encoding module 131 is coupled to the model conversion module 120 for encoding video-like data in a video encoding manner. The controller module 110 is connected to the model conversion module 120, the data encoding module 131, and the data cache module 140, and is used to issue control commands to the three to coordinate the work.
请参照图3,本实施例中,控制器模块110发送控制指令,以执行如下操作:Referring to FIG. 3, in this embodiment, the controller module 110 sends a control instruction to perform the following operations:
步骤S302,向数据缓存模块140发送数据读取指令,令其向外部存储模块200请求神经网络数据,并将该神经网络数据进行缓存;Step S302, sending a data read instruction to the data cache module 140, requesting the neural network data to the external storage module 200, and buffering the neural network data;
其中,神经网络数据是指表征神经网络的种类、结构、权值和神经元特征的数据。Among them, neural network data refers to data that characterizes the type, structure, weight and neuron characteristics of the neural network.
步骤S304,向模型转换模块120发送数据读取指令,令其从数据缓存模块140中读取神经网络数据;Step S304, sending a data read instruction to the model conversion module 120 to read the neural network data from the data cache module 140;
步骤S306,向模型转换模块120发送数据转换指令,令其将读取的神经网络数据转换为类视频数据;Step S306, sending a data conversion instruction to the model conversion module 120, so that it converts the read neural network data into video-like data;
其中,此处的类视频数据是指经过模型转换模块的转换后,原来的每个神经网络数据被转换为一系列预设范围内的整数值,如[0,255]区间内的整数值,对应于一个个像素的表示,这些整数共同所构成的类似视频的数据。以下以两种特定的神经网络数据为例进行说明:Wherein, the video-like data herein refers to the original neural network data converted into a series of integer values within a preset range after the conversion by the model conversion module, such as an integer value in the interval [0, 255], Corresponding to the representation of one pixel, these integers together constitute video-like data. The following two examples of specific neural network data are described:
(1)对于数据范围在[-b,a](a和b均为正整数)内的神经网络数据:(1) For neural network data with data ranges in [-b, a] (both a and b are positive integers):
将神经网络数据转换为0~255的整数(此时对应于8bpp),模型转换模块可以按以下公式操作:Converting the neural network data to an integer from 0 to 255 (corresponding to 8bpp at this time), the model conversion module can operate as follows:
Figure PCTCN2016113497-appb-000003
Figure PCTCN2016113497-appb-000003
其中,I是在[0,255]区间内的整数,即一个像素的表示;w是在[-b,a]范围内的神经网络数据的真实数据值。Where I is an integer in the interval [0, 255], that is, a representation of one pixel; w is the true data value of the neural network data in the range of [-b, a].
(2)对于卷积神经网络数据(2) For convolutional neural network data
模型转换模块120将卷积神经网络数据中的每一种特征图对应的隐层神经元的权值和偏置进行转换,并将权值转换后得到的整数整合起来,得到对应视频帧的数据,多种特征图对应的隐层神经元的权值和偏置得到的类似视频帧的数据结合起来就得到类视频数据。The model conversion module 120 converts the weights and offsets of the hidden layer neurons corresponding to each feature map in the convolutional neural network data, and integrates the integers obtained by the weight conversion to obtain data of the corresponding video frame. The weight of the hidden layer neurons corresponding to the plurality of feature maps and the data of the similar video frames obtained by the offsets are combined to obtain the video-like data.
步骤S308,向数据缓存模块140发送数据读取指令,令其向模型转换模块120请求类视频数据,并进行缓存;Step S308, sending a data read instruction to the data cache module 140, requesting the class conversion data to be requested by the model conversion module 120, and performing buffering;
步骤S310,向数据编码模块131发送数据读取指令,令其从数据缓存模块140读取类视频数据; Step S310, sending a data read instruction to the data encoding module 131 to read the video-like data from the data cache module 140;
步骤S312,向数据编码模块131发送数据编码指令,该编码指令中包含编码方式的信息,令其对采用该编码方式对应的单元对类视频数据进行编码,得到数据编码结果;Step S312, sending a data encoding instruction to the data encoding module 131, where the encoding instruction includes information of the encoding mode, so that the unit-type video data corresponding to the encoding mode is encoded to obtain a data encoding result;
请参照图2,本实施例中,数据编码模块131包括:编码子模块,用于采用视频编码的方式对所述类视频数据进行编码,得到数据编码结果;以及整合子模块,用于将数据编码结果和编码过程信息进行整合,得到压缩结果。其中,编码子模块进一步包括:预测单元130a,变换单元130b,量化单元130c,熵编码单元130d和深度自动编码器单元130e。Referring to FIG. 2, in this embodiment, the data encoding module 131 includes: an encoding sub-module for encoding the video data in a video encoding manner to obtain a data encoding result; and an integration sub-module for using the data The coding result is integrated with the coding process information to obtain a compression result. The encoding sub-module further includes: a prediction unit 130a, a transform unit 130b, a quantization unit 130c, an entropy encoding unit 130d, and a depth auto-encoder unit 130e.
其中,在第一种编码方式中:Among them, in the first coding method:
(1)预测单元130a利用类视频数据(神经网络数据)相邻数据之间的相关性进行预测编码。(1) The prediction unit 130a performs predictive coding using correlation between adjacent video-like data (neural network data).
例如,不同特征图对应的神经网络单元的权值的相似性,对神经网络权值进行预测,将预测值与实际值之差进行编码,以达到压缩目的。For example, the similarity of the weights of the neural network units corresponding to different feature maps predicts the weight of the neural network, and encodes the difference between the predicted value and the actual value to achieve the purpose of compression.
(2)变换单元130b对经过预测单元130a处理后的类视频数据进行正交变换编码,从而达到压缩的目的。(2) The transform unit 130b performs orthogonal transform coding on the video-like data processed by the prediction unit 130a, thereby achieving the purpose of compression.
例如,对类视频数据进行二维离散余弦变换(DCT)时,设f(m,n)为N×N的离散类视频数据,则二维DCT变换表示为:For example, when performing two-dimensional discrete cosine transform (DCT) on video-like data, let f(m, n) be N×N discrete video data, then the two-dimensional DCT transform is expressed as:
Figure PCTCN2016113497-appb-000004
Figure PCTCN2016113497-appb-000004
其中,u,v=0,1,……,N-1,当u=0(v=0)时,
Figure PCTCN2016113497-appb-000005
Where u, v=0, 1, ..., N-1, when u=0 (v=0),
Figure PCTCN2016113497-appb-000005
当u=1,2,……,N-1(v=1,2,……,N-1)时,c(u)=1(c(v)=1);f(m,n)为编码前在矩阵中位置为(m,n)的值,F(u,v)为编码后在矩阵中位置为(u,v)的值。When u=1, 2, ..., N-1 (v = 1, 2, ..., N-1), c(u) = 1 (c(v) = 1); f(m, n) For the value of (m, n) in the matrix before encoding, F(u, v) is the value of (u, v) in the matrix after encoding.
(3)量化单元130c对经过变换单元处理后的类视频数据进行量化编码,其可以在不降低数据质量的前提下减少数据的编码长度。(3) The quantization unit 130c quantizes the video-like data processed by the transform unit, which can reduce the coding length of the data without degrading the data quality.
例如,采用标量量化技术时,对数据采用如下处理:For example, when using scalar quantization techniques, the data is processed as follows:
Figure PCTCN2016113497-appb-000006
Figure PCTCN2016113497-appb-000006
其中,F(u,v)为经过变换单元处理的类视频数据中的任意位置的数据(u,v=0,1,……,N-1),Qstep为量化步长,FQ(u,v)为F(u,v)的量化值,round()为取整函数(其输出为与输入实数最接近的整数)。Where F(u,v) is the data of any position in the video-like data processed by the transform unit (u, v=0, 1, ..., N-1), Q step is the quantization step size, FQ(u , v) is the quantized value of F(u,v), and round() is the rounding function (the output is the integer closest to the input real number).
(4)熵编码单元130d利用数据的统计特性对经过量化单元处理后的类视频数据进行码率压缩编码,如采用哈夫曼编码和算数编码等。(4) The entropy coding unit 130d performs rate compression coding on the video-like data processed by the quantization unit by using the statistical characteristics of the data, such as Huffman coding and arithmetic coding.
例如在进行哈夫曼编码时,对出现概率大的符号分配短字长的二进制码,对出现概率小的符号分配长字长的二进制码,从而得到平均码长最短的码。通过采用对应编码方式的解码方式,熵编码单元130d可以对编码后的数据进行解码。For example, when Huffman coding is performed, a binary code of a short word length is assigned to a symbol having a high probability of occurrence, and a binary code of a long word length is assigned to a symbol having a small probability of occurrence, thereby obtaining a code having the shortest average code length. The entropy encoding unit 130d can decode the encoded data by adopting a decoding method corresponding to the encoding method.
总的来说,本种编码方式包含:预测、变换、量化和熵编码,在数据编码模块131中,类视频数据依次经过预测单元130a、变换单元130b、量化单元130c和熵编码单元130d,前一个模块的输出为后一个模块的输入。例如一组类视频数据,经过预测单元130a后变为预测值与实际值的差的编码结果,进入变换单元130b后经过二维DCT变换被进一步压缩,再进入量化单元130c使得其编码长度被缩短,最后通过熵编码单元130d的哈夫曼编码减少编码冗余,从而达到较好的压缩效果。In general, the coding mode includes: prediction, transform, quantization, and entropy coding. In the data coding module 131, the video-like data sequentially passes through the prediction unit 130a, the transform unit 130b, the quantization unit 130c, and the entropy coding unit 130d. The output of one module is the input of the latter module. For example, a set of video data, after being subjected to the prediction unit 130a, becomes a coding result of the difference between the predicted value and the actual value, enters the transform unit 130b, is further compressed by the two-dimensional DCT transform, and then enters the quantization unit 130c so that the code length thereof is shortened. Finally, the coding redundancy is reduced by the Huffman coding of the entropy coding unit 130d, thereby achieving a better compression effect.
其中,在第二种编码方式中,深度自动编码器单元130e利用深度自动编码器的工作原理对数据进行编码。Wherein, in the second coding mode, the depth auto-encoder unit 130e encodes the data by using the working principle of the depth auto-encoder.
其中,深度自动编码器单元130通过将类视频数据作为训练输入和理想输出利用最小化重构误差的方法进行训练,使输出成为与输入类视频数据基本相同的数据,从而深度自动编码器单元将隐层输出作为编码结果,将最终输出作为解码结果,由于隐层的神经元数目少于输入神经元数目,因此可以对输入的数据进行压缩。需要注意的是,深度自动编码器单元会将深度自动编码器的解码器端的信息进行编码并编入编码结果,供解码使用。Wherein, the depth auto-encoder unit 130 trains the video-like data as a training input and an ideal output by minimizing the reconstruction error, so that the output becomes substantially the same data as the input-type video data, so that the depth auto-encoder unit will The hidden layer output is used as the encoding result, and the final output is used as the decoding result. Since the number of neurons in the hidden layer is less than the number of input neurons, the input data can be compressed. It should be noted that the depth autoencoder unit encodes the information of the decoder side of the deep autoencoder and encodes the encoded result for decoding.
需要说明的是,所述编码指令中可以是上述的一种编码方式,也可以是上述两种编码方式组合,也可以采用其他的视频编码方式。It should be noted that the coding command may be one of the foregoing coding modes, or may be a combination of the above two coding modes, or may be other video coding modes.
具体来讲,控制器模块中的指令序列可以由用户编写的程序决定,可以采用用户希望采用的压缩方式对神经网络数据进行压缩。用户通过编写相关程序,将不同的编码方式进行组合。控制器模块将相关程序编译为指 令,并将指令译码为相关控制指令,实现对各模块及编码过程的控制。Specifically, the sequence of instructions in the controller module can be determined by a program written by the user, and the neural network data can be compressed by using a compression method that the user desires to use. Users can combine different coding methods by writing related programs. The controller module compiles the relevant program into Order, and decode the instructions into relevant control instructions to achieve control of each module and encoding process.
关于编码的具体过程,可以参照视频编码的相关说明,此处不再进一步详细说明。For the specific process of encoding, reference may be made to the related description of the video coding, and will not be further described in detail herein.
需要进一步说明的是,压缩数据的过程实质上是对数据进行编码的过程,以上过程中的编码过程可等同视为压缩过程或压缩过程的一部分。It should be further noted that the process of compressing data is essentially a process of encoding data, and the encoding process in the above process can be equivalently regarded as part of a compression process or a compression process.
步骤S314,向数据编码模块131发送整合指令,令其将数据编码结果和编码过程信息进行整合,得到压缩结果;Step S314, sending an integration instruction to the data encoding module 131, so that the data encoding result and the encoding process information are integrated to obtain a compression result;
在此步骤之后,压缩结果中包括两部分内容:第一部分为对神经网络数据的数据编码结果,第二部分是编码过程信息。其中,该编码过程信息中可以包含:编码方式的信息、深度自动编码器解码端信息(采用深度自动编码器单元时)。After this step, the compression result includes two parts: the first part is the data encoding result of the neural network data, and the second part is the encoding process information. The coding process information may include: information of the coding mode and information of the decoding end of the depth auto-encoder (when the depth auto-encoder unit is used).
步骤S316,向数据缓存模块140发送数据缓存指令,令其从数据编码模块131中获得压缩结果,并将压缩结果进行缓存;Step S316, sending a data cache instruction to the data cache module 140, obtaining a compression result from the data encoding module 131, and buffering the compression result;
步骤S318,向数据缓存模块140发送数据存储指令,令其将压缩结果存至外部存储模块200。Step S318, sending a data storage instruction to the data cache module 140 to save the compression result to the external storage module 200.
需要说明的是,虽然本实施例中是将压缩结果输出到外部存储模块,但在本发明其他实施例中,还可以是将该压缩结果直接传输出去,或者是将压缩结果缓存于数据编码模块131或者数据缓存模块140中,均是本发明可选的实现方式。It should be noted that, in this embodiment, the compression result is output to the external storage module, but in other embodiments of the present invention, the compression result may be directly transmitted, or the compression result may be cached in the data encoding module. The 131 or the data cache module 140 is an optional implementation of the present invention.
至此,本实施例用于压缩神经网络数据的压缩装置介绍完毕。So far, the compression device for compressing neural network data in this embodiment has been introduced.
二、解压缩装置实施例Second, the decompression device embodiment
在本发明的第二个示例性实施例中,提供了一种用于解压缩神经网络数据压缩结果的解压缩装置。In a second exemplary embodiment of the present invention, a decompression apparatus for decompressing neural network data compression results is provided.
请参照图4,本实施例用于解压缩神经网络数据压缩结果的解压缩装置与第一实施例的压缩装置的结构类似,包括:控制器模块110、模型转换模块120、数据解码模块132和数据缓存模块140。本实施例解压缩装置中各模块的连接关系,与第一实施例中压缩装置的连接关系类似,此处不再详细说明。Referring to FIG. 4, the decompression device for decompressing the neural network data compression result is similar to the compression device of the first embodiment, and includes: a controller module 110, a model conversion module 120, a data decoding module 132, and Data cache module 140. The connection relationship of each module in the decompression device in this embodiment is similar to the connection relationship of the compression device in the first embodiment, and will not be described in detail herein.
本实施例中,数据缓存模块140用于缓存压缩结果。数据解码模块132与所述模型转换模块120相连接,用于采用与压缩结果对应的视频解码方 式对所述压缩结果进行解码。模型转换模块120与所述数据解码模块(132)相连接,用于解码后的类视频数据还原为神经网络数据。控制器模块110与模型转换模块120、数据解码模块132和数据缓存模块140连接,用于向三者下达控制指令,令其协调工作。In this embodiment, the data cache module 140 is configured to cache the compression result. The data decoding module 132 is connected to the model conversion module 120 for using a video decoder corresponding to the compression result. The compression result is decoded. The model conversion module 120 is connected to the data decoding module (132) for restoring the decoded video-like data to neural network data. The controller module 110 is connected to the model conversion module 120, the data decoding module 132, and the data cache module 140, and is configured to issue control instructions to the three to coordinate the work.
与第一实施例压缩装置不同的是,本实施例解压缩装置中各个模块执行的操作与第一实施例压缩装置相应模块执行的操作相逆。具体而言,请参照图5,本实施例中,控制器模块110发送控制指令,以执行如下操作:Different from the compression device of the first embodiment, the operations performed by the respective modules in the decompression device of the present embodiment are inverse to the operations performed by the corresponding modules of the compression device of the first embodiment. Specifically, referring to FIG. 5, in this embodiment, the controller module 110 sends a control instruction to perform the following operations:
步骤S602,向数据缓存模块140发送数据读取指令,令其向外部存储模块200请求压缩结果,并将该压缩结果缓存;Step S602, sending a data read instruction to the data cache module 140, requesting the compression result to the external storage module 200, and buffering the compression result;
如上所述,此处压缩结果中包括两部分内容:第一部分为对神经网络数据的数据编码结果,第二部分是编码过程信息。As described above, the compression result here includes two parts: the first part is the data encoding result of the neural network data, and the second part is the encoding process information.
步骤S604,向数据解码模块132发送数据读取指令,令其从数据缓存模块140中读取压缩结果;Step S604, sending a data read instruction to the data decoding module 132 to read the compression result from the data cache module 140;
步骤S606,向数据解码模块132发送解整合指令,令其从压缩结果中解码出编码过程信息和数据压缩结果;Step S606, sending a de-integration instruction to the data decoding module 132, so that it decodes the encoding process information and the data compression result from the compression result;
步骤S608,向数据解码模块132发送数据读取指令,从数据解码模块132读取编码过程信息;Step S608, sending a data read instruction to the data decoding module 132, and reading the encoding process information from the data decoding module 132;
步骤S610,根据编码过程信息选择解码指令;Step S610, selecting a decoding instruction according to the encoding process information;
如上所述,编码过程信息中可以包含:编码方式的信息、深度自动编码器解码端信息(采用深度自动编码器单元时)。因此,可以从编码过程信息中得到采用的何种编码方式或编码方式的组合对神经网络数据进行的编码,并据此产生相应的解码指令。该解码指令中包含采用何种解码方式对压缩结果中的数据编码结果进行解码。As described above, the encoding process information may include: information of the encoding mode and information of the decoding end of the depth autoencoder (when the depth autoencoder unit is used). Therefore, it is possible to obtain from the encoding process information which encoding mode or combination of encoding modes is used to encode the neural network data, and accordingly generate corresponding decoding instructions. The decoding instruction includes which decoding method is used to decode the data encoding result in the compression result.
步骤S612,向数据编码解码模块132发送解码指令,令其将压缩结果中的数据压缩结果进行解压缩,得到类视频数据;Step S612, sending a decoding instruction to the data encoding and decoding module 132, so that it decompresses the data compression result in the compression result to obtain video-like data;
其中,数据解码模块132包括:解整合子模块,用于将压缩结果进行解整合,得到数据编码结果和编码过程信息;以及解码子模块,用于从所述编码过程信息中提取编码方式信息,利用该编码方式信息对应的解码方式对所述数据编码结果进行解码,得到类视频数据。而解码子模块进一步包括:预测单元130a,变换单元130b,量化单元130c,熵编码单元130d 和深度自动编码器单元130e。各个单元执行的操作与编码模块中的相关操作相逆。The data decoding module 132 includes: a de-integration sub-module, configured to de-integrate the compression result to obtain a data encoding result and encoding process information; and a decoding sub-module, configured to extract the encoding mode information from the encoding process information, The data encoding result is decoded by using a decoding method corresponding to the encoding mode information to obtain video-like data. The decoding submodule further includes: a prediction unit 130a, a transformation unit 130b, a quantization unit 130c, and an entropy coding unit 130d. And depth autoencoder unit 130e. The operations performed by each unit are inverse to the related operations in the encoding module.
其中,在第一种解码方式中(如图5中实线所示):Among them, in the first decoding mode (as shown by the solid line in Figure 5):
(1)熵编码单元130d可以对压缩结果进行编码数据时所使用的熵编码方法对应的熵解码过程,如进行哈夫曼编码的解码过程。(1) Entropy encoding unit 130d may perform an entropy decoding process corresponding to the entropy encoding method used when encoding the data, such as a decoding process of Huffman encoding.
(2)量化单元130c将经过熵编码单元处理的压缩结果进行反量化处理。如对于经过标量量化技术处理的数据,采用以下反量化过程:(2) The quantization unit 130c performs inverse quantization processing on the compression result processed by the entropy coding unit. For data processed by scalar quantization techniques, the following inverse quantization process is used:
F(u,v)=FQ(u,v)·Qstep       (3-2)F(u,v)=FQ(u,v)·Q step (3-2)
所有的参数定义与公式3-1相同,此处不再重述。All parameter definitions are the same as Equation 3-1 and will not be repeated here.
(3)变换单元130b对经过量化单元处理的数据压缩结果进行反正交变换进行解码。(3) The transform unit 130b performs inverse orthogonal transform on the data compression result processed by the quantization unit to perform decoding.
例如,与公式2-1相逆,对于N×N矩阵的二维离散余弦逆变换表示为:For example, inverse to Equation 2-1, the inverse two-dimensional discrete cosine transform for an N × N matrix is expressed as:
Figure PCTCN2016113497-appb-000007
Figure PCTCN2016113497-appb-000007
所有的参数定义与公式2-1相同,此处不再重述。All parameter definitions are the same as Equation 2-1 and will not be repeated here.
(4)预测单元130a利用原神经网络数据中相邻数据之间的相关性对经过变换单元处理的压缩结果进行解码。(4) The prediction unit 130a decodes the compression result processed by the transformation unit using the correlation between adjacent data in the original neural network data.
例如:预测单元130a可以将预测值与相关差值相加,以恢复原值。For example, the prediction unit 130a may add the predicted value to the correlation difference to restore the original value.
其中,在第二种解码方式中,深度自动编码器单元130e对经过深度自动编码器编码的神经网络数据进行解码(如图5中虚线所示)。Wherein, in the second decoding mode, the depth auto-encoder unit 130e decodes the neural network data encoded by the deep auto-encoder (as indicated by a broken line in FIG. 5).
例如,在解码过程中,深度自动编码器单元130e首先从输入数据中解码出编码时所使用的深度自动编码器的解码端信息,用这些解码端信息构造一个解码器,再利用该解码器对经过深度自动编码器编码的神经网络数据进行解码。For example, in the decoding process, the depth auto-encoder unit 130e first decodes the decoding end information of the depth auto-encoder used in the encoding from the input data, constructs a decoder using the decoding-end information, and uses the decoder pair. The neural network data encoded by the deep autoencoder is decoded.
在第一实施例中,编码指令中可以是一种编码方式,也可以是两种或两种以上的编码方式组合。与第一实施例对应,如果输入至数据解码模块132中的数据采用的是两种或两种以上的编码方式,则数据解码模块132依次采用相应的解码方式对数据进行解码。In the first embodiment, the encoding instruction may be an encoding method or a combination of two or more encoding methods. Corresponding to the first embodiment, if the data input to the data decoding module 132 adopts two or more encoding modes, the data decoding module 132 sequentially decodes the data by using a corresponding decoding manner.
例如:当输入数据解码模块132的数据所用的编码方法为预测、变换、量化和哈夫曼编码时,编码数据依次经过熵编码模块130d,量化模块130c, 变换模块130b和预测模块130a,前一个模块的输出为后一个模块的输入。例如一组输入数据编码解码模块的经过压缩的神经网络数据,经过熵编码模块130d进行哈夫曼编码对应的解码过程进行解码,解码结果进入量化单元130c进行反量化,接着进入变换单元130b进行反变换,最后进入预测单元130a使得预测值与相关差值相加,从而输出解码结果。For example, when the encoding method used for inputting the data of the data decoding module 132 is prediction, transform, quantization, and Huffman encoding, the encoded data sequentially passes through the entropy encoding module 130d, and the quantization module 130c. The transform module 130b and the prediction module 130a, the output of the previous module is the input of the latter module. For example, the compressed neural network data of a set of input data encoding and decoding modules is decoded by the entropy encoding module 130d for the decoding process corresponding to the Huffman encoding, and the decoding result is input to the quantization unit 130c for inverse quantization, and then enters the transform unit 130b for reverse. The transform finally enters the prediction unit 130a so that the predicted value is added to the correlation difference, thereby outputting the decoded result.
关于解码的具体过程,可以参照视频解码的相关说明,此处不再进一步详细说明。For the specific process of decoding, reference may be made to the related description of video decoding, which will not be further described in detail herein.
步骤S614,向数据缓存模块140发送数据读取指令,令数据缓存模块140从数据解码模块132读取类视频数据,并缓存;Step S614, sending a data read instruction to the data cache module 140, and causing the data cache module 140 to read the video-like data from the data decoding module 132, and buffering;
步骤S616,向模型转换模块120发送数据读取指令,令模型转换模块120从数据缓存模块140中读取类视频数据;Step S616, sending a data read instruction to the model conversion module 120, so that the model conversion module 120 reads the video-like data from the data cache module 140;
步骤S618,向模型转换模块120发送数据转换指令,令模型转换模块120将类视频数据转换为神经网络数据;Step S618, sending a data conversion instruction to the model conversion module 120, so that the model conversion module 120 converts the video-like data into neural network data;
关于转换过程,其与第一实施例中模型转换模块执行的过程相逆。Regarding the conversion process, it is inverse to the process performed by the model conversion module in the first embodiment.
以第一种方式为例:对于数据范围在[-b,a]内的神经网络数据,模型转换模块(120)按以下公式操作,得到神经网络数据的真实数据值:Taking the first method as an example: for neural network data with a data range of [-b, a], the model conversion module (120) operates according to the following formula to obtain real data values of the neural network data:
Figure PCTCN2016113497-appb-000008
Figure PCTCN2016113497-appb-000008
其中,w是在[-b,a]范围内的神经网络数据的真实数据值,I为类视频数据,其是在[0,255]区间内的整数。Where w is the true data value of the neural network data in the range [-b, a], and I is the video-like data, which is an integer in the interval [0, 255].
以第二种方式为例:对于卷积神经网络数据,模型转换模块120将类视频数据中对应视频帧的数据进行转换,每一帧转换为卷积神经网络的一种特征图对应的隐层神经元的权值和偏置,将各帧转换的数据整合起来,得到卷积神经网络各特征图对应的隐层神经元的权值和偏置。Taking the second method as an example: for convolutional neural network data, the model conversion module 120 converts the data of the corresponding video frame in the video-like data, and converts each frame into a hidden layer corresponding to a feature map of the convolutional neural network. The weights and offsets of the neurons integrate the data converted by each frame to obtain the weights and offsets of the hidden layer neurons corresponding to the feature maps of the convolutional neural network.
步骤S620,向数据缓存模块140发送数据读取指令,令数据缓存模块140向模型转换模块120请求神经网络数据,并缓存;Step S620, sending a data read instruction to the data cache module 140, and causing the data cache module 140 to request the neural network data from the model conversion module 120, and buffering;
步骤S622,向数据缓存模块140发送数据写入指令,令数据缓存模块140将神经网络数据写入外部存储模块200;Step S622, send a data write command to the data cache module 140, so that the data cache module 140 writes the neural network data to the external storage module 200;
需要说明的是,虽然本实施例中是将解码结果输出到外部存储模块,但在本发明其他实施例中,还可以是将该解码结果直接传输出去,或者是 将解码结果缓存于模型转换模块或者数据缓存模块中,均是本发明可选的实现方式。It should be noted that, in this embodiment, the decoding result is output to the external storage module, but in other embodiments of the present invention, the decoding result may be directly transmitted, or Cache the decoding result in the model conversion module or the data cache module, which are optional implementations of the present invention.
需要进一步说明的是,解压过程实质上是一个解码的过程,因此以上的过程中的解码过程可以等同视为解压缩过程或解压缩过程的一部分。It should be further explained that the decompression process is essentially a decoding process, so the decoding process in the above process can be equivalently regarded as part of the decompression process or the decompression process.
至此,本实施例用于解压缩神经网络数据的解压缩装置介绍完毕。So far, the decompression device for decompressing neural network data in this embodiment has been introduced.
三、压缩/解压缩系统实施例Third, the compression / decompression system embodiment
在本发明的第三个示例性实施例中,还提供了一种压缩/解压缩系统。如图7所示,本实施例压缩/解压缩系统集成了第一实施例压缩装置与第二实施例的解压缩装置。并且,压缩装置和解压缩装置共用控制器模块110、模型转换模块120和数据缓存模块140。并且,压缩装置中的数据编码模块131和解压缩装置中的数据解码模块132集成为数据编/解码模块130。在数据编解码模块130中,数据编码模块131和数据解码模块共用预测单元130a,变换单元130b,量化单元130c,熵编码单元130d和深度自动编码器单元130e。In a third exemplary embodiment of the present invention, a compression/decompression system is also provided. As shown in Fig. 7, the compression/decompression system of the present embodiment integrates the compression device of the first embodiment and the decompression device of the second embodiment. And, the compression device and the decompression device share the controller module 110, the model conversion module 120, and the data cache module 140. And, the data encoding module 131 in the compression device and the data decoding module 132 in the decompression device are integrated into the data encoding/decoding module 130. In the data codec module 130, the data encoding module 131 and the data decoding module share a prediction unit 130a, a transform unit 130b, a quantization unit 130c, an entropy encoding unit 130d, and a depth auto encoder unit 130e.
以下分别对本实施例压缩/解压缩系统的压缩过程和解压缩过程进行概要性说明:The following summarizes the compression process and the decompression process of the compression/decompression system of this embodiment separately:
压缩过程:Compression process:
首先,将神经网络数据存入外部存储模块200;接着,控制器模块110,发送控制指令给相关模块控制压缩过程;数据缓存模块140从外部存储模块中读取神经网络数据并缓存;接着,模型转换模块120从数据缓存模块140中读取神经网络数据并将其转换为类视频数据,随后将这些类视频数据存至数据缓存模块140;然后,数据编码模块131从数据缓存模块140读取类视频数据,这些数据依次经过预测单元130a,变换单元130b,量化单元130c和熵编码单元130d的处理完成压缩过程;随后,数据缓存模块140从数据编码解码模块30中读取压缩后的数据。最后,数据缓存模块140将压缩结果写入外部存储模块。First, the neural network data is stored in the external storage module 200; then, the controller module 110 sends a control command to the relevant module to control the compression process; the data cache module 140 reads the neural network data from the external storage module and caches; and then, the model The conversion module 120 reads the neural network data from the data cache module 140 and converts it into class video data, and then stores the video data to the data cache module 140; then, the data encoding module 131 reads the class from the data cache module 140. The video data, which in turn passes through the processing of the prediction unit 130a, the transform unit 130b, the quantization unit 130c, and the entropy encoding unit 130d completes the compression process; subsequently, the data buffer module 140 reads the compressed data from the data encoding and decoding module 30. Finally, the data cache module 140 writes the compression result to the external storage module.
解码过程:Decoding process:
首先,将待解压的数据存入外部存储模块200中,这些数据是神经网络数据经过预测、变换、量化和熵编码过程所压缩而成的;在接下来的过程中控制器模块110发送控制指令至各相关模块从而控制解压过程。数据 缓存模块140从外部存储模块200读取待解压的数据。接着,数据解码模块132从数据缓存模块140读取待解压数据,这些数据一次经过熵编码单元130d,量化单元130c,变换单元130b和预测单元130a的处理,解压为类视频数据。然后,数据缓存模块140从数据编码解码模块30中读取类视频数据。随后,数据缓存模块140将类视频数据存至模型转换模块120,模型转换模块120将其转换为神经网络数据。最后,数据缓存模块140从模型转换模块120读取神经网络数据,再将其写入外部存储模块200。First, the data to be decompressed is stored in the external storage module 200, and the data is compressed by the prediction, transformation, quantization, and entropy coding processes of the neural network data; in the following process, the controller module 110 sends the control instruction. To each relevant module to control the decompression process. Data The cache module 140 reads the data to be decompressed from the external storage module 200. Next, the data decoding module 132 reads the data to be decompressed from the data buffer module 140, and the data is subjected to processing by the entropy encoding unit 130d, the quantization unit 130c, the transform unit 130b, and the prediction unit 130a, and decompressed into video-like data. The data cache module 140 then reads the video-like data from the data encoding and decoding module 30. Subsequently, the data cache module 140 stores the video-like data to the model conversion module 120, which converts it into neural network data. Finally, the data cache module 140 reads the neural network data from the model conversion module 120 and writes it to the external storage module 200.
至此,本实施例用于压缩/解压缩神经网络数据的压缩/解压缩系统介绍完毕。So far, the compression/decompression system for compressing/decompressing neural network data in this embodiment has been introduced.
至此,已经结合附图对本实施例进行了详细描述。依据以上描述,本领域技术人员应当对本发明用于神经网络数据的压缩/解压缩的装置和系统有了清楚的认识。Heretofore, the present embodiment has been described in detail with reference to the accompanying drawings. In view of the above description, those skilled in the art should have a clear understanding of the apparatus and system of the present invention for compression/decompression of neural network data.
本发明可以应用于以下(包括但不限于)场景中:数据处理、机器人、电脑、打印机、扫描仪、电话、平板电脑、智能终端、手机、行车记录仪、导航仪、传感器、摄像头、云端服务器、相机、摄像机、投影仪、手表、耳机、移动存储、可穿戴设备等各类电子产品;飞机、轮船、车辆等各类交通工具;电视、空调、微波炉、冰箱、电饭煲、加湿器、洗衣机、电灯、燃气灶、油烟机等各类家用电器;以及包括核磁共振仪、B超、心电图仪等各类医疗设备。The invention can be applied to the following (including but not limited to) scenarios: data processing, robots, computers, printers, scanners, telephones, tablets, smart terminals, mobile phones, driving recorders, navigators, sensors, cameras, cloud servers , cameras, camcorders, projectors, watches, earphones, mobile storage, wearable devices and other electronic products; aircraft, ships, vehicles and other types of transportation; televisions, air conditioners, microwave ovens, refrigerators, rice cookers, humidifiers, washing machines, Electric lights, gas stoves, range hoods and other household appliances; and including nuclear magnetic resonance instruments, B-ultrasound, electrocardiograph and other medical equipment.
需要说明的是,在附图或说明书正文中,未绘示或描述的实现方式,均为所属技术领域中普通技术人员所知的形式,并未进行详细说明。此外,上述对各元件和方法的定义并不仅限于实施例中提到的各种具体结构、形状或方式,本领域普通技术人员可对其进行简单地更改或替换,例如:It should be noted that the implementations that are not shown or described in the drawings or the text of the specification are all known to those of ordinary skill in the art and are not described in detail. In addition, the above definitions of the various elements and methods are not limited to the specific structures, shapes or manners mentioned in the embodiments, and those skilled in the art can simply modify or replace them, for example:
(1)外部存储模块和数据缓存模块还可以整体的形式存在,即将两个模块合并为一个具有存储功能的模块;(1) The external storage module and the data cache module may also exist in a whole form, that is, the two modules are merged into one module having a storage function;
(2)外部存储模块和数据缓存模块还可以以分散于各模块的本地存储的形式存在。(2) The external storage module and the data cache module may also exist in a form of local storage distributed among the modules.
(3)外部存储模块可以用硬盘来代替;(3) The external storage module can be replaced by a hard disk;
(4)外部存储模块可以用输入输出模块替代,用来进行数据的输入和输出。 (4) The external storage module can be replaced by an input/output module for inputting and outputting data.
还需要说明的是,本文可提供包含特定值的参数的示范,但这些参数无需确切等于相应的值,而是可在可接受的误差容限或设计约束内近似于相应值。除非特别描述或必须依序发生的步骤,上述步骤的顺序并无限制于以上所列,且可根据所需设计而变化或重新安排。并且上述实施例可基于设计及可靠度的考虑,彼此混合搭配使用或与其他实施例混合搭配使用,即不同实施例中的技术特征可以自由组合形成更多的实施例。It should also be noted that an example of parameters containing specific values may be provided herein, but these parameters need not be exactly equal to the corresponding values, but may approximate the corresponding values within acceptable error tolerances or design constraints. The order of the above steps is not limited to the above, and may be varied or rearranged depending on the desired design, unless specifically stated or steps that must occur in sequence. The above embodiments may be used in combination with other embodiments or based on design and reliability considerations, that is, the technical features in different embodiments may be freely combined to form more embodiments.
前面的附图中所描绘的进程或方法可通过包括硬件(例如,电路、专用逻辑等)、固件、软件(例如,被承载在非瞬态计算机可读介质上的软件),或两者的组合的处理逻辑来执行。虽然上文按照某些顺序操作描述了进程或方法,但是,应该理解,所描述的某些操作能以不同顺序来执行。此外,可并行地而非顺序地执行一些操作。The processes or methods depicted in the preceding figures may be by hardware (eg, circuitry, dedicated logic, etc.), firmware, software (eg, software carried on a non-transitory computer readable medium), or both. The combined processing logic is executed. Although the processes or methods have been described above in some order, it should be understood that certain operations described can be performed in a different order. Moreover, some operations may be performed in parallel rather than sequentially.
综上所述,本发明可以实现大规模神经网络模型的高效压缩与解压,从而大幅减少神经网络模型的存储空间和传输压力,从而适应大数据时代神经网络规模不断扩大的趋势,可以应用到神经网络数据的各个领域,具有较强的推广应用价值。In summary, the present invention can realize high-efficiency compression and decompression of a large-scale neural network model, thereby greatly reducing the storage space and transmission pressure of the neural network model, thereby adapting to the trend of expanding the size of the neural network in the era of big data, and can be applied to the nerve. Various fields of network data have strong promotion and application value.
以上所述的具体实施例,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施例而已,并不用于限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The specific embodiments of the present invention have been described in detail, and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims (12)

  1. 一种用于神经网络数据的压缩装置,其特征在于,包括:A compression device for neural network data, comprising:
    模型转换模块(120),用于将神经网络数据转化为类视频数据;以及a model conversion module (120) for converting neural network data into video-like data;
    数据编码模块(131),与所述模型转换模块(120)相连接,用于采用视频编码的方式对所述类视频数据进行编码,得到压缩结果。The data encoding module (131) is connected to the model conversion module (120) for encoding the video data in a video encoding manner to obtain a compression result.
  2. 根据权利要求1所述的压缩装置,其特征在于,所述类视频数据是指经过模型转换模块的转换后,原来的每个神经网络数据被转换为一系列预设范围内的整数值,对应于一个个像素的表示,这些整数共同所构成的对应视频的数据。The compression device according to claim 1, wherein the video-like data refers to that after the conversion by the model conversion module, each of the original neural network data is converted into a series of integer values within a preset range, corresponding to In the representation of one pixel, these integers together constitute the corresponding video data.
  3. 根据权利要求2所述的压缩装置,其特征在于,所述模型转换模块(120)采用以下两种方式其中之一将神经网络数据转化为类视频数据:The compression apparatus according to claim 2, wherein the model conversion module (120) converts the neural network data into video-like data in one of two ways:
    第一种方式:对于数据范围在[-b,a]内的神经网络数据,模型转换模块(120)按以下公式操作:The first way: For neural network data with a data range of [-b, a], the model transformation module (120) operates as follows:
    Figure PCTCN2016113497-appb-100001
    Figure PCTCN2016113497-appb-100001
    其中,I是在[0,255]区间内的整数,即一个像素的表示;w是在[-b,a]范围内的神经网络数据的真实数据值;Where I is an integer in the interval [0, 255], that is, a representation of one pixel; w is the true data value of the neural network data in the range [-b, a];
    第二种方式:对于卷积神经网络数据,模型转换模块(120)将卷积神经网络数据中的每一种特征图对应的隐层神经元的权值和偏置进行转换,并将权值和偏置转换后得到的整数整合起来,得到对应视频帧的数据,从多种特征图对应的隐层神经元的权值和偏置得到的类似视频帧的数据结合起来就得到类视频数据。The second way: for convolutional neural network data, the model conversion module (120) converts the weights and offsets of the hidden layer neurons corresponding to each feature map in the convolutional neural network data, and converts the weights The data obtained by the offset conversion is integrated to obtain data of the corresponding video frame, and the video data of the video frame is obtained by combining the weights of the hidden layer neurons corresponding to the plurality of feature maps and the data of the similar video frames obtained by the offset.
  4. 根据权利要求1所述的压缩装置,其特征在于,所述数据编码模块(131)包括:The compression device according to claim 1, wherein the data encoding module (131) comprises:
    编码子模块,用于采用视频编码的方式对所述类视频数据进行编码,得到数据编码结果;以及An encoding sub-module for encoding the video data in a manner of video encoding to obtain a data encoding result;
    整合子模块,用于将数据编码结果和编码过程信息进行整合,得到压缩结果。The integration sub-module is used to integrate the data encoding result and the encoding process information to obtain a compression result.
  5. 根据权利要求4所述的压缩装置,其特征在于,所述编码子模块 包括:The compression device according to claim 4, wherein said coding sub-module include:
    预测单元(130a),用于利用类视频数据相邻数据之间的相关性进行预测编码;a prediction unit (130a) for predictive coding using correlation between adjacent data of video-like data;
    变换单元(130b),用于对经过预测单元处理后的类视频数据进行正交变换编码,以压缩数据;a transform unit (130b), configured to perform orthogonal transform coding on the video-like data processed by the prediction unit to compress the data;
    量化单元(130c),用于对经过变换单元处理后的类视频数据进行量化编码,在不降低数据质量的前提下减少数据的编码长度;以及a quantization unit (130c) for performing quantization coding on the video-like data processed by the transformation unit, and reducing the coding length of the data without reducing the data quality;
    熵编码单元(130d),用于利用数据的统计特性对经过量化单元处理后的类视频数据进行码率压缩编码,以减少数据冗余。The entropy coding unit (130d) is configured to perform rate compression coding on the video-like data processed by the quantization unit by using statistical characteristics of the data to reduce data redundancy.
  6. 根据权利要求4所述的压缩装置,其特征在于,所述编码子模块包括:The compression device according to claim 4, wherein the encoding sub-module comprises:
    深度自动编码器单元(130),用于对模型转换模块输出的类视频数据进一步编码,将隐层输出作为编码结果;a depth autoencoder unit (130) for further encoding the video-like data output by the model conversion module, and using the hidden layer output as the encoding result;
    其中,所述深度自动编码器单元(130)通过将类视频数据作为训练输入和理想输出利用最小化重构误差的方法进行训练,使输出成为与输入类视频数据基本相同的数据。The depth autoencoder unit (130) trains the video-like data as a training input and an ideal output by minimizing the reconstruction error, so that the output becomes substantially the same data as the input-type video data.
  7. 根据权利要求1至6中任一项所述的压缩装置,其特征在于,还包括:The compression device according to any one of claims 1 to 6, further comprising:
    数据缓存模块(140),用于缓存神经网络数据;a data cache module (140) for buffering neural network data;
    控制器模块(110),与所述数据缓存模块(140)、模型转换模块(120)和数据编码模块(131)相连接,用于发送控制指令,以执行如下操作:The controller module (110) is coupled to the data cache module (140), the model conversion module (120), and the data encoding module (131) for transmitting control commands to perform the following operations:
    向数据缓存模块(140)发送数据读取指令,令其向外界请求神经网络数据,并将该神经网络数据进行缓存;Sending a data read command to the data cache module (140), requesting the neural network data to be sent to the outside world, and buffering the neural network data;
    向模型转换模块(120)发送数据读取指令,令其从数据缓存模块(140)中读取神经网络数据;Transmitting a data read instruction to the model conversion module (120) to read the neural network data from the data cache module (140);
    向模型转换模块(120)发送数据转换指令,令其将读取的神经网络数据转换为类视频数据;Transmitting a data conversion instruction to the model conversion module (120) to convert the read neural network data into video-like data;
    向数据缓存模块(140)发送数据读取指令,令其向模型转换模块(120)请求类视频数据,并进行缓存;Sending a data read instruction to the data cache module (140) to request the class video data to the model conversion module (120), and buffering;
    向数据编码模块(131)发送数据读取指令,令其从数据缓存模块 (140)读取类视频数据;Sending a data read command to the data encoding module (131) to enable it from the data cache module (140) reading class video data;
    向数据编码模块(131)发送数据编码指令,该编码指令中包含编码方式的信息,令其对采用该编码方式对应的单元对类视频数据进行编码,得到数据编码结果;Transmitting, by the data encoding module (131), a data encoding instruction, where the encoding instruction includes information of the encoding mode, and encoding the unit-type video data corresponding to the encoding mode to obtain a data encoding result;
    向数据编码模块(131)发送整合指令,令其将数据编码结果和编码过程信息进行整合,得到压缩结果;Sending an integration instruction to the data encoding module (131), so that the data encoding result and the encoding process information are integrated to obtain a compression result;
    向数据缓存模块(140)发送数据缓存指令,令其从数据编码模块(131)中获得压缩结果,并将压缩结果进行缓存。A data cache instruction is sent to the data cache module (140) to obtain a compression result from the data encoding module (131), and the compression result is cached.
  8. 一种用于神经网络数据的解压缩装置,其特征在于,包括:A decompression device for neural network data, comprising:
    数据解码模块(132),用于得到压缩结果,采用与压缩结果对应的视频解码方式对所述压缩结果进行解码;以及a data decoding module (132), configured to obtain a compression result, and decode the compression result by using a video decoding manner corresponding to the compression result;
    模型转换模块(120),与所述数据解码模块(132)相连接,用于将解码后的类视频数据还原为神经网络数据。The model conversion module (120) is coupled to the data decoding module (132) for restoring the decoded video-like data to neural network data.
  9. 根据权利要求8所述的解压缩装置,其特征在于,所述数据解码模块(132)包括:The decompression device of claim 8, wherein the data decoding module (132) comprises:
    解整合子模块,用于将压缩结果进行解整合,得到数据编码结果和编码过程信息;以及De-integrating sub-module for de-integrating the compression result to obtain data encoding result and encoding process information;
    解码子模块,用于从所述编码过程信息中提取编码方式信息,利用该编码方式信息对应的解码方式对所述数据编码结果进行解码,得到类视频数据。The decoding submodule is configured to extract coding mode information from the coding process information, and decode the data coding result by using a decoding manner corresponding to the coding mode information to obtain video-like data.
  10. 根据权利要求8所述的解压缩装置,其特征在于,所述模型转换模块采用以下两种方式其中之一将解码后的类视频数据还原为神经网络数据:The decompression apparatus according to claim 8, wherein the model conversion module restores the decoded video-like data to neural network data in one of two ways:
    第一种方式:对于数据范围在[-b,a]内的神经网络数据,模型转换模块(120)按以下公式操作,得到神经网络数据的真实数据值:The first way: For neural network data with data range [-b, a], the model conversion module (120) operates according to the following formula to obtain the true data values of the neural network data:
    Figure PCTCN2016113497-appb-100002
    Figure PCTCN2016113497-appb-100002
    其中,w是在[-b,a]范围内的神经网络数据的真实数据值,I为类视频数据,其是在[0,255]区间内的整数;Where w is the true data value of the neural network data in the range [-b, a], and I is the video-like data, which is an integer in the interval [0, 255];
    第二种方式:对于卷积神经网络数据,模型转换模块(120)将类视 频数据中对应视频帧的数据进行转换,每一帧转换为卷积神经网络的一种特征图对应的隐层神经元的权值和偏置,将各帧转换的数据整合起来,得到卷积神经网络各特征图对应的隐层神经元的权值和偏置。The second way: for convolutional neural network data, the model transformation module (120) will classify The data of the corresponding video frame in the frequency data is converted, and each frame is converted into a weight and offset of a hidden layer neuron corresponding to a feature map of the convolutional neural network, and the data converted by each frame is integrated to obtain a convolution The weights and offsets of the hidden layer neurons corresponding to each feature map of the neural network.
  11. 根据权利要求8所述的解压缩装置,其特征在于,还包括:The decompression device according to claim 8, further comprising:
    数据缓存模块(140),用于缓存压缩结果;a data cache module (140) for buffering the compression result;
    控制器模块(110),与所述模型转换模块(120)、数据解码模块(132)和数据缓存模块(140)连接,用于向三者下达控制指令,以执行以下操作:The controller module (110) is coupled to the model conversion module (120), the data decoding module (132), and the data cache module (140) for issuing control commands to the three to perform the following operations:
    向数据缓存模块(140)发送数据读取指令,令其向外部请求压缩结果,并将该压缩结果缓存;Sending a data read instruction to the data cache module (140), requesting the external result to be compressed, and buffering the compressed result;
    向数据解码模块(132)发送数据读取指令,令其从数据缓存模块(140)中读取压缩结果;Sending a data read instruction to the data decoding module (132) to read the compressed result from the data cache module (140);
    向数据解码模块(132)发送解整合指令,令其从所述压缩结果中解码出编码过程信息和数据压缩结果;Sending a de-integration instruction to the data decoding module (132) to decode the encoding process information and the data compression result from the compression result;
    向数据解码模块(132)发送数据读取指令,从数据解码模块132读取编码过程信息;Transmitting a data read instruction to the data decoding module (132), and reading the encoding process information from the data decoding module 132;
    根据编码过程信息选择解码指令;Selecting a decoding instruction according to the encoding process information;
    向数据编码解码模块(132)发送解码指令,令其将压缩结果中的数据压缩结果进行解压缩,得到类视频数据;Sending a decoding instruction to the data encoding and decoding module (132), so that the data compression result in the compression result is decompressed to obtain video-like data;
    向数据缓存模块(140)发送数据读取指令,令其从数据解码模块(132)读取类视频数据,并缓存;Sending a data read instruction to the data buffer module (140) to read the video-like data from the data decoding module (132) and buffering;
    向模型转换模块(120)发送数据读取指令,令其从数据缓存模块(140)中读取类视频数据;Sending a data read instruction to the model conversion module (120) to read the video-like data from the data cache module (140);
    向模型转换模块(120)发送数据转换指令,令其将类视频数据转换为神经网络数据。A data conversion instruction is sent to the model conversion module (120) to convert the video-like data into neural network data.
  12. 一种用于神经网络数据的压缩/解压缩的系统,其特征在于,包括:A system for compressing/decompressing neural network data, comprising:
    压缩装置,为权利要求7所述的压缩装置;以及a compression device, the compression device of claim 7;
    解压缩装置,为权利要求11所述的解压缩装置;a decompression device, the decompression device of claim 11;
    其中,所述压缩装置和解压缩装置共用数据缓存模块(140)、控制器模块(110)和模型转换模块(120)。 The compression device and the decompression device share a data cache module (140), a controller module (110), and a model conversion module (120).
PCT/CN2016/113497 2016-12-30 2016-12-30 Compression/decompression apparatus and system for use with neural network data WO2018120019A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/113497 WO2018120019A1 (en) 2016-12-30 2016-12-30 Compression/decompression apparatus and system for use with neural network data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/113497 WO2018120019A1 (en) 2016-12-30 2016-12-30 Compression/decompression apparatus and system for use with neural network data

Publications (1)

Publication Number Publication Date
WO2018120019A1 true WO2018120019A1 (en) 2018-07-05

Family

ID=62706542

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/113497 WO2018120019A1 (en) 2016-12-30 2016-12-30 Compression/decompression apparatus and system for use with neural network data

Country Status (1)

Country Link
WO (1) WO2018120019A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10872186B2 (en) 2017-01-04 2020-12-22 Stmicroelectronics S.R.L. Tool to create a reconfigurable interconnect framework
CN112131429A (en) * 2020-09-16 2020-12-25 北京影谱科技股份有限公司 Video classification method and system based on depth prediction coding network
US11227086B2 (en) 2017-01-04 2022-01-18 Stmicroelectronics S.R.L. Reconfigurable interconnect
US11531873B2 (en) 2020-06-23 2022-12-20 Stmicroelectronics S.R.L. Convolution acceleration with embedded vector decompression
US11593609B2 (en) 2020-02-18 2023-02-28 Stmicroelectronics S.R.L. Vector quantization decoding hardware unit for real-time dynamic decompression for parameters of neural networks

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105612744A (en) * 2013-10-01 2016-05-25 索尼公司 Video data encoding and decoding
WO2016118257A1 (en) * 2015-01-22 2016-07-28 Qualcomm Incorporated Model compression and fine-tuning
CN105844330A (en) * 2016-03-22 2016-08-10 华为技术有限公司 Data processing method of neural network processor and neural network processor
CN106169961A (en) * 2016-09-07 2016-11-30 北京百度网讯科技有限公司 The network parameter processing method and processing device of neutral net based on artificial intelligence
CN106203624A (en) * 2016-06-23 2016-12-07 上海交通大学 Vector Quantization based on deep neural network and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105612744A (en) * 2013-10-01 2016-05-25 索尼公司 Video data encoding and decoding
WO2016118257A1 (en) * 2015-01-22 2016-07-28 Qualcomm Incorporated Model compression and fine-tuning
CN105844330A (en) * 2016-03-22 2016-08-10 华为技术有限公司 Data processing method of neural network processor and neural network processor
CN106203624A (en) * 2016-06-23 2016-12-07 上海交通大学 Vector Quantization based on deep neural network and method
CN106169961A (en) * 2016-09-07 2016-11-30 北京百度网讯科技有限公司 The network parameter processing method and processing device of neutral net based on artificial intelligence

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10872186B2 (en) 2017-01-04 2020-12-22 Stmicroelectronics S.R.L. Tool to create a reconfigurable interconnect framework
US11227086B2 (en) 2017-01-04 2022-01-18 Stmicroelectronics S.R.L. Reconfigurable interconnect
US11562115B2 (en) 2017-01-04 2023-01-24 Stmicroelectronics S.R.L. Configurable accelerator framework including a stream switch having a plurality of unidirectional stream links
US11675943B2 (en) 2017-01-04 2023-06-13 Stmicroelectronics S.R.L. Tool to create a reconfigurable interconnect framework
US11593609B2 (en) 2020-02-18 2023-02-28 Stmicroelectronics S.R.L. Vector quantization decoding hardware unit for real-time dynamic decompression for parameters of neural networks
US11880759B2 (en) 2020-02-18 2024-01-23 Stmicroelectronics S.R.L. Vector quantization decoding hardware unit for real-time dynamic decompression for parameters of neural networks
US11531873B2 (en) 2020-06-23 2022-12-20 Stmicroelectronics S.R.L. Convolution acceleration with embedded vector decompression
US11836608B2 (en) 2020-06-23 2023-12-05 Stmicroelectronics S.R.L. Convolution acceleration with embedded vector decompression
CN112131429A (en) * 2020-09-16 2020-12-25 北京影谱科技股份有限公司 Video classification method and system based on depth prediction coding network

Similar Documents

Publication Publication Date Title
WO2018121670A1 (en) Devices for compression/decompression, system, chip, and electronic device
Hu et al. Learning end-to-end lossy image compression: A benchmark
WO2018120019A1 (en) Compression/decompression apparatus and system for use with neural network data
US20200160565A1 (en) Methods And Apparatuses For Learned Image Compression
CN110798690B (en) Video decoding method, and method, device and equipment for training loop filtering model
WO2020047756A1 (en) Image encoding method and apparatus
CN103581665A (en) Transcoding video data
CN112702592B (en) End-to-end binocular image joint compression method, device, equipment and medium
KR20200089635A (en) Systems and methods for image compression at multiple, different bitrates
US11863799B2 (en) Image encoding method and apparatus, image decoding method and apparatus, and chip
CN101883284A (en) Video encoding/decoding method and system based on background modeling and optional differential mode
KR102471288B1 (en) Method and apparatus for transmitting and receaving
US11483585B2 (en) Electronic apparatus and controlling method thereof
WO2023279961A1 (en) Video image encoding method and apparatus, and video image decoding method and apparatus
WO2021112852A1 (en) Watermark-based image reconstruction
JP2018201117A (en) Video encoder, video encoding method and program
WO2023098688A1 (en) Image encoding and decoding method and device
WO2022100140A1 (en) Compression encoding method and apparatus, and decompression method and apparatus
CN107205151B (en) Coding and decoding device and method based on mixed distortion measurement criterion
Li et al. 3D tensor auto-encoder with application to video compression
CN114189684A (en) JND algorithm-based video coding method, device, medium and computing device
US8861880B2 (en) Image processing device and image processing method
CN105306941A (en) Video coding method
WO2022155818A1 (en) Image encoding method and device, image decoding method and device, and codec
WO2023040745A1 (en) Feature map encoding method and apparatus and feature map decoding method and apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16925352

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16925352

Country of ref document: EP

Kind code of ref document: A1