JP7282070B2 - compressed data - Google Patents
compressed data Download PDFInfo
- Publication number
- JP7282070B2 JP7282070B2 JP2020206026A JP2020206026A JP7282070B2 JP 7282070 B2 JP7282070 B2 JP 7282070B2 JP 2020206026 A JP2020206026 A JP 2020206026A JP 2020206026 A JP2020206026 A JP 2020206026A JP 7282070 B2 JP7282070 B2 JP 7282070B2
- Authority
- JP
- Japan
- Prior art keywords
- quantization
- data
- information
- data processing
- layer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Description
この発明は、ニューラルネットワークの構成に関する情報を符号化して圧縮された圧縮データに関する。 The present invention relates to compressed data in which information about the configuration of a neural network is encoded and compressed.
入力データの分類問題および回帰問題を解決する方法として機械学習がある。
機械学習には、脳の神経回路(ニューロン)を模擬したニューラルネットワークという手法がある。ニューラルネットワークでは、ニューロンが相互に結合されたネットワークによって表現された確率モデル(識別モデル、生成モデル)によって、入力データの分類(識別)または回帰が行われる。
さらに、全結合層(Fully-connected Layer)だけでなく、畳み込み層(Convolution Layer)とプーリング層(Pooling Layer)を持つニューラルネットワークである畳み込みニューラルネットワーク(Convolutional Neural Network)では、データのフィルタ処理を実現するネットワークなど、分類および回帰以外のデータ処理を実現するネットワークが生成可能となっている。例えば、画像または音声を入力として、入力信号のノイズ除去、または高品質化などを実現する画像または音声のフィルタ処理、圧縮音声などの高域が失われた音声の高域復元処理、一部領域が欠損した画像の復元処理(inpainting)、画像の超解像処理、などが畳み込みニューラルネットワークで実現可能である。
その他にも、生成モデルで生成されたデータが、本物のデータであるか(生成モデルによって生成されたデータではないか)を判定する識別モデルに入力してデータの真贋判定する、生成モデルと識別モデルとを組み合わせてネットワークを構築し、生成モデルは、生成データが識別モデルに生成データであることを見破られないように、識別モデルは、生成データが生成データであることを見破れるように、敵対的に学習することで、高精度な生成モデルの生成を実現する敵対的生成ネットワーク(Generative Adversarial Network)という新しいニューラルネットワークも近年発表されている。
Machine learning is a method for solving input data classification and regression problems.
In machine learning, there is a method called a neural network that simulates the neural circuits (neurons) of the brain. In a neural network, classification (discrimination) or regression of input data is performed by a probabilistic model (discrimination model, generative model) represented by a network in which neurons are interconnected.
In addition, the convolutional neural network, which is a neural network with not only a fully-connected layer but also a convolution layer and a pooling layer, realizes data filtering. It is possible to generate networks that perform data processing other than classification and regression, such as networks that For example, using an image or sound as an input, image or sound filter processing that realizes noise reduction or high quality of the input signal, high-frequency restoration processing of compressed sound that has lost high-frequency, and partial area Restoration processing (inpainting) of an image in which a pixel is missing, super-resolution processing of an image, and the like can be realized with a convolutional neural network.
In addition, the data generated by the generative model is input to the identification model that determines whether it is genuine data (is not the data generated by the generative model), and the authenticity of the data is determined. A network is constructed by combining a model, and the generative model is generated data so that the discriminative model cannot detect that the generated data is generated data. In recent years, a new neural network called a generative adversarial network that achieves generation of a highly accurate generative model through adversarial learning has also been announced.
これらニューラルネットワークでは、大量のデータを用いた学習によってネットワークのパラメータを最適化することで、高性能化を図ることができる。
ただし、ニューラルネットワークのデータサイズは大容量化する傾向にあり、ニューラルネットワークを用いたコンピュータの計算負荷も増加している。
These neural networks can achieve high performance by optimizing network parameters through learning using a large amount of data.
However, the data size of neural networks tends to increase, and the computational load on computers using neural networks is also increasing.
これに対して、非特許文献1には、ニューラルネットワークのパラメータであるエッジの重みをスカラ量子化して符号化する技術が記載されている。エッジの重みをスカラ量子化して符号化することで、エッジに関するデータのデータサイズが圧縮される。
On the other hand, Non-Patent
しかしながら、ニューラルネットワークにおける複数のエッジのそれぞれに付与される重みの最適値は、ネットワークの学習結果によって異なり、一定ではない。
このため、エッジの重みの圧縮サイズにばらつきが生じて、非特許文献1に記載される技術では、ニューラルネットワークのエッジに関するパラメータデータの高圧縮を実現できないという課題があった。
However, the optimum value of the weight given to each of the plurality of edges in the neural network differs depending on the learning result of the network and is not constant.
For this reason, variations occur in the compression size of edge weights, and the technique described in Non-Patent
この発明は上記課題を解決するもので、ニューラルネットワークのパラメータデータを高圧縮することができる圧縮データを得ることを目的とする。 SUMMARY OF THE INVENTION An object of the present invention is to obtain compressed data capable of highly compressing parameter data of a neural network.
この発明に係る圧縮データは、ニューラルネットワークのパラメータデータを量子化するときの量子化幅である量子化ステップが定義された量子化情報と、量子化ステップで量子化されたニューラルネットワークのパラメータデータを含むネットワーク構成情報とが符号化された、圧縮データであって、量子化情報は、第1のデータ処理装置が、ニューラルネットワークのエッジごと、ノードごと、カーネルごとまたはレイヤごとのうち、いずれかを最小切り替え単位として決定した量子化ステップが定義されたものであり、ネットワーク構成情報は、第1のデータ処理装置が、量子化情報に定義された量子化ステップでパラメータデータの量子化を行って算出した量子化パラメータデータを含み、量子化情報およびネットワーク構成情報は、第1のデータ処理装置と第2のデータ処理装置との間で一定の圧縮サイズで符号化されており、第2のデータ処理装置が、符号化された量子化情報およびネットワーク構成情報を復号し、ニューラルネットワークのエッジごと、ノードごと、カーネルごとまたはレイヤごとのいずれかの最小切り替え単位のうち復号した量子化情報が示す最小切り替え単位の量子化ステップで、復号したネットワーク構成情報に含まれる量子化パラメータデータを逆量子化し、逆量子化した量子化パラメータデータを、ネットワーク構成情報が示す構成を有したニューラルネットワークの生成に用いるものである。 Compressed data according to the present invention includes quantization information defining a quantization step, which is a quantization width when quantizing parameter data of a neural network, and parameter data of the neural network quantized by the quantization step. and network configuration information, wherein the quantization information is encoded by the first data processing device either per edge, per node, per kernel, or per layer of the neural network. The quantization step determined as the minimum switching unit is defined, and the network configuration information is calculated by the first data processing device quantizing the parameter data at the quantization step defined in the quantization information. the quantization information and the network configuration information are encoded with a constant compression size between the first data processing device and the second data processing device; An apparatus decodes the encoded quantization information and network configuration information , and the decoded quantization information indicates the minimum switching unit for either each edge, each node, each kernel, or each layer of the neural network. Inverse quantization of the quantization parameter data included in the decoded network configuration information at the quantization step of the minimum switching unit, and using the inverse quantization parameter data to generate a neural network having the configuration indicated by the network configuration information. It is used .
この発明によれば、圧縮データは、ニューラルネットワークのパラメータデータを量子化するときの量子化ステップが定義された量子化情報と量子化情報における量子化ステップで量子化されたパラメータデータを含むネットワーク構成情報とを符号化して生成される。これにより、ニューラルネットワークのパラメータデータを高圧縮することができる。圧縮データから復号した量子化情報およびネットワーク構成情報を用いることで、符号化側で最適化されたニューラルネットワークを復号側で構成することができる。 According to the present invention, the compressed data includes quantization information defining a quantization step for quantizing the parameter data of the neural network and parameter data quantized by the quantization step in the quantization information. It is generated by encoding information. Thereby, the parameter data of the neural network can be highly compressed. By using quantization information and network configuration information decoded from compressed data, a neural network optimized on the encoding side can be configured on the decoding side.
以下、この発明をより詳細に説明するため、この発明を実施するための形態について、添付の図面に従って説明する。
実施の形態1.
図1は、この発明の実施の形態1に係るデータ処理装置100の構成を示すブロック図である。図1において、データ処理装置100は、学習済みのニューラルネットワークを用いて入力データを処理し、処理結果を出力する。
また、データ処理装置100は、量子化情報およびネットワーク構成情報を符号化するエンコーダとして機能し、データ処理部101、圧縮制御部102および符号化部103を備える。
Hereinafter, in order to describe the present invention in more detail, embodiments for carrying out the present invention will be described with reference to the accompanying drawings.
FIG. 1 is a block diagram showing the configuration of a
The
データ処理部101は、上記ニューラルネットワークを用いて入力データを処理する。
また、データ処理部101は、圧縮制御部102によって生成された量子化情報を入力し、量子化情報に定義された量子化ステップでニューラルネットワークのパラメータデータを量子化する。そして、データ処理部101は、量子化した上記パラメータデータを含むネットワーク構成情報を、符号化部103に出力する。
The
The
データ処理部101で用いる上記ニューラルネットワークは予め決めたものを用いてもよいし、学習によってパラメータデータの最適化を行ってもよい。
ニューラルネットワークのパラメータデータを学習する場合、予め決まった初期状態(パラメータデータの初期値)のニューラルネットワークに対して、学習対象の入力データを用いてニューラルネットワークの学習を行った後、圧縮制御部102によって生成された量子化情報を入力して量子化情報に定義された量子化ステップでニューラルネットワークのパラメータデータを量子化する。
そして、この量子化されたニューラルネットワークを次の学習の初期状態として、上記の学習と量子化を実施する。この学習と量子化の処理をL回(Lは1以上の整数)繰り返した結果として得られたニューラルネットワークをネットワーク構成情報の一部として、符号化部103に出力する。
なお、L=1の場合は、量子化後のニューラルネットワークを再学習しないため、データ処理部101で学習せずに外部で学習済みのニューラルネットワークを用いることと同様の処理と言える。つまり、学習をデータ処理部101で行うか外部で行うかの違いのみである。
A predetermined neural network may be used as the neural network used in the
When learning the parameter data of the neural network, the neural network in a predetermined initial state (initial value of the parameter data) is trained using the input data to be learned, and then the
Then, using this quantized neural network as an initial state for the next learning, the above learning and quantization are performed. A neural network obtained as a result of repeating this learning and quantization processing L times (L is an integer equal to or greater than 1) is output to encoding
In the case of L=1, since the neural network after quantization is not re-learned, it can be said that the processing is the same as using an externally trained neural network without learning in the
ネットワーク構成情報は、ニューラルネットワークの構成を示す情報であり、例えば、ネットワークのレイヤ数、レイヤごとのノード数、ノード間を繋ぐエッジ、エッジごとに付与された重み情報、ノードの出力を表す活性化関数および層ごとの種別情報(例えば、畳み込み層、プーリング層、全結合層)などが含まれる。
ニューラルネットワークのパラメータデータとは、例えば、ニューラルネットワークにおけるノード間を結合するエッジに付与された重み情報がある。
The network configuration information is information indicating the configuration of the neural network, and includes, for example, the number of layers in the network, the number of nodes in each layer, edges connecting nodes, weight information given to each edge, and activation representing the output of a node. Type information for each function and layer (eg, convolutional layer, pooling layer, fully connected layer), etc. are included.
Parameter data of a neural network includes, for example, weight information given to edges connecting nodes in the neural network.
圧縮制御部102は、ニューラルネットワークのパラメータデータを量子化するときの量子化ステップを決定し、量子化ステップが定義された量子化情報を生成する。
例えば、圧縮制御部102は、ニューラルネットワークにおける、エッジごと、ノードごと、カーネルごと、または、レイヤごとに切り替わる量子化ステップを決定する。
The
For example, the
量子化情報は、ニューラルネットワークのパラメータデータを量子化するときの量子化ステップが定義された情報である。量子化ステップとは、パラメータデータを量子化するときの幅(量子化幅)であり、量子化ステップが大きいほどパラメータデータが粗く分解されるので、圧縮率は高くなる。量子化ステップが小さいほどパラメータデータが細かく分解されるので、圧縮率は低くなる。
具体的には、量子化値kは、下記式(1)で表される。
k=floor((x/Q)+d0)+d1 (1)
上記式(1)において、xは量子化対象パラメータの値、Qは量子化ステップ、d0(0≦d0<1)は、それぞれの量子化値に対応する量子化対象値の範囲の調整オフセットであり、d1(0≦d1<1)は量子化値を調整するオフセット、floor()は小数点切捨て処理関数を示している。さらに、上記式(1)に対して設定した範囲の量子化対象値xの量子化値kを0とするデッドゾーンを設ける方法もある。
また、量子化済みパラメータの値yは下記式(2)のとおりとなる。
y=kQ (2)
上記で説明した量子化ステップの最小切り替え単位を、エッジ単位からレイヤ単位とした場合、量子化によるパラメータデータの圧縮率が高くなるので、符号化前のパラメータデータを削減することができる。
The quantization information is information defining a quantization step for quantizing the parameter data of the neural network. A quantization step is a width (quantization width) when parameter data is quantized, and the larger the quantization step is, the coarser the parameter data is decomposed, resulting in a higher compression rate. The smaller the quantization step, the finer the parameter data is decomposed, resulting in a lower compression rate.
Specifically, the quantization value k is represented by the following formula (1).
k=floor((x/Q)+ d0 )+ d1 (1)
In the above formula (1), x is the value of the quantization target parameter, Q is the quantization step, and d 0 (0≦d 0 < 1) is the adjustment of the range of the quantization target value corresponding to each quantization value. d 1 (0≦
Also, the value y of the quantized parameter is given by the following equation (2).
y=kQ (2)
When the minimum switching unit of the quantization steps described above is changed from the edge unit to the layer unit, the compression rate of the parameter data by quantization increases, so the parameter data before encoding can be reduced.
符号化部103は、データ処理部101によって量子化されたパラメータデータを含むネットワーク構成情報と、圧縮制御部102によって生成された量子化情報と、を符号化して圧縮データを生成する。
なお、データ処理部101から符号化部103に入力されたネットワーク構成情報は、圧縮制御部102によって決定された量子化ステップで、データ処理部101によって量子化されたパラメータデータを含むネットワーク構成情報である。
The
The network configuration information input from the
図2は実施の形態1に係るデータ処理装置200の構成を示すブロック図である。図2において、データ処理装置200は、圧縮データを復号して得られるニューラルネットワークを用いて入力データを処理し、処理結果を出力する。処理結果には、データ処理装置100と同様に、入力データの分類結果または回帰分析結果がある。
データ処理装置200は、圧縮データから、量子化情報およびネットワーク構成情報を復号するデコーダとして機能し、復号部201およびデータ処理部202を備える。
FIG. 2 is a block diagram showing the configuration of the
復号部201は、前述したように符号化部103によって符号化された圧縮データから量子化情報およびネットワーク構成情報を復号する。
復号部201によって復号されたネットワーク構成情報には、エンコーダであるデータ処理装置100側の学習結果によって最適化されたエッジの重み情報などのパラメータデータを量子化した結果(量子化値k)が含まれている。
復号部201によって復号された量子化情報には、パラメータデータを量子化するときの量子化ステップQが定義されている。上記パラメータデータを量子化した結果kと上記量子化ステップQから、上記式(2)に従って、量子化済みパラメータyが復号される。これらの復号結果は、復号部201からデータ処理部202に出力される。
Decoding
The network configuration information decoded by the
The quantization information decoded by the
データ処理部202は、ニューラルネットワークを用いて入力データを処理する。
また、データ処理部202は、復号部201によって圧縮データから復号された量子化情報およびネットワーク構成情報を用いて、パラメータデータであるエッジの重み情報を逆量子化する。さらに、データ処理部202は、逆量子化したパラメータデータを含んだネットワーク構成情報を用いて、ニューラルネットワークを構成する。
The
The
このように、データ処理部202は、圧縮データから復号された情報を用いて、データ処理装置100側の学習結果によって最適化されたエッジの重み情報などのパラメータデータを含んだニューラルネットワークを構成し、このニューラルネットワークを用いて入力データを処理する。これにより、データ処理装置100とデータ処理装置200とで、最適化されたパラメータデータの圧縮サイズを一定にすることができ、パラメータデータの高圧縮を実現することができる。
In this way, the
図3Aは、データ処理装置100の機能を実現するハードウェア構成を示すブロック図である。図3Aにおいて、処理回路300は、データ処理装置100として機能する専用の回路である。図3Bは、データ処理装置100の機能を実現するソフトウェアを実行するハードウェア構成を示すブロック図である。図3Bにおいて、プロセッサ301およびメモリ302は、信号バスによって互いに接続されている。
FIG. 3A is a block diagram showing a hardware configuration that implements the functions of the
データ処理装置100における、データ処理部101、圧縮制御部102および符号化部103のそれぞれの機能は、処理回路によって実現される。
すなわち、データ処理装置100は、図4を用いて後述するステップST1からステップST3までの処理を実行するための処理回路を備える。
処理回路は、専用のハードウェアであってもよいが、メモリに記憶されたプログラムを実行するCPU(Central Processing Unit)であってもよい。
The functions of the
That is, the
The processing circuit may be dedicated hardware, or may be a CPU (Central Processing Unit) that executes a program stored in memory.
上記処理回路が図3Aに示す専用のハードウェアである場合、処理回路300は、例えば、単一回路、複合回路、プログラム化したプロセッサ、並列プログラム化したプロセッサ、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)またはこれらを組み合わせたものが該当する。
なお、データ処理部101、圧縮制御部102および符号化部103のそれぞれの機能を別々の処理回路で実現してもよいし、これらの機能をまとめて1つの処理回路で実現してもよい。
If the processing circuit is the dedicated hardware shown in FIG. 3A, the
The functions of the
上記処理回路が図3Bに示すプロセッサである場合、データ処理部101、圧縮制御部102および符号化部103のそれぞれの機能は、ソフトウェア、ファームウェアまたはソフトウェアとファームウェアとの組み合わせによって実現される。
ソフトウェアまたはファームウェアは、プログラムとして記述されて、メモリ302に記憶される。
プロセッサ301は、メモリ302に記憶されたプログラムを読み出して実行することによってデータ処理部101、圧縮制御部102および符号化部103のそれぞれの機能を実現する。すなわち、データ処理装置100は、プロセッサ301によって実行されるときに、図4に示すステップST1からステップST3までの処理が結果的に実行されるプログラムを記憶するためのメモリ302を備える。
これらのプログラムは、データ処理部101、圧縮制御部102および符号化部103の手順または方法をコンピュータに実行させるものである。
メモリ302は、コンピュータを、データ処理部101、圧縮制御部102および符号化部103として機能させるためのプログラムが記憶されたコンピュータ可読記憶媒体であってもよい。
When the processing circuit is the processor shown in FIG. 3B, the functions of the
Software or firmware is written as a program and stored in
The
These programs cause the computer to execute the procedures or methods of the
The
メモリ302には、例えば、RAM(Random Access Memory)、ROM(Read Only Memory)、フラッシュメモリ、EPROM(Erasable Programmable Read Only Memory)、EEPROM(Electrically-EPROM)などの不揮発性または揮発性の半導体メモリ、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ミニディスク、DVDなどが該当する。
The
なお、データ処理部101、圧縮制御部102および符号化部103のそれぞれの機能について、一部を専用のハードウェアで実現し、一部をソフトウェアまたはファームウェアで実現してもよい。
例えば、データ処理部101については、専用のハードウェアとしての処理回路でその機能を実現し、圧縮制御部102および符号化部103については、プロセッサ301がメモリ302に記憶されたプログラムを読み出して実行することによってその機能を実現してもよい。
このように、処理回路は、ハードウェア、ソフトウェア、ファームウェアまたはこれらの組み合わせによって上記機能のそれぞれを実現することができる。
The functions of the
For example, the function of the
As such, the processing circuitry may implement each of the above functions through hardware, software, firmware, or a combination thereof.
なお、データ処理装置100について説明したが、データ処理装置200においても、同様である。例えば、データ処理装置200は、図5を用いて後述するステップST1aからステップST4aまでの処理を実行するための処理回路を備える。この処理回路は、専用のハードウェアであってもよいが、メモリに記憶されたプログラムを実行するCPUであってもよい。
Although the
上記処理回路が図3Aに示す専用のハードウェアであれば、処理回路300は、例えば、単一回路、複合回路、プログラム化したプロセッサ、並列プログラム化したプロセッサ、ASIC、FPGAまたはこれらを組み合わせたものが該当する。
なお、復号部201およびデータ処理部202のそれぞれの機能を、別々の処理回路で実現してもよいし、これらの機能をまとめて1つの処理回路で実現してもよい。
If the processing circuitry is dedicated hardware as shown in FIG. 3A, processing
The functions of the
上記処理回路が図3Bに示すプロセッサであると、復号部201およびデータ処理部202のそれぞれの機能は、ソフトウェア、ファームウェアまたはソフトウェアとファームウェアとの組み合わせによって実現される。
ソフトウェアまたはファームウェアは、プログラムとして記述されて、メモリ302に記憶される。
プロセッサ301は、メモリ302に記憶されたプログラムを読み出して実行することによって、復号部201およびデータ処理部202のそれぞれの機能を実現する。
すなわち、データ処理装置200は、プロセッサ301によって実行されるときに、図5に示すステップST1aからステップST4aまでの処理が結果的に実行されるプログラムを記憶するためのメモリ302を備える。
これらのプログラムは、復号部201およびデータ処理部202の手順または方法を、コンピュータに実行させるものである。
メモリ302は、コンピュータを、復号部201およびデータ処理部202として機能させるためのプログラムが記憶されたコンピュータ可読記憶媒体であってもよい。
If the processing circuit is the processor shown in FIG. 3B, the functions of the
Software or firmware is written as a program and stored in
The
That is,
These programs cause the computer to execute the procedures or methods of the
The
なお、復号部201およびデータ処理部202のそれぞれの機能について、一部を専用のハードウェアで実現し、一部をソフトウェアまたはファームウェアで実現してもよい。
例えば、復号部201については、専用のハードウェアとしての処理回路でその機能を実現し、データ処理部202については、プロセッサ301がメモリ302に記憶されたプログラムを読み出して実行することによってその機能を実現してもよい。
Note that the functions of the
For example, the function of the
次に動作について説明する。
図4は、データ処理装置100の動作を示すフローチャートである。
以下では、ニューラルネットワークのパラメータデータがエッジの重み情報である場合を説明する。
圧縮制御部102は、学習済みのニューラルネットワークを構成する複数のエッジのそれぞれの重み情報を量子化するときの量子化ステップを決定して、量子化ステップが定義された量子化情報を生成する(ステップST1)。量子化情報は、圧縮制御部102からデータ処理部101および符号化部103に出力される。
Next, the operation will be explained.
FIG. 4 is a flow chart showing the operation of the
A case where the parameter data of the neural network is edge weight information will be described below.
The
データ処理部101は、圧縮制御部102から量子化情報を入力すると、量子化情報における量子化ステップで、上記ニューラルネットワークのエッジの重み情報を量子化する(ステップST2)。データ処理部101は、量子化したエッジの重み情報を含むネットワーク構成情報を生成して符号化部103に出力する。
When the
符号化部103は、データ処理部101から入力した上記ネットワーク構成情報と圧縮制御部102から入力した上記量子化情報とを符号化する(ステップST3)。
符号化部103によって符号化された上記ネットワーク構成情報および上記量子化情報の圧縮データは、データ処理装置200に出力される。
The compressed data of the network configuration information and the quantization information encoded by the
図5は、データ処理装置200の動作を示すフローチャートである。
復号部201は、符号化部103によって符号化された上記圧縮データから量子化情報およびネットワーク構成情報を復号する(ステップST1a)。量子化情報およびネットワーク構成情報は、復号部201からデータ処理部202に出力される。
FIG. 5 is a flow chart showing the operation of the
Decoding
次に、データ処理部202は、復号部201によって圧縮データから復号された量子化情報とネットワーク構成情報とを用いて、逆量子化されたエッジの重み情報を算出する(ステップST2a)。
Next, the
続いて、データ処理部202は、逆量子化したエッジの重み情報を含んだネットワーク構成情報を用いて、ニューラルネットワークを構成する(ステップST3a)。
これにより、データ処理装置200は、データ処理装置100で学習済みのニューラルネットワークを構成することができる。
Subsequently, the
Thereby, the
データ処理部202は、ステップST3aで構成したニューラルネットワークを用いて入力データを処理する(ステップST4a)。
The
図6は、実施の形態1におけるニューラルネットワークの構成例を示す図である。
図6に示すニューラルネットワークでは、入力データ(x1,x2,・・・,xN1)がそれぞれの層で処理されて、処理結果(y1,・・・,yNL)が出力される。
図6において、Nl(l=1,2,・・・,L)は、l層目のレイヤのノード数を示しており、Lは、ニューラルネットワークのレイヤ数を示している。
ニューラルネットワークは、図6に示すように、入力層、隠れ層および出力層を有しており、これらの層のそれぞれには、複数のノードがエッジで繋がれた構造になっている。
複数のノードのそれぞれの出力値は、エッジによって繋がれた前の層のノードの出力値と、エッジの重み情報、および、層ごとに設定されている活性化関数から算出することができる。
6 is a diagram illustrating a configuration example of a neural network according to
In the neural network shown in FIG. 6, input data (x 1 , x 2 , . . . , x N1 ) are processed in each layer, and processing results (y 1 , . .
In FIG. 6, N l (l=1, 2, . . . , L) indicates the number of nodes in the l-th layer, and L indicates the number of layers of the neural network.
A neural network, as shown in FIG. 6, has an input layer, a hidden layer and an output layer, and each of these layers has a structure in which a plurality of nodes are connected by edges.
The output value of each of the plurality of nodes can be calculated from the output value of the node in the previous layer connected by the edge, the weight information of the edge, and the activation function set for each layer.
ニューラルネットワークの例として、CNN(Convolutional Neural Network)がある。CNNの隠れ層には、畳み込み層(Convolutional layer)とプーリング層(Pooling layer)とが交互に繋がっており、最終的な出力に合わせて全結合のニューラルネットワーク層(全結合層;Fully-connected layer)が設けられている。畳み込み層の活性化関数には、例えば、ReLU関数が用いられる。
なお、DNN(Deep Neural Network)と呼ばれるネットワーク(ディープラーニング、DCNN(Deep CNN)などとも呼ばれる)は、CNNのレイヤ数を多層化したものである。
An example of a neural network is a CNN (Convolutional Neural Network). In the hidden layer of CNN, a convolutional layer and a pooling layer are alternately connected, and a fully-connected neural network layer (fully-connected layer) is added according to the final output. ) is provided. A ReLU function, for example, is used as the activation function of the convolutional layer.
Note that a network called a DNN (Deep Neural Network) (also called deep learning, DCNN (Deep CNN), etc.) is a multi-layered CNN.
図7は、実施の形態1における1次元データの畳み込み処理の例を示す図であり、1次元データの畳み込み処理を行う畳み込み層を示している。1次元データには、例えば、音声データ、時系列データがある。
図7に示す畳み込み層は、前層に9つのノード10-1~10-9、次層に3つのノード11-1~11-3を備えている。
エッジ12-1,12-6,12-11には同じ重みが付与されており、エッジ12-2,12-7,12-12には同じ重みが付与されており、エッジ12-3,12-8,12-13には同じ重みが付与されており、エッジ12-4,12-9,12-14には同じ重みが付与されており、エッジ12-5,12-10,12-15には同じ重みが付与されている。また、エッジ12-1から12-5までの重みは全て異なる値となる場合もあるし、複数の重みが同じ値となる場合もある。
FIG. 7 is a diagram showing an example of one-dimensional data convolution processing according to
The convolutional layer shown in FIG. 7 has nine nodes 10-1 to 10-9 in the previous layer and three nodes 11-1 to 11-3 in the next layer.
The same weight is given to the edges 12-1, 12-6 and 12-11, the same weight is given to the edges 12-2, 12-7 and 12-12, and the edges 12-3 and 12-12 are given the same weight. -8, 12-13 are given the same weight, edges 12-4, 12-9, 12-14 are given the same weight, edges 12-5, 12-10, 12-15 are given the same weight. Further, the weights of edges 12-1 to 12-5 may all have different values, or a plurality of weights may have the same value.
前層の9つのノード10-1~10-9のうち、5つのノードが、上記の重みで次層の1つのノードに繋がっている。カーネルサイズKは5であり、カーネルは、これらの重みの組み合わせによって規定される。
例えば、図7に示すように、ノード10-1は、エッジ12-1を介してノード11-1に繋がり、ノード10-2は、エッジ12-2を介してノード11-1に繋がり、ノード10-3は、エッジ12-3を介してノード11-1に繋がり、ノード10-4は、エッジ12-4を介してノード11-1に繋がり、ノード10-5は、エッジ12-5を介してノード11-1に繋がっている。カーネルは、エッジ12-1~12-5の重みの組み合わせによって規定される。
Of the nine nodes 10-1 to 10-9 in the previous layer, five nodes are connected to one node in the next layer with the above weights. The kernel size K is 5 and the kernel is defined by the combination of these weights.
For example, as shown in FIG. 7, node 10-1 connects to node 11-1 via edge 12-1, node 10-2 connects to node 11-1 via edge 12-2, and node 10-3 connects to node 11-1 via edge 12-3, node 10-4 connects to node 11-1 via edge 12-4, and node 10-5 connects to edge 12-5. It is connected to the node 11-1 through the A kernel is defined by a combination of weights of edges 12-1 to 12-5.
ノード10-3は、エッジ12-6を介してノード11-2に繋がり、ノード10-4は、エッジ12-7を介してノード11-2に繋がり、ノード10-5は、エッジ12-8を介してノード11-2に繋がり、ノード10-6は、エッジ12-9を介してノード11-2に繋がり、ノード10-7は、エッジ12-10を介してノード11-2に繋がっている。カーネルは、エッジ12-6~12-10の重みの組み合わせによって規定される。
ノード10-5は、エッジ12-11を介してノード11-3に繋がり、ノード10-6は、エッジ12-12を介してノード11-3に繋がり、ノード10-7は、エッジ12-13を介してノード11-3に繋がり、ノード10-8は、エッジ12-14を介してノード11-3に繋がり、ノード10-9は、エッジ12-15を介してノード11-3に繋がっている。カーネルは、エッジ12-11~12-15の重みの組み合わせによって規定される。
Node 10-3 connects to node 11-2 via edge 12-6, node 10-4 connects to node 11-2 via edge 12-7, node 10-5 connects to edge 12-8. , the node 10-6 is connected to the node 11-2 via the edge 12-9, and the node 10-7 is connected to the node 11-2 via the edge 12-10. there is A kernel is defined by a combination of weights of edges 12-6 through 12-10.
Node 10-5 connects to node 11-3 via edge 12-11, node 10-6 connects to node 11-3 via edge 12-12, node 10-7 connects to edge 12-13. , the node 10-8 is connected to the node 11-3 via an edge 12-14, and the node 10-9 is connected to the node 11-3 via an edge 12-15. there is A kernel is defined by a combination of weights of edges 12-11 to 12-15.
データ処理部101またはデータ処理部202は、CNNを用いた入力データの処理において、畳み込み層のエッジの重みの組み合わせを用いて、カーネルごとにステップ数S(図7では、S=2)の間隔で畳み込み演算を実施する。エッジの重みの組み合わせは、カーネルごとに学習によって決定される。
なお、画像認識用途のCNNでは、複数のカーネルを有する畳み込み層でネットワークが構成されることが多い。
In the processing of input data using CNN, the
Note that in CNNs for image recognition, networks are often configured with convolution layers having a plurality of kernels.
図8は、実施の形態1における2次元データの畳み込み処理の例を示す図であり、画像データといった2次元データの畳み込み処理を示している。
図8に示す2次元データのうち、カーネル20は、x方向のサイズがKx、y方向のサイズがKyのブロック領域である。カーネルサイズKは、K=Kx×Kyである。
データ処理部101またはデータ処理部202は、2次元データにおいて、x方向ステップ数Sxの間隔およびy方向ステップ数Syの間隔で、カーネル20ごとのデータの畳み込み演算を実施する。ここで、ステップSx,Syは1以上の整数である。
FIG. 8 is a diagram showing an example of convolution processing of two-dimensional data according to
Among the two-dimensional data shown in FIG. 8, the
The
図9は、ニューラルネットワークの全結合層であるl(l=1,2,・・・,L)層目のレイヤにおけるノードごとのエッジの重み情報のマトリクスを示す図である。
図10は、ニューラルネットワークの全結合層であるl(l=1,2,・・・,L)層目のレイヤにおけるノードごとのエッジの重み情報の量子化ステップのマトリクスを示す図である。
FIG. 9 is a diagram showing a matrix of edge weight information for each node in the l-th layer (l=1, 2, . . . , L), which is a fully connected layer of the neural network.
FIG. 10 is a diagram showing a matrix of quantization steps of edge weight information for each node in the l-th layer (l=1, 2, . . . , L) which is a fully connected layer of the neural network.
ニューラルネットワークにおいては、図9に示すレイヤごとの重みwijの組み合わせが、ネットワークを構成するデータとなる。このため、DNNのような多層のニューラルネットワークでは、一般的に数百Mbyte以上のデータ量となり、大きなメモリサイズも必要となる。なお、iは、ノードインデックスであり、i=1,2,・・・,Nlである。jは、エッジインデックスであり、j=1,2,・・・,Nl-1である。 In a neural network, a combination of weights w ij for each layer shown in FIG. 9 constitutes data constituting the network. Therefore, in a multilayer neural network such as a DNN, the amount of data is generally several hundred Mbytes or more, and a large memory size is also required. Note that i is a node index, i=1, 2, . . . , Nl . j is the edge index, j=1, 2, . . . , N l-1 .
そこで、実施の形態1に係るデータ処理装置100では、エッジの重み情報のデータ量を削減するため、重み情報を量子化する。図10に示すように、量子化ステップqijは、エッジの重みwijごとに設定される。
さらに、量子化ステップは、複数のノードインデックスまたは複数のエッジインデックス、あるいは複数のノードインデックスとエッジインデックスで共通化してもよい。このようにすることで、符号化すべき量子化情報を削減することができる。
Therefore, in the
Furthermore, the quantization step may be common to multiple node indexes or multiple edge indexes, or multiple node indexes and edge indexes. By doing so, the quantization information to be encoded can be reduced.
図11は、畳み込み層におけるエッジの重み情報のマトリクスを示す図である。
図12は、畳み込み層におけるエッジの重み情報の量子化ステップのマトリクスを示す図である。畳み込み層では、1つのカーネルに対するエッジの重みは全てのノードで共通であり、ノード一つ当たりに結合するエッジ数、すなわちカーネルサイズKを小さくしてカーネルを小領域とすることができる。
FIG. 11 is a diagram showing a matrix of edge weight information in a convolutional layer.
FIG. 12 is a diagram showing a matrix of quantization steps of edge weight information in a convolutional layer. In the convolution layer, edge weights for one kernel are common to all nodes, and the kernel can be made into a small region by reducing the number of edges connected per node, that is, the kernel size K.
図11は、エッジの重みwi’j’をカーネルごとに設定したデータであり、図12は、量子化ステップqi’j’をカーネルごとに設定したデータである。
なお、i’は、カーネルインデックスであり、i’=1,2,・・・,Ml(l=1,2,・・・,L)である。j’は、エッジインデックスであり、j’=1,2,・・・,Klである。
さらに、量子化ステップは、複数のカーネルインデックスまたは複数のエッジインデックス、あるいは複数のカーネルインデックスとエッジインデックスで共通化してもよい。このようにすることで符号化すべき量子化情報を削減することができる。
FIG. 11 shows data in which the edge weight w i′j′ is set for each kernel, and FIG. 12 shows data in which the quantization step q i′j′ is set for each kernel.
Note that i' is a kernel index and i'=1, 2, ..., Ml (l = 1, 2, ..., L). j' is an edge index, j'=1, 2, . . . , Kl .
Furthermore, the quantization step may be common to multiple kernel indices or multiple edge indices, or multiple kernel indices and edge indices. By doing so, the quantization information to be encoded can be reduced.
圧縮制御部102は、図4のステップST1において、データ処理部101による重みの量子化処理に用いる量子化ステップを決定し、量子化情報としてデータ処理部101に出力する。量子化ステップは、図10に示した量子化ステップqijおよび図12に示した量子化ステップqi’j’である。
In step ST1 in FIG. 4,
データ処理部101は、図4のステップST2において、図10に示した量子化ステップqijで、図9に示したエッジの重みwijを量子化し、量子化された重みwijを含むネットワーク構成情報を符号化部103に出力する。
同様に、データ処理部101は、図4のステップST2において、図12に示した量子化ステップqi’j’で、図11に示したエッジの重みwi’j’を量子化して、量子化された重みwi’j’を含むネットワーク構成情報を符号化部103に出力する。
なお、ネットワーク構成情報には、量子化された重み以外に、ネットワークのレイヤ数、レイヤごとのノード数、ノード間を繋ぐエッジ、エッジごとに付与された重み情報、ノードの出力を表す活性化関数、層ごとの種別情報(畳み込み層、プーリング層、全結合層)等が含まれる。ただし、データ処理装置100とデータ処理装置200との間で予め固定(定義)している情報については、符号化するネットワーク構成情報に含まない。
In step ST2 in FIG. 4,
Similarly, in step ST2 of FIG. 4,
In addition to the quantized weights, the network configuration information includes the number of network layers, the number of nodes in each layer, edges connecting nodes, weight information assigned to each edge, and an activation function representing the output of a node. , type information for each layer (convolutional layer, pooling layer, fully connected layer), etc. are included. However, the information fixed (defined) in advance between the
図13は、実施の形態1における量子化情報を構成する情報のシンタックスを示す図である。
図14は、実施の形態1における量子化情報を構成する情報のマトリクス単位のシンタックスを示す図である。
図15は、実施の形態1における量子化情報を構成する情報のレイヤ単位のシンタックスを示す図である。
13 is a diagram showing syntax of information forming quantization information according to
FIG. 14 is a diagram showing a syntax for each matrix of information constituting quantized information according to
FIG. 15 is a diagram showing a layer-by-layer syntax of information constituting quantization information according to the first embodiment.
図13において、フラグquant_enable_flag、フラグlayer_adaptive_quant_flag、フラグmatrix_adaptive_quant_flag、および量子化ステップfixed_quant_stepは、符号化部103によって符号化される量子化情報の符号化パラメータである。
また、Lはレイヤ数である。
In FIG. 13 , a flag quant_enable_flag, a flag layer_adaptive_quant_flag, a flag matrix_adaptive_quant_flag, and a quantization step fixed_quant_step are encoding parameters of quantization information encoded by the
Also, L is the number of layers.
図14において、量子化ステップbase_quant_step[j]、フラグprev_quant_copy_flag[i-1]、および差分値diff_quant_value[i-1][j]は、符号化部103によって符号化される量子化情報の符号化パラメータである。
また、Cは、ノード数Nlayer_idまたはカーネル数Mlayer_idである。さらに、Eは、エッジ数Nlayer_id-1またはカーネルサイズKlayer_idである。
14, quantization step base_quant_step[j], flag prev_quant_copy_flag[i−1], and difference value diff_quant_value[i−1][j] are encoding parameters of quantization information encoded by encoding
Also, C is the number of nodes N layer_id or the number of kernels M layer_id . Furthermore, E is the number of edges N layer_id−1 or the kernel size K layer_id .
図15において、量子化ステップbase_layer_quant_step、フラグlayer_quant_copy_flag[i-2]、および量子化ステップlayer_quant_step[i-2]は、符号化部103によって符号化される量子化情報の符号化パラメータである。また、Lはレイヤ数である。
In FIG. 15 , quantization step base_layer_quant_step, flag layer_quant_copy_flag[i−2], and quantization step layer_quant_step[i−2] are encoding parameters of quantization information encoded by encoding
図13に示す情報には、ネットワークにおけるエッジの重み情報の量子化の有無が設定されるフラグquant_enable_flagが含まれている。
フラグquant_enable_flagが0(偽)である場合は、ネットワークにおける全てのエッジの重み情報が量子化されない。すなわち、量子化ステップが量子化情報に設定されない。
一方、フラグquant_enable_flagが1(真)である場合、圧縮制御部102は、フラグlayer_adaptive_quant_flagを参照する。
The information shown in FIG. 13 includes a flag quant_enable_flag for setting whether or not to quantize edge weight information in the network.
If the flag quant_enable_flag is 0 (false), weight information of all edges in the network is not quantized. That is, the quantization step is not set in the quantization information.
On the other hand, when the flag quant_enable_flag is 1 (true), the
圧縮制御部102は、フラグlayer_adaptive_quant_flagが0(偽)である場合、ネットワークにおける全てのエッジに共通した量子化ステップfixed_quant_stepを、量子化情報に設定する。
フラグlayer_adaptive_quant_flagが1(真)である場合、圧縮制御部102は、フラグmatrix_adaptive_quant_flagを参照する。
When the flag layer_adaptive_quant_flag is 0 (false), the
When the flag layer_adaptive_quant_flag is 1 (true), the
フラグmatrix_adaptive_quant_flagが0(偽)であると、圧縮制御部102は、ネットワークにおける複数のエッジのそれぞれの重み情報の量子化ステップとして、レイヤ単位で共通した量子化ステップを決定する。
ただし、入力層(1層目)はエッジを持たないため、量子化ステップは設定されない。
なお、図15は、レイヤ単位で共通した量子化ステップに関するシンタックスを示している。
When the flag matrix_adaptive_quant_flag is 0 (false), the
However, since the input layer (first layer) does not have edges, no quantization step is set.
Note that FIG. 15 shows the syntax regarding the quantization steps common to each layer.
フラグmatrix_adaptive_quant_flagが1(真)であると、圧縮制御部102は、ネットワークにおける複数のエッジのそれぞれの重み情報の量子化ステップとして、図10に示した量子化ステップまたは図12に示した量子化ステップを決定する。図14は、図10または図12に示した量子化ステップのシンタックスを示している。
When the flag matrix_adaptive_quant_flag is 1 (true), the
図14に示すシンタックスについて説明する。
前述したように、入力層(1層目)はエッジを持たない。
このため、ID情報layer_idが1からL-1までのlayer_id+1層目のレイヤが、量子化ステップの設定対象となる。
まず、圧縮制御部102は、layer_id+1層目のレイヤにおいて、図10に示した1番目のノード(図12では、1番目のカーネル)の量子化ステップを示すbase_quant_step[j](j=0,1,・・・,E-1)を設定する。
なお、Eは、エッジ数Nlayer_idまたはカーネルサイズKlayer_id+1である。
The syntax shown in FIG. 14 will be described.
As mentioned above, the input layer (first layer) does not have edges.
Therefore, the layer whose ID information layer_id is from 1 to L−1 (layer_id+1) becomes the target of setting the quantization step.
First,
Note that E is the number of edges N layer_id or the kernel size K layer_id+1 .
次に、圧縮制御部102は、2番目以降(i≧1)のノード(またはカーネル)について、ノード(またはカーネル)単位に、1つ前のインデックスのノード(またはカーネル)と量子化ステップが同じであるか否かを示すフラグprev_quant_copy_flag[i-1]を参照する。
フラグprev_quant_copy_flag[i-1]が1(真)である場合、i+1番目のノード(またはカーネル)は、i番目のノード(またはカーネル)と量子化ステップが同じである。
一方、フラグprev_quant_copy_flag[i-1]が0(偽)である場合、圧縮制御部102は、i+1番目のノード(またはカーネル)の量子化ステップを生成する情報として、差分値diff_quant_value[i-1][j](i=1,2,・・・,C-1、j=0,1,・・・,E-1)を設定する。
Next, the
If the flag prev_quant_copy_flag[i−1] is 1 (true), the i+1 th node (or kernel) has the same quantization step as the i th node (or kernel).
On the other hand, when the flag prev_quant_copy_flag[i−1] is 0 (false), the
量子化ステップは、差分値diff_quant_value[i-1][j]に対して1つ前のノード(またはカーネル)に設定された量子化ステップを加算して生成することができる。
すなわち、2番目(i=1)のノード(またはカーネル)では、base_quant_step[j]+diff_quant_value[0][j]が量子化ステップとなる。3番目以降(i≧2)のノード(またはカーネル)は、diff_quant_value[i-2][j]+diff_quant_value[i-1][j]が量子化ステップとなる。
The quantization step can be generated by adding the quantization step set in the previous node (or kernel) to the difference value diff_quant_value[i−1][j].
That is, at the second (i=1) node (or kernel), the quantization step is base_quant_step[j]+diff_quant_value[0][j]. For the third and subsequent (i≧2) nodes (or kernels), the quantization step is diff_quant_value[i−2][j]+diff_quant_value[i−1][j].
なお、符号化パラメータとしてノード(またはカーネル)間での量子化ステップの差分値diff_quant_value[i-1][j]を示したが、ノード(またはカーネル)単位に独立の量子化ステップを設定してもよい。
ノード(またはカーネル)間の量子化ステップの相関が低い傾向にある場合、このように構成する方が、符号化部103での符号化効率が高くなる。
Although the difference value diff_quant_value[i−1][j] of quantization steps between nodes (or kernels) is shown as an encoding parameter, an independent quantization step is set for each node (or kernel). good too.
When the correlation of quantization steps between nodes (or kernels) tends to be low, this configuration increases the encoding efficiency in
図15に示すシンタックスについて説明する。
前述したように、入力層(1層目)はエッジを持たない。
そこで、圧縮制御部102は、2層目のレイヤにおける全てのエッジの重み情報に共通の量子化ステップとして、base_layer_quant_stepを設定する。
次に、圧縮制御部102は、3層目以降(i≧2)のレイヤについて、i+1層目のレイヤにおける全てのエッジの重み情報に共通の量子化ステップが、i層目のレイヤにおける全てのエッジの重み情報に共通の量子化ステップと同一であるか否かを示すフラグlayer_quant_copy_flag[i-2](i=2,3,・・・,L-1)を参照する。
The syntax shown in FIG. 15 will be described.
As mentioned above, the input layer (first layer) does not have edges.
Therefore, the
Next, for the third and subsequent layers (i≧2),
フラグlayer_quant_copy_flag[i-2]が1(真)であれば、圧縮制御部102は、i+1層目における全てのエッジの重み情報に共通の量子化ステップを、i層目のレイヤにおける全てのエッジの重み情報に共通の量子化ステップと同一とする。一方、フラグlayer_quant_copy_flag[i-2]が0(偽)であれば、圧縮制御部102は、i+1層目における全てのエッジの重み情報に共通の量子化ステップとして、layer_quant_step[i-2]を設定する。
If the flag layer_quant_copy_flag[i−2] is 1 (true), the
なお、圧縮制御部102が、レイヤ単位に独立した量子化ステップとしてlayer_quant_step[i-2]を定義する場合を示したが、1つ前のレイヤ(i層目のレイヤ)の量子化ステップとの差分値としてlayer_quant_step[i-2]を定義してもよい。差分値とすることで0近傍の差分値が多く発生するので、符号化部103での符号化効率を高めることができる。
Although
符号化部103は、図13から図15までにおける符号化パラメータを、量子化情報として符号化して圧縮データを生成する。
なお、量子化ステップの最小切り替え単位をエッジ単位としたが、図10に示すようにノード単位(図12では、カーネル単位)を、量子化ステップの最小切り替え単位としてもよい。これは、図14においてE=1とすることと同意である。この場合、量子化ステップは、ノード単位(図12では、カーネル単位)に独立に符号化してもよい。
The
Although the edge unit is used as the minimum switching unit of the quantization step, the node unit (the kernel unit in FIG. 12) may be used as the minimum switching unit of the quantization step as shown in FIG. This is the same as setting E=1 in FIG. In this case, the quantization step may be encoded independently in node units (kernel units in FIG. 12).
また、量子化ステップの最小切り替え単位は、レイヤ単位であってもよい。
これは、図13においてフラグlayer_adaptive_quant_flag=1(真)である場合に、フラグmatrix_adaptive_quant_flagなしに、常にlayer_quant_coding()のみを実行することと同意である。このように量子化ステップの最小切り替え単位を、エッジ単位よりも大きくすることで、符号化前の量子化情報のデータサイズを削減することができる。
Also, the minimum switching unit of the quantization step may be a layer unit.
This is equivalent to always doing only layer_quant_coding( ) without the flag matrix_adaptive_quant_flag when the flag layer_adaptive_quant_flag=1 (true) in FIG. By making the minimum switching unit of the quantization step larger than the edge unit in this way, the data size of the quantization information before encoding can be reduced.
以上のように、実施の形態1に係るデータ処理装置100において、データ処理部101が、ニューラルネットワークを用いて入力データを処理する。圧縮制御部102が、量子化ステップを決定し、量子化ステップが定義された量子化情報を生成する。符号化部103が、圧縮制御部102によって決定された量子化ステップで量子化されたパラメータデータを含むネットワーク構成情報と量子化情報とを符号化して圧縮データを生成する。
特に、上記では、ニューラルネットワークのパラメータデータとしてニューラルネットワークにおけるノード間を結合するエッジに付与された重み情報を扱う例について説明した。これらの構成を有することで、量子化ステップが定義された量子化情報と量子化情報における量子化ステップで量子化されたパラメータデータを含むネットワーク構成情報とが圧縮データに符号化される。これにより、ニューラルネットワークのパラメータデータを高圧縮することができる。
また、圧縮データから復号された量子化情報およびネットワーク構成情報を用いることで、符号化側で最適化されたニューラルネットワークを復号側で構成することができる。
As described above, in the
In particular, in the above description, an example of handling weight information given to edges connecting nodes in a neural network as parameter data of the neural network has been described. With these configurations, quantization information defining a quantization step and network configuration information including parameter data quantized by the quantization step in the quantization information are encoded into compressed data. Thereby, the parameter data of the neural network can be highly compressed.
Also, by using quantization information and network configuration information decoded from compressed data, a neural network optimized on the encoding side can be configured on the decoding side.
実施の形態1に係るデータ処理装置200において、データ処理部202が、ニューラルネットワークを用いて入力データを処理する。復号部201が圧縮データを復号する。
この構成において、データ処理部202が、復号部201によって圧縮データから復号された量子化情報およびネットワーク構成情報を用いてパラメータデータを逆量子化し、逆量子化したパラメータデータを含むネットワーク構成情報を用いてニューラルネットワークを構成する。
これにより、圧縮データから復号した量子化情報およびネットワーク構成情報を用いて符号化側で最適化されたニューラルネットワークを構成することができる。
In the
In this configuration, the
As a result, a neural network optimized on the encoding side can be constructed using the quantization information and network configuration information decoded from compressed data.
実施の形態1に係るデータ処理装置100において、圧縮制御部102が、エッジごとに量子化ステップを切り替える。符号化部103は、エッジごとの量子化ステップが定義された量子化情報を符号化する。このように構成することで、パラメータデータを高精度に量子化することができる。
In
実施の形態1に係るデータ処理装置100において、圧縮制御部102が、ノードごとまたはカーネルごとに量子化ステップを切り替える。符号化部103は、ノードごとまたはカーネルごとの量子化ステップが定義された量子化情報を符号化する。
このように構成しても、パラメータデータを高精度に量子化することができる。
In
Even with this configuration, the parameter data can be quantized with high precision.
実施の形態1に係るデータ処理装置100において、圧縮制御部102が、ニューラルネットワークのレイヤごとに量子化ステップを切り替える。符号化部103は、ニューラルネットワークのレイヤごとの量子化ステップが定義された量子化情報を符号化する。
このように構成することで、量子化によるパラメータデータの圧縮率が高まるので、符号化前の重み情報のデータ量を削減することができる。
In
By configuring in this way, the compression rate of the parameter data by quantization is increased, so the data amount of the weight information before encoding can be reduced.
実施の形態2.
実施の形態1では、ニューラルネットの出力結果を直接的にデータ処理結果とする例について述べたが、ニューラルネットの中間レイヤの出力を、下記の参考文献の画像検索(retrieval)またはマッチング(matching)を一例とした画像データおよび音声データに対するデータ処理の特徴量として用い、これを下記の参考文献のように別のデータ処理手法によって最終的なデータ処理結果を得る応用例がある。
例えば、画像検索、マッチング、物体追跡等の画像処理の画像特徴量としてニューラルネットの中間レイヤの出力を用いる場合、従来の上記画像処理で用いられている画像特徴量であるHOG(Histogram of Oriented Gradients)、SIFT(Scale Invariant Feature Transform)、SURF(Speeded Up Robust Features)などに対する画像特徴量の置き換えもしくは追加を行うことで、上記従来の画像特徴量を用いた画像処理と同じ処理フローで画像処理を実現できる。
この場合、データ処理装置100において、ネットワーク構成情報、量子化情報として符号化するのはデータ処理の特徴量とする出力が得られる中間レイヤまでのニューラルネットワークとなる。
さらに、データ処理装置100は上記データ処理の特徴量を用いて画像検索等のデータ処理を行う。データ処理装置200は圧縮データから上記中間レイヤまでのニューラルネットワークを復号し、入力データを入力して得られる出力をデータ処理の特徴量として画像検索等のデータ処理を実施する。
(参考文献)ISO/IEC JTC1/SC29/WG11/m39219, “Improved retrieval and matching with CNN feature for CDVA”, Chengdu, China, Oct.2016.
In the first embodiment, an example in which the output result of the neural network is directly used as the result of data processing has been described. is used as a feature amount for data processing of image data and audio data, and a final data processing result is obtained by another data processing method as in the following references.
For example, when using the output of an intermediate layer of a neural network as an image feature amount for image processing such as image retrieval, matching, and object tracking, HOG (Histogram of Oriented Gradients), which is an image feature amount used in the conventional image processing, is used. ), SIFT (Scale Invariant Feature Transform), SURF (Speeded Up Robust Features), etc., by replacing or adding the image feature amount, image processing can be performed in the same processing flow as the image processing using the conventional image feature amount. realizable.
In this case, in the
Further, the
(Reference) ISO/IEC JTC1/SC29/WG11/m39219, "Improved retrieval and matching with CNN feature for CDVA", Chengdu, China, Oct. 2016.
したがって、実施の形態2に係るデータ処理装置100において量子化によるパラメータデータの圧縮率が高まるので、符号化前の重み情報のデータ量を削減することができる。実施の形態2に係るデータ処理装置200においては、上記データ処理装置100から出力される圧縮データを復号してニューラルネットワークを生成することでデータ処理を実施することができる。
Therefore, in the
なお、本発明は上記実施の形態に限定されるものではなく、本発明の範囲内において、実施の形態の任意の構成要素の変形もしくは実施の形態の任意の構成要素の省略が可能である。 It should be noted that the present invention is not limited to the above-described embodiments, and any constituent elements of the embodiments may be modified or omitted within the scope of the present invention.
この発明に係るデータ処理装置は、ニューラルネットワークのパラメータデータを高圧縮することができるので、例えば、画像認識技術への利用が可能である。 INDUSTRIAL APPLICABILITY A data processing apparatus according to the present invention can highly compress parameter data of a neural network, so that it can be used for image recognition technology, for example.
10-1~10-9,11-1~11-3 ノード、12-1~12-15 エッジ、20 カーネル、100,200 データ処理装置、101,202 データ処理部、102 圧縮制御部、103 符号化部、201 復号部、300 処理回路、301 プロセッサ、302 メモリ。 10-1 to 10-9, 11-1 to 11-3 nodes, 12-1 to 12-15 edges, 20 kernels, 100, 200 data processing units, 101, 202 data processing units, 102 compression control units, 103 codes conversion unit, 201 decoding unit, 300 processing circuit, 301 processor, 302 memory.
Claims (1)
前記量子化ステップで量子化された前記ニューラルネットワークのパラメータデータを含むネットワーク構成情報とが符号化された、圧縮データであって、
前記量子化情報は、
第1のデータ処理装置が、前記ニューラルネットワークのエッジごと、ノードごと、カーネルごとまたはレイヤごとのうち、いずれかを最小切り替え単位として決定した前記量子化ステップが定義されたものであり、
前記ネットワーク構成情報は、
前記第1のデータ処理装置が、前記量子化情報に定義された前記量子化ステップでパラメータデータの量子化を行って算出した量子化パラメータデータを含み、
前記量子化情報および前記ネットワーク構成情報は、
前記第1のデータ処理装置と第2のデータ処理装置との間で一定の圧縮サイズで符号化されており、
前記第2のデータ処理装置が、
符号化された前記量子化情報および前記ネットワーク構成情報を復号し、
前記ニューラルネットワークのエッジごと、ノードごと、カーネルごとまたはレイヤごとのいずれかの最小切り替え単位のうち復号した前記量子化情報が示す前記最小切り替え単位の前記量子化ステップで、復号した前記ネットワーク構成情報に含まれる前記量子化パラメータデータを逆量子化し、
逆量子化した前記量子化パラメータデータを、前記ネットワーク構成情報が示す構成を有した前記ニューラルネットワークの生成に用いる、圧縮データ。 quantization information defining a quantization step, which is a quantization width when quantizing the parameter data of the neural network;
Compressed data encoded with network configuration information including parameter data of the neural network quantized in the quantization step,
The quantization information is
wherein the quantization step is defined by the first data processing device, which is determined as a minimum switching unit of each edge, each node, each kernel, or each layer of the neural network;
The network configuration information is
The first data processing device includes quantized parameter data calculated by quantizing the parameter data at the quantization step defined in the quantization information,
The quantization information and the network configuration information are
encoded with a constant compression size between the first data processing device and the second data processing device;
The second data processing device is
decoding the encoded quantization information and the network configuration information ;
The network configuration decoded in the quantization step of the minimum switching unit indicated by the decoded quantization information among the minimum switching units for each edge , each node, each kernel, or each layer of the neural network. inversely quantizing the quantization parameter data included in the information;
Compressed data using the inversely quantized quantized parameter data to generate the neural network having the configuration indicated by the network configuration information.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020206026A JP7282070B2 (en) | 2020-12-11 | 2020-12-11 | compressed data |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020206026A JP7282070B2 (en) | 2020-12-11 | 2020-12-11 | compressed data |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2019528310A Division JP6903132B2 (en) | 2017-07-07 | 2017-07-07 | Data processing device and data processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2021057066A JP2021057066A (en) | 2021-04-08 |
| JP7282070B2 true JP7282070B2 (en) | 2023-05-26 |
Family
ID=75271055
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2020206026A Active JP7282070B2 (en) | 2020-12-11 | 2020-12-11 | compressed data |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7282070B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP4315165A1 (en) * | 2021-05-10 | 2024-02-07 | Google LLC | Incorporation of decision trees in a neural network |
-
2020
- 2020-12-11 JP JP2020206026A patent/JP7282070B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2021057066A (en) | 2021-04-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6903132B2 (en) | Data processing device and data processing method | |
| JP7679903B2 (en) | Image coding device, probability model generating device, and image decoding device | |
| US12537980B2 (en) | Attention based context modelling for image and video compression | |
| EP3276540B1 (en) | Neural network method and apparatus | |
| Suzuki et al. | Image pre-transformation for recognition-aware image compression | |
| Jiang et al. | Universal golomb–rice coding parameter estimation using deep belief networks for hyperspectral image compression | |
| CN117611896B (en) | A basic model adaptive method for multimodal remote sensing data classification | |
| JP7282070B2 (en) | compressed data | |
| CN116612416A (en) | Method, device and equipment for dividing video target and readable storage medium | |
| EP4036802A1 (en) | Data processing device, data processing system, and data processing method | |
| KR20210131894A (en) | Apparatus and method for compressing trained deep neural networks | |
| Ballé et al. | Good, cheap, and fast: Overfitted image compression with wasserstein distortion | |
| JP7665791B2 (en) | Online training-based encoder tuning in neural image compression | |
| KR102766422B1 (en) | Data processing device, data processing system and data processing method | |
| JP6943295B2 (en) | Learning devices, learning methods, and learning programs | |
| WO2023091513A1 (en) | Neural image compression with controllable spatial bit allocation | |
| Proskura et al. | Classification of compressed multichannel images and its improvement | |
| HK40015144A (en) | Data processing device, data processing method, and storage medium | |
| JP7313515B2 (en) | DATA PROCESSING DEVICE, DATA PROCESSING SYSTEM AND DATA PROCESSING METHOD | |
| HK40015144B (en) | Data processing device, data processing method, and storage medium | |
| JP7184801B2 (en) | LEARNING APPARATUS, LEARNING METHOD, AND LEARNING PROGRAM | |
| WO2019116497A1 (en) | Identification device, identification method, and storage medium | |
| JP2024521021A (en) | Image Processing Method | |
| Rolon et al. | A multi-class structured dictionary learning method using discriminant atom selection | |
| RU2814940C1 (en) | Data processing device, data processing system and data processing method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201211 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210107 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20211130 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220128 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20220419 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220704 |
|
| C60 | Trial request (containing other claim documents, opposition documents) |
Free format text: JAPANESE INTERMEDIATE CODE: C60 Effective date: 20220704 |
|
| A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20220713 |
|
| C21 | Notice of transfer of a case for reconsideration by examiners before appeal proceedings |
Free format text: JAPANESE INTERMEDIATE CODE: C21 Effective date: 20220719 |
|
| A912 | Re-examination (zenchi) completed and case transferred to appeal board |
Free format text: JAPANESE INTERMEDIATE CODE: A912 Effective date: 20220805 |
|
| C211 | Notice of termination of reconsideration by examiners before appeal proceedings |
Free format text: JAPANESE INTERMEDIATE CODE: C211 Effective date: 20220809 |
|
| C22 | Notice of designation (change) of administrative judge |
Free format text: JAPANESE INTERMEDIATE CODE: C22 Effective date: 20221004 |
|
| C22 | Notice of designation (change) of administrative judge |
Free format text: JAPANESE INTERMEDIATE CODE: C22 Effective date: 20221011 |
|
| C22 | Notice of designation (change) of administrative judge |
Free format text: JAPANESE INTERMEDIATE CODE: C22 Effective date: 20221108 |
|
| C13 | Notice of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: C13 Effective date: 20230104 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230303 |
|
| C23 | Notice of termination of proceedings |
Free format text: JAPANESE INTERMEDIATE CODE: C23 Effective date: 20230328 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230516 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7282070 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |