JP2020119518A - Method and device for transforming cnn layers to optimize cnn parameter quantization to be used for mobile devices or compact networks with high precision via hardware optimization - Google Patents

Method and device for transforming cnn layers to optimize cnn parameter quantization to be used for mobile devices or compact networks with high precision via hardware optimization Download PDF

Info

Publication number
JP2020119518A
JP2020119518A JP2019238383A JP2019238383A JP2020119518A JP 2020119518 A JP2020119518 A JP 2020119518A JP 2019238383 A JP2019238383 A JP 2019238383A JP 2019238383 A JP2019238383 A JP 2019238383A JP 2020119518 A JP2020119518 A JP 2020119518A
Authority
JP
Japan
Prior art keywords
value
kth
layer
scaling
convolution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2019238383A
Other languages
Japanese (ja)
Other versions
JP6872264B2 (en
Inventor
ゲヒョン キム
Kye-Hyeon Kim
ゲヒョン キム
ヨンジュン キム
Yong-Jun Kim
ヨンジュン キム
インス キム
Insu Kim
インス キム
ハクギョン キム
Hak Kyoung Kim
ハクギョン キム
ウンヒョン ナム
Woonhyun Nam
ウンヒョン ナム
ソクフン ブ
Sukhoon Boo
ソクフン ブ
ミョンチョル ソン
Myungchul Sung
ミョンチョル ソン
ドンフン ヨ
Donghun Yeo
ドンフン ヨ
ウジュ リュ
Wooju Ryu
ウジュ リュ
テウン ジャン
Taewoong Jang
テウン ジャン
ギョンジュン ジョン
Kyungjoong Jeong
ギョンジュン ジョン
ホンモ ジェ
Hongmo Je
ホンモ ジェ
ホジン ジョ
Hojin Cho
ホジン ジョ
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Stradvision Inc
Original Assignee
Stradvision Inc
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 Stradvision Inc filed Critical Stradvision Inc
Publication of JP2020119518A publication Critical patent/JP2020119518A/en
Application granted granted Critical
Publication of JP6872264B2 publication Critical patent/JP6872264B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4046Scaling of whole images or parts thereof, e.g. expanding or contracting using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/30025Format conversion instructions, e.g. Floating-Point to Integer, decimal conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4084Scaling of whole images or parts thereof, e.g. expanding or contracting in the transform domain, e.g. fast Fourier transform [FFT] domain scaling

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Neurology (AREA)
  • Image Analysis (AREA)
  • Complex Calculations (AREA)

Abstract

To provide a method for transforming CNN layers to flatten values included in at least one feature map in order to properly reflect respective values of specific channels including small values on output values.SOLUTION: A method for transforming convolutional layers of a CNN including m convolutional blocks includes steps of: generating k-th quantization loss values by referring to k-th initial weight values of a k-th initial convolutional layer included in a k-th convolutional block, a (k-1)-th feature map outputted from the (k-1)-th convolutional block, and each of k-th scaling parameters; determining each of k-th optimized scaling parameters by referring to the k-th quantization loss values; generating a k-th scaling layer and a k-th inverse scaling layer by referring to the k-th optimized scaling parameters; and transforming the k-th initial convolutional layer into a k-th integrated convolutional layer by using the k-th scaling layer and the (k-1)-th inverse scaling layer.SELECTED DRAWING: Figure 3b

Description

本発明は、m個のコンボリューションブロックを含むCNNのコンボリューションレイヤを変換する方法において、(a)コンピューティング装置が、スケーリングパラメータを決定するために使用される入力イメージが取得されると、(i)第kコンボリューションブロックに含まれた第k初期コンボリューションレイヤの一つ以上の第k初期重み付け値と、(ii)(ii−1)kが1である場合、前記入力イメージ、(ii−2)kが2からmまでの常数である場合、第(k−1)コンボリューションブロックから出力された前記入力イメージに対応する第(k−1)特徴マップと、(iii)(iii−1)kが1である場合、前記入力イメージに含まれたチャンネルそれぞれに対応する第kスケーリングパラメータそれぞれ、及び(iii−2)kが2からmまでの常数である場合、前記第(k−1)特徴マップに含まれたチャンネルそれぞれに対応する第kスケーリングパラメータそれぞれを参照して、一つ以上の第k量子化ロス値と、を生成する段階(kは1からmまでの常数である);(b)前記コンピューティング装置が、前記第k量子化ロス値を参照して、前記第kスケーリングパラメータのうちで前記第(k−1)特徴マップに含まれた前記チャンネルそれぞれに対応する第k最適スケーリングパラメータそれぞれを決定する段階;(c)前記コンピューティング装置が、前記第k最適スケーリングパラメータを参照して第kスケーリングレイヤ及び第k逆スケーリングレイヤを生成する段階;(d)前記コンピューティング装置が、(i)kが1である場合、前記第kスケーリングレイヤを使用して、前記第k初期コンボリューションレイヤを第k統合コンボリューションレイヤに変換し、(ii)kが2からmまでの常数である場合、前記第kスケーリングレイヤ及び前記第(k−1)逆スケーリングレイヤを使用して前記第k初期コンボリューションレイヤを前記第k統合コンボリューションレイヤに変換する段階;を含むことを特徴とする方法及び装置に関する。 The present invention provides a method for transforming a convolution layer of a CNN containing m convolution blocks, wherein (a) when a computing device obtains an input image used to determine a scaling parameter, i) one or more k-th initial weight values of the k-th initial convolution layer included in the k-th convolution block, and (ii) (ii-1) if k is 1, the input image, (ii) -2) When k is a constant from 2 to m, the (k-1)th feature map corresponding to the input image output from the (k-1)th convolution block, and (iii)(iii- 1) When k is 1, each of the k-th scaling parameters corresponding to each channel included in the input image, and (iii-2) when k is a constant from 2 to m, the (k- 1) A step of generating one or more kth quantization loss values with reference to each kth scaling parameter corresponding to each channel included in the feature map (k is a constant from 1 to m) ); (b) The computing device refers to the kth quantization loss value and corresponds to each of the channels included in the (k-1)th feature map among the kth scaling parameters. Determining each of the kth optimal scaling parameters; (c) the computing device generating the kth scaling layer and the kth inverse scaling layer with reference to the kth optimal scaling parameter; (d) the computing device. And (i) k is 1, the k-th scaling layer is used to transform the k-th initial convolution layer into a k-th integrated convolution layer, and (ii) k is 2 to m. Transforming the k-th initial convolution layer into the k-th integrated convolution layer using the k-th scaling layer and the (k-1)-th inverse scaling layer. And a method and device characterized by the above.

ディープコンボリューションニューラルネットワーク(Deep Convolution Neural Networks;DeepCNN)は、ディープラーニング分野で起きた驚くべき発展の核心である。CNNは文字の認識問題を解決するために90年代にも使用されたが、近年になって機械学習(Machine Learning)分野で広く使用されるようになった。例えば、CNNは2012年にイメージ認識コンテスト(ImageNet Large Scale Visual Recognition Challenge)で他の競争相手に勝って優勝を収めた。その後、CNNは、機械学習分野で非常に有用なツールとして使用されるようになった。 Deep Convolution Neural Networks (Deep CNN) are at the heart of the amazing developments that have taken place in the field of deep learning. CNN was also used in the 90's to solve the problem of character recognition, but in recent years, it has become widely used in the field of machine learning. For example, CNN won the image recognition contest (ImageNet Large Scale Visual Recognition Challenge) in 2012 over other competitors. After that, CNN came to be used as a very useful tool in the field of machine learning.

しかし、ディープラーニングアルゴリズムには、32ビット浮動小数点演算が必要であるという偏見があったため、モバイル装置は、ディープラーニングアルゴリズムを含むプログラムを遂行することができないものとみなされていた。 However, due to the prejudice that deep learning algorithms require 32-bit floating point arithmetic, mobile devices were considered to be incapable of executing programs containing deep learning algorithms.

ところが、32ビット浮動小数点演算より少ないコンピューティング性能が必要な10ビット固定小数点演算がディープラーニングアルゴリズムには十分であるということが一部の実験で証明された。従って、リソースが制限された装置、すなわちモバイル装置において、ディープラーニングアルゴリズムに10ビット固定小数点演算を使用する方法を提供しようとする多くの試みがあった。 However, some experiments have demonstrated that 10-bit fixed point arithmetic, which requires less computing performance than 32-bit floating point arithmetic, is sufficient for deep learning algorithms. Therefore, there have been many attempts to provide a method of using 10-bit fixed point arithmetic for deep learning algorithms in resource limited devices, ie mobile devices.

32ビット浮動小数点で表現された数を10ビット固定小数点に量子化するいくつかの成功裏の方法が提示されたが、重要な問題があった。複数のチャンネルに含まれた値が大きく変わる場合、チャンネルのうち小さな値を含む一つ以上の特定チャンネルの値が無視されることがある。それは、図5において見ることができる。 Although some successful methods of quantizing numbers represented in 32-bit floating point to 10-bit fixed point have been presented, there have been significant problems. When the values included in a plurality of channels are significantly changed, values of one or more specific channels including a small value among the channels may be ignored. It can be seen in FIG.

図5は、大きく異なる様々なチャンネルの値を例示的に示している。 FIG. 5 exemplarily shows values of various channels that are significantly different.

図5を参照すると、第1コンボリューションブロック210−1から出力された第1特徴マップの第1チャンネルに含まれた各値は、(0.64、0.65、0.63)であり、第2チャンネルに含まれた各値は、(0.002、0.001、0.0019)であることが分かる。従来技術によると、第1チャンネルの値及び第2チャンネルの値が量子化される場合、量子化に使用される単位値は第1チャンネルまたは第2チャンネルによって決定された。 Referring to FIG. 5, each value included in the first channel of the first feature map output from the first convolution block 210-1 is (0.64, 0.65, 0.63), It can be seen that the values included in the second channel are (0.002, 0.001, 0.0019). According to the prior art, when the value of the first channel and the value of the second channel are quantized, the unit value used for the quantization is determined by the first channel or the second channel.

単位値が第1チャンネルによって決定される場合、単位値は第1チャンネルに含まれた値を示すために大きくなる。そして、単位値が第2チャンネルに含まれた値に比べてあまりにも大きいため、第2チャンネルに含まれた値は0に量子化され得る。反対に、単位値が第2チャンネルによって決定される場合、単位値は第2チャンネルに含まれた値を示すために小さくなる。それでは、単位値があまりにも小さくて第1チャンネルに含まれた値を正しく量子化することができない。 If the unit value is determined by the first channel, the unit value is increased to indicate the value included in the first channel. And, since the unit value is too large as compared with the value included in the second channel, the value included in the second channel may be quantized to zero. On the contrary, when the unit value is determined by the second channel, the unit value becomes smaller to indicate the value included in the second channel. Then, the unit value is too small to correctly quantize the value included in the first channel.

特定チャンネルの各値が無視されるか、または特定チャンネルの各値が上記のように適切に量子化されなければ、CNNの出力が歪曲されかねない。 If the particular channel values are ignored, or if the particular channel values are not properly quantized as described above, the CNN output may be distorted.

本発明は、上述した問題点を解決することを目的とする。 The present invention aims to solve the above-mentioned problems.

本発明は、出力値にある小さな値を含む特定チャンネルの各値を適切に反映するために、少なくとも一つの特徴マップに含まれた値を平坦化することができるようにCNNレイヤを変換する方法を提供することを目的とする。 The present invention is a method of transforming a CNN layer so that the values included in at least one feature map can be flattened to properly reflect each value of a specific channel including a small value in an output value. The purpose is to provide.

前記のような本発明の目的を達成し、後述する本発明の特徴的な効果を実現するための本発明の特徴的な構成は以下の通りである。 The characteristic constitution of the present invention for achieving the above-mentioned object of the present invention and realizing the characteristic effect of the present invention described later is as follows.

本発明の一態様によると、m個のコンボリューションブロックを含むCNNのコンボリューションレイヤを変換する方法において、(a)コンピューティング装置が、スケーリングパラメータを決定するために使用される入力イメージが取得されると、(i)第kコンボリューションブロックに含まれた第k初期コンボリューションレイヤの一つ以上の第k初期重み付け値と、(ii)(ii−1)kが1である場合、前記入力イメージ、(ii−2)kが2からmまでの常数である場合、第(k−1)コンボリューションブロックから出力された前記入力イメージに対応する第(k−1)特徴マップと、(iii)(iii−1)kが1である場合、前記入力イメージに含まれたチャンネルそれぞれに対応する第kスケーリングパラメータそれぞれ、及び(iii−2)kが2からmまでの常数である場合、前記第(k−1)特徴マップに含まれたチャンネルそれぞれに対応する第kスケーリングパラメータそれぞれを参照して、一つ以上の第k量子化ロス値と、を生成する段階(kは1からmまでの常数である);(b)前記コンピューティング装置が、前記第k量子化ロス値を参照して、前記第kスケーリングパラメータのうちで前記第(k−1)特徴マップに含まれた前記チャンネルそれぞれに対応する第k最適スケーリングパラメータそれぞれを決定する段階;(c)前記コンピューティング装置が、前記第k最適スケーリングパラメータを参照して第kスケーリングレイヤ及び第k逆スケーリングレイヤを生成する段階;(d)前記コンピューティング装置が、(i)kが1である場合、前記第kスケーリングレイヤを使用して、前記第k初期コンボリューションレイヤを第k統合コンボリューションレイヤに変換し、(ii)kが2からmまでの常数である場合、前記第kスケーリングレイヤ及び前記第(k−1)逆スケーリングレイヤを使用して前記第k初期コンボリューションレイヤを前記第k統合コンボリューションレイヤに変換する段階;を含むことを特徴とする方法が提供される。 According to one aspect of the invention, in a method of transforming a convolution layer of a CNN containing m convolution blocks, (a) a computing device obtains an input image used to determine a scaling parameter. Then, if (i) one or more kth initial weighting values of the kth initial convolution layer included in the kth convolution block and (ii)(ii-1)k is 1, the input The image, (ii-2) where k is a constant from 2 to m, the (k-1)th feature map corresponding to the input image output from the (k-1)th convolution block; and (iii) )(Iii-1)k is 1, each of the k-th scaling parameters corresponding to each channel included in the input image, and (iii-2)k is a constant from 2 to m, A step of generating one or more k-th quantization loss values with reference to each of the k-th scaling parameters corresponding to each channel included in the (k-1)th feature map (k is from 1 to m) (B) the computing device refers to the kth quantization loss value, and the channel included in the (k-1)th feature map among the kth scaling parameters. Determining each of the k-th optimal scaling parameters corresponding thereto; (c) the computing device generating the k-th scaling layer and the k-th inverse scaling layer with reference to the k-th optimal scaling parameter; d) the computing device transforms the kth initial convolutional layer into akth integrated convolutional layer using the kth scaling layer if (i)k is 1, and (ii)k Is a constant from 2 to m, transforming the k th initial convolution layer into the k th integrated convolution layer using the k th scaling layer and the (k−1) inverse scaling layer. A method is provided.

一実施例において、前記(a)段階は、前記コンピューティング装置が、(iv)BW値(前記BW値は、前記CNNに含まれた重み付け値及び特徴マップに含まれた値を二進数で表現するために使用されたビットの個数である)、及び(v)第kFL値(前記第kFL値は、(i)前記第k初期コンボリューションレイヤの前記第k初期重み付け値、及び(ii)kが2からmまでの常数である場合、前記第(k−1)特徴マップに含まれた値であり、kが1である場合、前記入力イメージに含まれた値のLSBが示す数の指数の絶対値である)をさらに参照して、前記第k量子化ロス値を生成することを含むことを特徴とする方法が提供される。 In one embodiment, in the step (a), the computing device expresses (iv) a BW value (wherein the BW value is a weight value included in the CNN and a value included in a feature map in binary numbers). And (v) the kth FL value (the kth FL value is (i) the kth initial weighting value of the kth initial convolution layer, and (ii)k). Is a constant from 2 to m, it is a value included in the (k-1)th feature map, and when k is 1, an index of the number indicated by the LSB of the value included in the input image. , Which is the absolute value of), and generating the k-th quantization loss value.

一実施例において、前記(a)段階は、前記数式によって前記第k量子化ロス値が生成され、前記数式でθは(i)kが2からmまでの常数である場合、前記第(k−1)特徴マップ及び前記第k初期コンボリューション特徴マップの前記第k初期重み付け値の値、(ii)kが1である場合、前記入力イメージ及び前記第k初期コンボリューション特徴マップの前記第k初期重み付け値の値を含み、Ckiは、前記第kスケーリングパラメータのうちで特定の第kスケーリングパラメータであり、FL及びBWはそれぞれ前記FL値及び前記BW値であり、Q演算は、前記FL値及び前記BW値を参照して生成されたCkiθの量子化された値とCkiθとの間の差を生成する演算であり、前記(b)段階は、前記コンピューティング装置が、前記△Lを最も小さくする前記Ckiを選択することにより、前記第k最適スケーリングパラメータそれぞれを決定することを特徴とする方法が提供される。 In one embodiment, in the step (a), the k-th quantization loss value is generated according to the equation, and θ p is (i) k is a constant from 2 to m. k-1) the value of the k-th initial weighting value of the feature map and the k-th initial convolution feature map, (ii) when k is 1, the input image and the k-th initial convolution feature map C k is a specific kth scaling parameter of the kth scaling parameters, FL and BW are the FL value and the BW value, respectively, and the Q operation is the a calculation for generating the difference between the quantized value of the FL values and C ki theta i generated by referring to the BW values and C ki theta i, step (b), the computing device, by selecting the C ki be minimized the △ L k, wherein determining a respective said first k optimal scaling parameters are provided.

一実施例において、前記コンピューティング装置が、ネステロフ加速勾配(Nesterov Accelerated Gradient)法を使用して、前記Ckiを選択して前記第k最適スケーリングパラメータを決定することを特徴とする方法が提供される。 In one embodiment, a method is provided in which the computing device uses the Nesterov Accelerated Gradient method to select the C ki to determine the k-th optimal scaling parameter. It

一実施例において、前記(c)段階は、前記コンピューティング装置が、前記第k最適スケーリングパラメータそれぞれがその構成要素として決定される前記第kスケーリングレイヤを生成し、前記第k最適スケーリングパラメータの逆数それぞれがその構成要素として決定される前記第k逆スケーリングレイヤを生成することを特徴とする方法が提供される。 In one embodiment, in the step (c), the computing device generates the kth scaling layer, each of which is determined as a constituent of the kth optimum scaling parameter, and a reciprocal of the kth optimum scaling parameter. A method is provided, characterized in that it produces said k-th inverse scaling layer, each of which is determined as its component.

一実施例において、前記(d)段階は、前記コンピューティング装置が、(1)kが1である場合、(i)前記第k初期コンボリューションレイヤ及び前記第kスケーリングレイヤの演算を入力値に適用して生成された結果と、(ii)前記第k統合コンボリューションレイヤの演算を前記入力値に適用して生成された結果との間の差が閾値より小さくなるように前記第k初期コンボリューションレイヤを前記第k統合コンボリューションレイヤに変換し、(2)kが2以上m以下の常数である場合、(i)第(k−1)逆スケーリングレイヤと、前記第k初期コンボリューションレイヤと、前記第kスケーリングレイヤとの演算を入力値に適用して生成された結果と、(ii)前記第k統合コンボリューションレイヤの演算を入力値に適用して生成された結果との間の差が前記閾値より小さくなるように前記第k初期コンボリューションレイヤを前記第k統合コンボリューションレイヤに変換することを特徴とする方法が提供される。 In one embodiment, in the step (d), when the computing device (1) k is 1, (i) the operation of the k-th initial convolution layer and the k-th scaling layer are input values. The k-th initial con- struct so that the difference between the result generated by applying the result and (ii) the result generated by applying the operation of the k-th integrated convolution layer to the input value is smaller than a threshold value. When the volume layer is converted into the kth integrated convolution layer, and (2) k is a constant of 2 or more and m or less, (i) the (k-1) inverse scaling layer and the kth initial convolution layer. And (ii) a result generated by applying the operation with the k-th scaling layer to an input value, and (ii) a result generated by applying the operation of the k-th integrated convolution layer to the input value. A method is provided, which comprises transforming the k th initial convolution layer into the k th integrated convolution layer such that the difference is less than the threshold.

一実施例において、(e)前記コンピューティング装置が、前記第kコンボリューションブロックに含まれた前記第k統合コンボリューションレイヤの各重み付け値を量子化して、前記第kコンボリューションブロックによって遂行されるCNN演算に対する最適化重み付け値として、第k量子化重み付け値を生成する段階;をさらに含むことを特徴とする方法が提供される。 In one embodiment, (e) the computing device quantizes each weighting value of the kth integrated convolution layer included in the kth convolution block and is performed by the kth convolution block. Providing a k-th quantized weighting value as an optimized weighting value for the CNN operation.

本発明の他の態様によると、m個のコンボリューションブロックを含むCNNのコンボリューションレイヤを変換するコンピューティング装置において、各インストラクションを格納する少なくとも一つのメモリと、(I)(i)第kコンボリューションブロックに含まれた第k初期コンボリューションレイヤの一つ以上の第k初期重み付け値と、(ii)(ii−1)kが1である場合、スケーリングパラメータを決定するために使用される入力イメージ、(ii−2)kが2からmまでの常数である場合、第(k−1)コンボリューションブロックから出力された前記入力イメージに対応する第(k−1)特徴マップと、(iii)(iii−1)kが1である場合、前記入力イメージに含まれたチャンネルそれぞれに対応する第kスケーリングパラメータそれぞれ、及び(iii−2)kが2からmまでの常数である場合、前記第(k−1)特徴マップに含まれたチャンネルそれぞれに対応する第kスケーリングパラメータそれぞれを参照して、一つ以上の第k量子化ロス値と、を生成するプロセス(kは1からmまでの常数である);(II)前記第k量子化ロス値を参照して、前記第kスケーリングパラメータのうちで前記第(k−1)特徴マップに含まれた前記チャンネルそれぞれに対応する第k最適スケーリングパラメータそれぞれを決定するプロセス;(III)前記第k最適スケーリングパラメータを参照して、第kスケーリングレイヤ及び第k逆スケーリングレイヤを生成するプロセス;(IV)(i)kが1である場合、前記第kスケーリングレイヤを使用して、前記第k初期コンボリューションレイヤを第k統合コンボリューションレイヤに変換し、(ii)kが2からmまでの常数である場合、前記第kスケーリングレイヤ及び前記第(k−1)逆スケーリングレイヤを使用して前記第k初期コンボリューションレイヤを前記第k統合コンボリューションレイヤに変換するプロセス;を遂行するための前記インストラクションを実行するように構成された少なくとも一つのプロセッサと、を含むことを特徴とするコンピューティング装置が提供される。 According to another aspect of the present invention, in a computing device for transforming a convolution layer of a CNN including m convolution blocks, at least one memory storing each instruction, and (I)(i) kth concatenation. One or more kth initial weighting values of the kth initial convolution layer included in the volume block, and (ii)(ii-1) if k is 1, the input used to determine the scaling parameter Image, (ii-2) where k is a constant from 2 to m, the (k-1)th feature map corresponding to the input image output from the (k-1)th convolution block; and (iii) )(Iii-1)k is 1, each of the k-th scaling parameters corresponding to each channel included in the input image, and (iii-2)k is a constant from 2 to m, A process of generating one or more k-th quantization loss values with reference to each of the k-th scaling parameters corresponding to each channel included in the (k-1)th feature map (k is from 1 to m). (II) referring to the k-th quantization loss value, the k-th corresponding to each of the channels included in the (k-1)th feature map among the k-th scaling parameters. A process of determining each optimum scaling parameter; (III) a process of generating a kth scaling layer and akth inverse scaling layer with reference to the kth optimum scaling parameter; (IV)(i) when k is 1 , The k-th scaling layer is used to transform the k-th initial convolution layer into a k-th integrated convolution layer, and (ii) if k is a constant from 2 to m, then the k-th scaling layer and Converting the kth initial convolutional layer to the kth integrated convolutional layer using the (k-1)th inverse scaling layer; at least configured to perform the instructions. A computing device is provided that includes a processor.

一実施例において、前記(I)プロセスは、前記プロセッサが、(iv)BW値(前記BW値は、前記CNNに含まれた重み付け値及び特徴マップに含まれた値を二進数で表現するために使用されたビットの個数である)、及び(v)第kFL値(前記第kFL値は、(1)前記第k初期コンボリューションレイヤの前記第k初期重み付け値、及び(2)kが2からmまでの常数である場合、前記第(k−1)特徴マップに含まれた値であり、kが1である場合、前記入力イメージに含まれた値のLSBが示す数の指数の絶対値である)をさらに参照して、前記第k量子化ロス値を生成することを含むことを特徴とするコンピューティング装置が提供される。 In one embodiment, the process (I) is performed by the processor to express (iv) a BW value (wherein the BW value is a weight value included in the CNN and a value included in a feature map in binary numbers). The number of bits used in the above), and (v) the kth FL value (the kth FL value is (1) the kth initial weighting value of the kth initial convolution layer, and (2) k is 2). Is a value included in the (k−1)th feature map when it is a constant from m to m, and when k is 1, the absolute value of the exponent of the number indicated by the LSB of the value included in the input image Value) is further provided to provide the k-th quantization loss value.

一実施例において、前記(I)プロセスは、前記プロセッサが、前記数式によって前記第k量子化ロス値が生成され、前記数式でθは(i)kが2からmまでの常数である場合、前記第(k−1)特徴マップ及び前記第k初期コンボリューション特徴マップの前記第k初期重み付け値の値、(ii)kが1である場合、前記入力イメージ及び前記第k初期コンボリューション特徴マップの前記第k初期重み付け値の値を含み、Ckiは、前記第kスケーリングパラメータのうちで特定の第kスケーリングパラメータであり、FL及びBWはそれぞれ前記FL値及び前記BW値であり、Q演算は、前記FL値及び前記BW値を参照して生成されたCkiθの量子化された値とCkiθとの間の差を生成する演算であり、前記(II)プロセスは、前記プロセッサが、前記△Lを最も小さくする前記Ckiを選択することにより、前記第k最適スケーリングパラメータそれぞれを決定することを特徴とするコンピューティング装置が提供される。 In one embodiment, in the process (I), the processor generates the k-th quantization loss value according to the formula, and θ p is (i) k is a constant from 2 to m. The value of the kth initial weighting value of the (k-1)th feature map and the kth initial convolution feature map, (ii) when k is 1, the input image and the kth initial convolution feature C k is a particular kth scaling parameter of the kth scaling parameters, FL and BW are the FL value and the BW value, respectively. calculation is a calculation for generating the difference between the FL values and C ki are generated by referring to the BW value theta i quantized values and C ki theta i of the (II) process , wherein the processor is the △ by selecting the C ki a L k be the smallest, the computing apparatus characterized by determining each of the first k optimal scaling parameters are provided.

一実施例において、前記プロセッサが、ネステロフ加速勾配(Nesterov Accelerated Gradient)法を使用して、前記Ckiを選択して前記第k最適スケーリングパラメータを決定することを特徴とするコンピューティング装置が提供される。 In one embodiment, a computing device is provided, characterized in that the processor uses the Nesterov Accelerated Gradient method to select the C ki to determine the k-th optimal scaling parameter. It

一実施例において、前記(III)プロセスは、前記プロセッサが、前記第k最適スケーリングパラメータそれぞれがその構成要素として決定される前記第kスケーリングレイヤを生成し、前記第k最適スケーリングパラメータの逆数それぞれがその構成要素として決定される前記第k逆スケーリングレイヤを生成することを特徴とするコンピューティング装置が提供される。 In one embodiment, in the (III) process, the processor generates the k-th scaling layer for which each of the k-th optimum scaling parameters is determined as its constituents, and each of the reciprocals of the k-th optimum scaling parameter is A computing device is provided that is characterized in that it generates the k-th inverse scaling layer that is determined as its component.

一実施例において、前記(IV)プロセスは、前記プロセッサが、(1)kが1である場合、(i)前記第k初期コンボリューションレイヤ及び前記第kスケーリングレイヤの演算を入力値に適用して生成された結果と、(ii)前記第k統合コンボリューションレイヤの演算を前記入力値に適用して生成された結果との間の差が閾値より小さくなるように前記第k初期コンボリューションレイヤを前記第k統合コンボリューションレイヤに変換し、(2)kが2以上m以下の常数である場合、(i)第(k−1)逆スケーリングレイヤと、前記第k初期コンボリューションレイヤと、前記第kスケーリングレイヤとの演算を入力値に適用して生成された結果と、(ii)前記第k統合コンボリューションレイヤの演算を入力値に適用して生成された結果との間の差が前記閾値より小さくなるように前記第k初期コンボリューションレイヤを前記第k統合コンボリューションレイヤに変換することを特徴とするコンピューティング装置が提供される。 In one embodiment, the (IV) process includes: (1) applying (i) an operation of the k-th initial convolution layer and the k-th scaling layer to an input value when k is 1. The kth initial convolution layer such that the difference between the result generated by (ii) applying the operation of the kth integrated convolution layer to the input value is smaller than a threshold value. To the kth integrated convolution layer, and (2) k is a constant not less than 2 and not more than m, (i) the (k-1) inverse scaling layer, the kth initial convolution layer, The difference between the result generated by applying the operation with the kth scaling layer to the input value and (ii) the result generated by applying the operation of the kth integrated convolution layer to the input value is A computing device is provided, which transforms the k-th initial convolution layer into the k-th integrated convolution layer so as to be smaller than the threshold value.

一実施例において、前記プロセッサが、(V)前記第kコンボリューションブロックに含まれた前記第k統合コンボリューションレイヤの重み付け値を量子化して、前記第kコンボリューションブロックによって遂行されるCNN演算に対する最適化重み付け値として、第k量子化重み付け値を生成するプロセス;をさらに遂行することを特徴とするコンピューティング装置が提供される。 In one embodiment, the processor quantizes (V) a weight value of the kth integrated convolution layer included in the kth convolution block to perform a CNN operation performed by the kth convolution block. A computing device is provided, further comprising: a process of generating a k-th quantization weighting value as an optimization weighting value.

本発明は、出力値にある小さな値を含む特定チャンネルの各値を適切に反映するために、少なくとも一つの特徴マップに含まれた値を平坦化することができるようにCNNレイヤを変換する方法を提供することができ、モバイル装置または高精度の小型ネットワークなどに適用することが可能なハードウェアを最適化して使用され得る。 The present invention is a method of transforming a CNN layer so that the values included in at least one feature map can be flattened to properly reflect each value of a specific channel including a small value in an output value. And can be used by optimizing hardware that can be applied to mobile devices or high-precision small networks.

本発明の実施例の説明に利用されるために添付された以下の各図面は、本発明の実施例のうちの一部に過ぎず、本発明が属する技術分野でおいて、通常の知識を有する者(以下「通常の技術者」)にとっては、発明的作業が行われることなくこの図面に基づいて他の図面が得られ得る。
図1は、本発明の一実施例によるCNNパラメータ量子化の最適化のためにCNNレイヤを変換する方法を遂行するためのコンピューティング装置の構成を示した図面である。 図2は、本発明の一実施例によるスケーリングレイヤ及び逆スケーリングレイヤが含まれたCNNの構成を示した図面である。 図3aは、本発明の一実施例によるスケーリングレイヤ及び逆スケーリングレイヤの位置を切り換えることにより、統合コンボリューションレイヤを生成する過程を示す図面である。 図3bは、本発明の一実施例によるスケーリングレイヤ及び逆スケーリングレイヤの位置を切り換えることにより、統合コンボリューションレイヤを生成する過程を示す図面である。 図4は、本発明の一実施例によるスケーリング方法によって値が大きく変わらない異なるいくつかのチャンネルの値を示す例示図である。 図5は、従来技術によって値が大きく変わる異なるいくつかのチャンネルの値を示す例示図である。
The following drawings, which are attached to explain the embodiments of the present invention, are only a part of the embodiments of the present invention, and are common knowledge in the technical field to which the present invention belongs. For those who have it (hereinafter "regular technician"), other drawings can be obtained based on this drawing without any inventive work.
FIG. 1 is a diagram illustrating a configuration of a computing device for performing a method of transforming a CNN layer for optimizing CNN parameter quantization according to an exemplary embodiment of the present invention. FIG. 2 is a diagram illustrating a configuration of a CNN including a scaling layer and an inverse scaling layer according to an exemplary embodiment of the present invention. FIG. 3a illustrates a process of generating an integrated convolution layer by switching positions of a scaling layer and an inverse scaling layer according to an exemplary embodiment of the present invention. FIG. 3b is a diagram illustrating a process of generating an integrated convolution layer by switching positions of a scaling layer and an inverse scaling layer according to an embodiment of the present invention. FIG. 4 is a view illustrating values of several different channels whose values do not change significantly according to a scaling method according to an exemplary embodiment of the present invention. FIG. 5 is an exemplary diagram showing the values of several different channels whose values change significantly according to the related art.

後述する本発明に対する詳細な説明は、本発明が実施され得る特定の実施例を例示として示す添付図面を参照する。これらの実施例は、当業者が本発明を実施することができるように十分詳細に説明される。本発明の多様な実施例は互いに異なるが、相互に排他的である必要はないことが理解されるべきである。例えば、ここに記載されている特定の形状、構造及び特性は、一実施例に関連して本発明の精神及び範囲を逸脱せず、かつ他の実施例で具現され得る。また、それぞれの開示された実施例内の個別の構成要素の位置又は配置は、本発明の精神及び範囲を逸脱せず、かつ変更され得ることが理解されるべきである。したがって、後述する詳細な説明は、限定的な意味として受け取ろうとするのではなく、本発明の範囲は適切に説明されるのであれば、その請求項が主張することと均等な全ての範囲とともに添付された請求項によってのみ限定される。図面において類似した参照符号は、様々な側面にわたって同一であるか、又は類似の機能を指す。 DETAILED DESCRIPTION The following detailed description of the invention refers to the accompanying drawings that illustrate, by way of illustration, specific embodiments in which the invention may be practiced. These examples are described in sufficient detail to enable one of ordinary skill in the art to practice the invention. It should be understood that the various embodiments of the invention differ from each other, but need not be mutually exclusive. For example, the particular shape, structure, and characteristics described herein may be embodied in other embodiments without departing from the spirit and scope of the invention in connection with one embodiment. It should also be understood that the location or arrangement of individual components within each disclosed embodiment may be changed without departing from the spirit and scope of the invention. Therefore, the following detailed description is not to be taken in a limiting sense, and the scope of the present invention is, if properly explained, accompanied by all the scope equivalent to what the claims claim. It is limited only by the appended claims. Like reference symbols in the various drawings indicate identical or similar functions across various aspects.

また、本発明の詳細な説明及び各請求項にわたって、「含む」という単語及びそれらの変形は、他の各技術的特徴、各付加物、構成要素又は段階を除外することを意図したものではない。通常の技術者にとって本発明の他の各目的、長所及び各特性が、一部は本明細書から、また一部は本発明の実施から明らかになるであろう。以下の例示及び図面は実例として提供され、本発明を限定することを意図したものではない。 Also, the word "comprising" and variations thereof throughout the detailed description of the invention and the claims are not intended to exclude other technical features, additions, components or steps. .. Other objects, advantages and features of the invention will be apparent to one of ordinary skill in the art, in part, from the specification and in part from the practice of the invention. The following illustrations and drawings are provided by way of illustration and are not intended to limit the invention.

本発明で言及している各種イメージは、舗装または非舗装道路関連のイメージを含み得、この場合、道路環境で登場し得る物体(例えば、自動車、人、動物、植物、物、建物、飛行機やドローンのような飛行体、その他の障害物)を想定し得るが、必ずしもこれに限定されるものではなく、本発明で言及している各種イメージは、道路と関係のないイメージ(例えば、非舗装道路、路地、空き地、海、湖、川、山、森、砂漠、空、室内と関連したイメージ)でもあり得、この場合、非舗装道路、路地、空き地、海、湖、川、山、森、砂漠、空、室内環境で登場し得る物体(例えば、自動車、人、動物、植物、物、建物、飛行機やドローンのような飛行体、その他の障害物)を想定し得るが、必ずしもこれに限定されるものではない。 The various images referred to in the present invention may include paved or unpaved road-related images, in which case objects that may appear in the road environment (eg, cars, people, animals, plants, objects, buildings, airplanes or A flying object such as a drone and other obstacles may be envisioned, but the present invention is not limited to this. The various images referred to in the present invention are images not related to roads (for example, unpaved roads). Roads, alleys, vacant lots, seas, lakes, rivers, mountains, forests, deserts, sky, indoors and related images), in which case unpaved roads, alleys, vacant lots, seas, lakes, rivers, mountains, forests , Deserts, sky, objects that can appear in indoor environments (eg, cars, people, animals, plants, objects, buildings, air vehicles such as airplanes and drones, and other obstacles), but not necessarily It is not limited.

以下、本発明が属する技術分野で通常の知識を有する者が本発明を容易に実施することができるようにするために、本発明の好ましい実施例について添付の図面に基づいて詳細に説明する。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art to which the present invention pertains can easily practice the present invention.

図1は、本発明の一実施例によるCNNパラメータ量子化の最適化のためにCNNレイヤを変換する方法を遂行するためのコンピューティング装置100の構成を示した図面である。また、図2は、本発明の一実施例によるスケーリングレイヤ及び逆スケーリングレイヤが含まれたCNNの構成を示した図面である。 FIG. 1 illustrates a configuration of a computing device 100 for performing a method of transforming a CNN layer for optimizing CNN parameter quantization according to an exemplary embodiment of the present invention. In addition, FIG. 2 is a diagram illustrating a configuration of a CNN including a scaling layer and an inverse scaling layer according to an exemplary embodiment of the present invention.

図1を参照すると、コンピューティング装置100はCNN200を含むことができる。前記CNN200による様々なデータの入力及び出力と各種データ演算の過程は、それぞれ通信部110及びプロセッサ120によって行われ得る。ところが、図1において、通信部110とプロセッサ120とがどのように連結されるのについての詳細な説明は省略する。また、コンピューティング装置は、次のプロセスを遂行するためのコンピュータ読取り可能な命令語を格納することができるメモリ115をさらに含むことができる。一例として、プロセッサ、メモリ、ミディアム等は、統合プロセッサと統合され得る。 With reference to FIG. 1, the computing device 100 may include a CNN 200. The process of inputting and outputting various data and calculating various data by the CNN 200 may be performed by the communication unit 110 and the processor 120, respectively. However, a detailed description of how the communication unit 110 and the processor 120 are connected in FIG. 1 will be omitted. In addition, the computing device may further include a memory 115 that may store computer readable instructions for performing the following processes. By way of example, a processor, memory, medium, etc. may be integrated with an integrated processor.

CNN200は、一つ以上のコンボリューションブロックを含むことができる。以下、便宜上、CNN200はm個のコンボリューションブロックを含み、kは1ないしmの常数を示すための変数として使用する。ここで、第kコンボリューションブロックは、図2に示されたように第k初期コンボリューションレイヤ211_k、第kアクティベーションレイヤ212_k及び第kプーリングレイヤ213_kを含むことができる。 CNN 200 may include one or more convolution blocks. Hereinafter, for convenience, the CNN 200 includes m convolution blocks, and k is used as a variable for indicating a constant number of 1 to m. Here, the kth convolution block may include the kth initial convolution layer 211_k, the kth activation layer 212_k, and the kth pooling layer 213_k, as shown in FIG.

以上、本発明のコンピューティング装置100及びそれに含まれたCNN200の構成を検討したところ、本発明の一実施例による第k初期コンボリューションレイヤ211_kの変換方法について簡略に説明することにする。 As described above, the configuration of the computing device 100 of the present invention and the CNN 200 included in the computing device 100 have been examined, and a method of converting the k-th initial convolution layer 211_k according to an embodiment of the present invention will be briefly described.

先ず、通信部110によってスケーリングパラメータを決定するために使用される入力イメージが取得され得る。以後、コンピューティング装置100は、(i)第kコンボリューションブロック210_kに含まれた第k初期コンボリューションレイヤ211_kの一つ以上の第k初期重み付け値と、(ii)第kコンボリューションブロック210_kによって処理される第(k−1)特徴マップと、(iii)第(k−1)特徴マップに含まれたチャンネルそれぞれに対応する第kスケーリングレイヤ214_kのそれぞれの第kスケーリングパラメータとを参照して、一つ以上の第k量子化ロス値を生成することができる。ここで、kが1である場合、第(k−1)特徴マップは、入力イメージを示すことができ、以下と同じである。 First, the input image used to determine the scaling parameter may be obtained by the communication unit 110. Thereafter, the computing device 100 uses (i) one or more kth initial weighting values of the kth initial convolution layer 211_k included in the kth convolution block 210_k, and (ii) the kth convolution block 210_k. With reference to the (k-1)th feature map to be processed and (iii) each kth scaling parameter of the kth scaling layer 214_k corresponding to each channel included in the (k-1)th feature map. , One or more k-th quantization loss values can be generated. Here, when k is 1, the (k−1)th feature map can indicate the input image, and is the same as the following.

また、コンピューティング装置100は、(iv)BW値(前記BW値は、前記CNNに含まれた重み付け値及び特徴マップに含まれた値を二進数で表現するために使用されたビットの個数である)、及び(v)第kFL値(前記第kFL値は、前記第k初期コンボリューションレイヤの前記第k初期重み付け値及び第(k−1)特徴マップに含まれた値のLSBが示す数の指数の絶対値である)をさらに参照して、前記第k量子化ロス値を生成することができる。 The computing device 100 may further include (iv) a BW value (the BW value is a number of bits used to represent a weight value included in the CNN and a value included in the feature map in binary numbers). And (v) the kth FL value (the kth FL value is a number indicated by the LSB of the kth initial weighting value of the kth initial convolution layer and the value included in the (k-1)th feature map. (Which is the absolute value of the exponent of ), the k-th quantization loss value can be generated.

また、コンピューティング装置100は、下記の公式によって第k量子化ロス値を生成することができる。 In addition, the computing device 100 may generate the kth quantization loss value according to the following formula.

ここで、前記数式は、量子化ロスを微分して第k量子化ロス値を生成する過程を示す。 Here, the mathematical formula represents a process of differentiating the quantization loss to generate the k-th quantization loss value.

前記数式でθは、前記第(k−1)特徴マップ及び前記第k初期コンボリューションレイヤの前記第k初期重み付け値を含むことができる。Ckiは、前記第kスケーリングパラメータのうちで前記第(k−1)特徴マップに含まれた第iチャンネルに対応する特定の第kスケーリングパラメータであり得る。FL及びBWはそれぞれ前記FL値及び前記BW値であり、Q演算は、前記FL値及び前記BW値を参照して生成されたCkiθの量子化された値とCkiθとの間の差を生成する演算であり得る。 In the equation, θ p may include the (k−1)th feature map and the kth initial weighting value of the kth initial convolution layer. C ki may be a specific k-th scaling parameter corresponding to the i-th channel included in the (k-1)th feature map among the k-th scaling parameters. FL and BW are each the FL value and the BW values, Q calculation, and the FL value and the quantized value of the C ki theta i generated by referring to the BW values and C ki theta i Can be an operation that produces the difference between.

前記のように、第k量子化ロス値が生成された後、コンピューティング装置100は、前記第kスケーリングパラメータのうちで前記第(k−1)特徴マップに含まれた前記チャンネルそれぞれに対応する第k最適スケーリングパラメータそれぞれを決定することができる。具体的に、前記コンピューティング装置100は、前記△Lを最も小さくする前記Ckiを選択することにより、前記第k最適スケーリングパラメータそれぞれを決定する。前記Ckiを選択するためにネステロフ最適化アルゴリズムが使用され得るが、これに限定されはしない。 As described above, after the kth quantization loss value is generated, the computing device 100 corresponds to each of the channels included in the (k−1)th feature map among the kth scaling parameter. Each k-th optimal scaling parameter can be determined. Specifically, the computing device 100, by selecting the C ki be minimized the △ L k, to determine each of the k-th best scaling parameter. A Nesterov optimization algorithm may be used to select the C ki , but is not limited thereto.

ネステロフ最適化アルゴリズムを適用するためには、第kスケーリングパラメータ間の制約条件(constraint)を決定しなければならない。したがって、コンピューティング装置100は、CNN200に含まれたレイヤをトポロジー的にソート(topologically sort)することができる。以後、各レイヤの類型に対応する第kスケーリングパラメータに対する制約条件が決定され得る。しかし、制約条件のうち不必要な制約条件、例えば重複した制約条件が存在し得る。したがって、一部の制約条件が除去され得る。ここで、制約条件が除去される過程で各レイヤ間の連結状態情報を参照することができる。 In order to apply the Nesterov optimization algorithm, the constraint between the kth scaling parameters must be determined. Therefore, the computing device 100 may topologically sort the layers included in the CNN 200. Thereafter, the constraint condition for the kth scaling parameter corresponding to the type of each layer can be determined. However, there may be unnecessary constraints, such as duplicate constraints, among the constraints. Therefore, some constraints may be removed. Here, the connection state information between layers can be referred to in the process of removing the constraint condition.

以後、コンピューティング装置100は、CNN200でフォワードパッシング(Forward passing)及びバックワードパッシング(backward passing)を何回か繰り返して、各レイヤに含まれた重み付け値それぞれに対応する2Dヒストグラム(histogram)それぞれを取得して第k量子化ロス値のグラフを生成することができる。そして、コンピューティング装置100は、第kスケーリングパラメータそれぞれであるCkiを変化させながら第k量子化ロス値に対応する最も小さい第k最適スケーリングパラメータを決定することができる。前記パラメータを変化させる過程は、ネステロフ最適化アルゴリズムによって提案されたベクトル移動技法によることができる。 After that, the computing apparatus 100 repeats forward passing and backward passing by the CNN 200 several times to generate 2D histograms corresponding to the weighting values included in each layer. It is possible to obtain and generate a graph of the k-th quantization loss value. The computing device 100 may determine the smallest k-th best scaling parameter corresponding to the k quantization loss value while changing the C ki is a k-th scaling parameter, respectively. The process of changing the parameters may be according to the vector movement technique proposed by the Nesterov optimization algorithm.

前記のような方式で、第k最適スケーリングパラメータが決定されると、コンピューティング装置100は、前記第(k−1)特徴マップに含まれたチャンネルそれぞれに対応する前記第k最適スケーリングパラメータのそれぞれがその構成要素として決定される前記第kスケーリングレイヤ214_kを生成し、前記第(k−1)特徴マップに含まれたチャンネルそれぞれに対応する前記第k最適スケーリングパラメータの逆数それぞれがその構成要素として決定される前記第k逆スケーリングレイヤ215_kを生成することができる。 When the kth optimum scaling parameter is determined by the above method, the computing device 100 determines each of the kth optimum scaling parameter corresponding to each channel included in the (k-1)th feature map. Generates the k-th scaling layer 214_k determined as a constituent element thereof, and the reciprocal of the k-th optimum scaling parameter corresponding to each channel included in the (k-1)th feature map is a constituent element thereof. The determined kth inverse scaling layer 215_k may be generated.

以下では、図2を参照して、第kスケーリングレイヤ214_k及び第k逆スケーリングレイヤ215_kが第kコンボリューションブロック210_kにどのように挿入されるのかについて説明する。 Hereinafter, it will be described with reference to FIG. 2 how the kth scaling layer 214_k and the kth inverse scaling layer 215_k are inserted into the kth convolution block 210_k.

図2を参照すると、第kスケーリングレイヤ214_k及び第k逆スケーリングレイヤ215_kがそれぞれアクティベーションレイヤ212_kの前端及び後端に挿入され得る。これは第kアクティベーションレイヤ212_k、第kスケーリングレイヤ214_k、及び第k逆スケーリングレイヤ215_kによって遂行される動作に交換法則が成立するためである。ここで、第kアクティベーションレイヤ212_kが遂行する演算は、ReLU演算であり得るが、これに限定されるわけではない。 Referring to FIG. 2, the kth scaling layer 214_k and the kth inverse scaling layer 215_k may be inserted at the front end and the rear end of the activation layer 212_k, respectively. This is because the exchange law is established in the operations performed by the kth activation layer 212_k, the kth scaling layer 214_k, and the kth inverse scaling layer 215_k. Here, the operation performed by the kth activation layer 212_k may be a ReLU operation, but is not limited thereto.

数学的に整理すると、
Mathematically,

前記数式を参照すると、Sc*I.Scは元来数式に追加され得る。なぜならば、ScすなわちスケーリングレイヤとI.Scすなわち逆スケーリングレイヤとは互いに逆関数の関係であるからである。そして、前記Sc項目とI.Sc項目とはアクティベーションレイヤと交換法則が成立するため、アクティベーションレイヤの両方に移され得るのである。 Referring to the above formula, Sc*I. Sc can originally be added to the formula. Because Sc, that is, the scaling layer and I.S. This is because Sc and the inverse scaling layer have an inverse function relationship with each other. The Sc item and the I.D. The Sc item can be transferred to both the activation layer because the activation law and the exchange law are established.

一方、第kスケーリングレイヤ214_k及び第k逆スケーリングレイヤ215_kがCNN200に追加されると、さらに多くのコンピュータリソースが必要であり、これは非効率的である。したがって、本発明はスケーリングレイヤ、初期コンボリューションレイヤ、及び逆スケーリングレイヤを統合する方法を提示するところ、図3a及び図3bを参照して説明することにする。 On the other hand, when the kth scaling layer 214_k and the kth inverse scaling layer 215_k are added to the CNN 200, more computer resources are required, which is inefficient. Accordingly, the present invention presents a method of integrating a scaling layer, an initial convolution layer, and an inverse scaling layer, which will be described with reference to Figures 3a and 3b.

図3a及び図3bは、本発明の一実施例によるスケーリングレイヤ及び逆スケーリングレイヤの位置を切り換えることにより、統合コンボリューションレイヤを生成する過程を示す図面である。 3a and 3b are views showing a process of generating an integrated convolution layer by switching positions of a scaling layer and an inverse scaling layer according to an embodiment of the present invention.

図3a及び図3bを参照すると、第(k−1)コンボリューションブロック210_(k−1)に含まれた第(k−1)逆スケーリングレイヤ215_(k−1)は、第kコンボリューションブロック210_kに移され得る。これは第(k−1)プーリングレイヤ213_(k−1)自体は値の変化と関連がないためである。 Referring to FIGS. 3A and 3B, the (k−1)th inverse scaling layer 215_(k−1) included in the (k−1)th convolution block 210_(k−1) is a kth convolution block. 210_k. This is because the (k-1)th pooling layer 213_(k-1) itself is not associated with a change in value.

図3bを参照すると、第(k−1)逆スケーリングレイヤ215_(k−1)、第k初期コンボリューションレイヤ211_k、及び第kスケーリングレイヤ214_kは、第k統合コンボリューションレイヤ216_kを生成するために統合され得る。コンピューティング装置100は、(i)第(k−1)逆スケーリングレイヤと、前記第k初期コンボリューションレイヤと、前記第kスケーリングレイヤとの演算を入力値に適用して生成された結果と、(ii)前記第k統合コンボリューションレイヤの演算を入力値に適用して生成された結果との差が閾値より小さくなるように前記第k統合コンボリューションレイヤ216_kのパラメータが決定され得る。ここで、今までに説明した統合プロセスは、第(k−1)逆スケーリングレイヤ215_(k−1)、第k初期コンボリューションレイヤ211_k、及び第kスケーリングレイヤ214_kに対応する構成要素を掛け合わせるプロセスが含まれ得るが、これに限定されるわけではない。 Referring to FIG. 3b, the (k−1)th inverse scaling layer 215_(k−1), the kth initial convolution layer 211_k, and the kth scaling layer 214_k may generate the kth integrated convolution layer 216_k. Can be integrated. The computing device 100 includes (i) a (k-1)th inverse scaling layer, a result generated by applying an operation of the kth initial convolution layer and the kth scaling layer to an input value, (Ii) Parameters of the kth integrated convolution layer 216_k may be determined such that a difference between the result generated by applying the operation of the kth integrated convolution layer to an input value is smaller than a threshold value. Here, the integration process described so far multiplies the components corresponding to the (k−1)th inverse scaling layer 215_(k−1), the kth initial convolution layer 211_k, and the kth scaling layer 214_k. Processes may be included, but are not limited to.

kが1である場合については図3bに示されていないが、当然その前のブロックから移動された逆スケーリングレイヤがないので、最初の初期コンボリューションレイヤ211_1と最初のスケーリングレイヤ214_1のみが統合コンボリューションレイヤ216_1を生成するのに使用される。 The case where k is 1 is not shown in Fig. 3b, but since there is of course no descaling layer moved from the block before it, only the first initial convolution layer 211_1 and the first scaling layer 214_1 are integrated. It is used to generate the evolution layer 216_1.

上記で説明されたプロセスは、量子化に最適化された第k統合コンボリューションレイヤ216_kのパラメータを生成するためのものである。ここで、第k統合コンボリューションレイヤ216_kのパラメータを生成するプロセスとは独立して量子化プロセスが説明される。したがって、コンピューティング装置100が前記第kコンボリューションブロック210_kに含まれた重み付け値を量子化して、前記第kコンボリューションブロック210_kによって遂行されるCNN演算に対する最適化重み付け値として、第k量子化重み付け値を生成することができる。これは、前記第k統合コンボリューションレイヤ216_kを生成するプロセスの前、プロセスの途中、プロセスの後に関係なく遂行される。 The process described above is for generating the parameters of the k-th integrated convolutional layer 216_k optimized for quantization. Here, the quantization process is described independently of the process of generating the parameters of the kth integrated convolution layer 216_k. Therefore, the computing device 100 quantizes the weight value included in the kth convolution block 210_k, and determines the kth quantization weight as an optimized weight value for the CNN operation performed by the kth convolution block 210_k. A value can be generated. This may be performed before, during, or after the process of generating the kth integrated convolution layer 216_k.

前記最適化された量子化CNN重み付け値の長所は、図4を参照して説明する。 The advantages of the optimized quantized CNN weighting value will be described with reference to FIG.

図4は、本発明の一実施例によるスケーリング方法によって値が大きく変わらない異なるいくつかのチャンネルの値を示す例示図である。 FIG. 4 is a view illustrating values of several different channels whose values do not change significantly according to a scaling method according to an exemplary embodiment of the present invention.

まず、従来技術を説明する際に参照していた図5を参照すると、本発明によって提供される方法が適用されない場合、第1特徴マップに含まれた第2チャンネルの値が第1特徴マップに含まれた第1チャンネルの値よりはるかに小さいことが確認された。これと反対に、図4を参照すると、第1チャンネルの値と第2チャンネルの値とが類似することが分かる。これは第1統合コンボリューションレイヤ216_1の重み付け値に反映された第1スケーリングパラメータによるものであって、第1値と第2値との間の差が大きくないため、第1コンボリューションブロック210_2によって遂行された演算の後で第1値及び第2の値が適切に量子化され得るのである。 First, referring to FIG. 5 referred to when describing the prior art, when the method provided by the present invention is not applied, the value of the second channel included in the first feature map is converted into the first feature map. It was confirmed that it was much smaller than the value of the included first channel. On the contrary, referring to FIG. 4, it can be seen that the value of the first channel and the value of the second channel are similar. This is due to the first scaling parameter reflected in the weighting value of the first integrated convolution layer 216_1, and since the difference between the first value and the second value is not large, the first convolution block 210_2 After the operation performed, the first value and the second value can be properly quantized.

本発明の技術分野における通常の技術者にとって理解され得るところとして、上記にて説明されたイメージ、例えば原本イメージ、原本ラベル及び追加ラベルのようなイメージデータの送受信が学習装置及びテスト装置の各通信部によって行われ得、特徴マップと演算を遂行するためのデータが学習装置及びテスト装置のプロセッサ(及び/又はメモリ)により保有/維持され得、コンボリューション演算、デコンボリューション演算、ロス値演算の過程が主に学習装置及びテスト装置のプロセッサにより遂行され得るが、本発明がこれに限定されはしないであろう。 As can be understood by those of ordinary skill in the art of the present invention, the transmission and reception of the image data such as the images described above, for example, the original image, the original label, and the additional label is performed by the learning device and the test device. Data that may be performed by the unit and may be retained/maintained by the processor (and/or memory) of the learning device and the test device to perform the feature map and the operation, and the process of convolution operation, deconvolution operation, loss value operation. Can be accomplished primarily by the processor of the learning and testing devices, but the invention will not be so limited.

以上にて説明された本発明による実施例は、多様なコンピュータの構成要素を通じて遂行することができるプログラム命令語の形態で具現されて、コンピュータ読取り可能な記録媒体に格納され得る。前記コンピュータ読取り可能な記録媒体はプログラム命令語、データファイル、データ構造などを単独で又は組み合わせて含むことができる。前記コンピュータ読取り可能な記録媒体に格納されるプログラム命令語は、本発明のために特別に設計され、構成されたものであるか、コンピュータソフトウェア分野の当業者に公知にされて使用可能なものであり得る。コンピュータ読取り可能な記録媒体の例には、ハードディスク、フロッピーディスク及び磁気テープのような磁気媒体、CD−ROM、DVDのような光記録媒体、フロプティカル・ディスク(Floptical Disk)のような磁気−光メディア(Magneto−Optical Media)、及びROM、RAM、フラッシュメモリなどのようなプログラム命令語を格納して遂行するように特別に構成されたハードウェア装置が含まれる。プログラム命令語の例には、コンパイラによって作られるもののような機械語コードだけでなく、インタープリターなどを使用してコンピュータによって実行される高級言語コードも含まれる。前記ハードウェア装置は、本発明による処理を実行するために一つ以上のソフトウェアモジュールとして作動するように構成され得、その反対も同様である。 The embodiments of the present invention described above may be embodied in the form of program command words that can be executed through various computer components and stored in a computer-readable recording medium. The computer-readable recording medium may include program command words, data files, data structures, etc., alone or in combination. The program command stored in the computer-readable recording medium may be specially designed and constructed for the present invention, or may be known and used by those skilled in the computer software field. possible. Examples of the computer-readable recording medium include a magnetic medium such as a hard disk, a floppy disk and a magnetic tape, an optical recording medium such as a CD-ROM and a DVD, and a magnetic-optical medium such as a floppy disk. (Magneto-Optical Media), and hardware devices specially configured to store and execute program command words, such as ROM, RAM, flash memory, and the like. Examples of program instruction words include not only machine language code such as that produced by a compiler, but also high level language code executed by a computer using an interpreter or the like. Said hardware device may be arranged to operate as one or more software modules for carrying out the processes according to the invention and vice versa.

以上にて本発明が具体的な構成要素などのような特定事項と限定された実施例及び図面によって説明されたが、これは本発明のより全般的な理解の一助とするために提供されたものであるに過ぎず、本発明が前記実施例に限られるものではなく、本発明が属する技術分野において通常の知識を有する者であれば、係る記載から多様な修正及び変形が行われ得る。 The present invention has been described above with reference to specific examples such as specific components and limited examples and drawings, which are provided to help a more general understanding of the present invention. However, the present invention is not limited to the above-described embodiments, and various modifications and variations can be made from the above description by a person having ordinary knowledge in the technical field to which the present invention belongs.

従って、本発明の思想は、前記説明された実施例に局限されて定められてはならず、後述する特許請求の範囲だけでなく、本特許請求の範囲と均等または等価的に変形されたものすべては、本発明の思想の範囲に属するといえる。 Therefore, the idea of the present invention should not be limited to the above-described embodiments, and should not be limited to the scope of the claims to be described later, but may be modified equivalently or equivalently to the scope of the claims. All can be said to belong to the scope of the idea of the present invention.

Claims (14)

m個のコンボリューションブロックを含むCNNのコンボリューションレイヤを変換する方法において、
(a)コンピューティング装置が、スケーリングパラメータを決定するために使用される入力イメージが取得されると、(i)第kコンボリューションブロックに含まれた第k初期コンボリューションレイヤの一つ以上の第k初期重み付け値と、(ii)(ii−1)kが1である場合、前記入力イメージ、(ii−2)kが2からmまでの常数である場合、第(k−1)コンボリューションブロックから出力された前記入力イメージに対応する第(k−1)特徴マップと、(iii)(iii−1)kが1である場合、前記入力イメージに含まれたチャンネルそれぞれに対応する第kスケーリングパラメータそれぞれ、及び(iii−2)kが2からmまでの常数である場合、前記第(k−1)特徴マップに含まれたチャンネルそれぞれに対応する第kスケーリングパラメータそれぞれを参照して、一つ以上の第k量子化ロス値と、を生成する段階(kは1からmまでの常数である);
(b)前記コンピューティング装置が、前記第k量子化ロス値を参照して、前記第kスケーリングパラメータのうちで前記第(k−1)特徴マップに含まれた前記チャンネルそれぞれに対応する第k最適スケーリングパラメータそれぞれを決定する段階;
(c)前記コンピューティング装置が、前記第k最適スケーリングパラメータを参照して、第kスケーリングレイヤ及び第k逆スケーリングレイヤを生成する段階;
(d)前記コンピューティング装置が、(i)kが1である場合、前記第kスケーリングレイヤを使用して、前記第k初期コンボリューションレイヤを第k統合コンボリューションレイヤに変換し、(ii)kが2からmまでの常数である場合、前記第kスケーリングレイヤ及び前記第(k−1)逆スケーリングレイヤを使用して、前記第k初期コンボリューションレイヤを前記第k統合コンボリューションレイヤに変換する段階;
を含むことを特徴とする方法。
In a method of transforming a convolution layer of a CNN containing m convolution blocks,
(A) When the computing device obtains the input image used to determine the scaling parameter, (i) one or more th of the k th initial convolution layers included in the k th convolution block. The k initial weighting value and (ii)(ii-1)k is 1 if the input image, (ii-2)k is a constant from 2 to m, the (k-1) convolution If the (k−1)th feature map corresponding to the input image output from the block is (iii)(iii−1)k is 1, then the kth feature map corresponding to each channel included in the input image. When each of the scaling parameters and (iii-2)k is a constant from 2 to m, each of the kth scaling parameters corresponding to each of the channels included in the (k-1)th feature map is referred to, Generating one or more k th quantization loss values, where k is a constant from 1 to m;
(B) The computing device refers to the k-th quantization loss value, and among the k-th scaling parameters, the k-th corresponding to each of the channels included in the (k-1)th feature map. Determining each optimal scaling parameter;
(C) referring to the k-th optimal scaling parameter, the computing device generates a k-th scaling layer and a k-th inverse scaling layer;
(D) the computing device transforms the kth initial convolutional layer into akth integrated convolutional layer using the kth scaling layer if (i)k is 1, and (ii) When k is a constant from 2 to m, the kth initial convolution layer is converted to the kth integrated convolution layer using the kth scaling layer and the (k-1)th inverse scaling layer. Stage of doing;
A method comprising:
前記(a)段階は、
前記コンピューティング装置が、(iv)BW値(前記BW値は、前記CNNに含まれた重み付け値及び特徴マップに含まれた値を二進数で表現するために使用されたビットの個数である)、及び(v)第kFL値(前記第kFL値は、(i)前記第k初期コンボリューションレイヤの前記第k初期重み付け値、及び(ii)kが2からmまでの常数である場合、前記第(k−1)特徴マップに含まれた値であり、kが1である場合、前記入力イメージに含まれた値のLSBが示す数の指数の絶対値である)をさらに参照して、前記第k量子化ロス値を生成することを含むことを特徴とする請求項1に記載の方法。
The step (a) includes
(Iv) BW value (the BW value is the number of bits used to represent the weight value included in the CNN and the value included in the feature map in binary number) by the computing device. And (v) a kFL value (wherein the kFL value is (i) the kth initial weighting value of the kth initial convolution layer, and (ii) k is a constant from 2 to m, (K-1) value included in the feature map, where k is 1, it is the absolute value of the exponent of the number indicated by the LSB of the value included in the input image). The method of claim 1, comprising generating the kth quantization loss value.
前記(a)段階は、
前記数式によって前記第k量子化ロス値が生成され、前記数式でθは(i)kが2からmまでの常数である場合、前記第(k−1)特徴マップ及び前記第k初期コンボリューション特徴マップの前記第k初期重み付け値の値、(ii)kが1である場合、前記入力イメージ及び前記第k初期コンボリューション特徴マップの前記第k初期重み付け値の値を含み、Ckiは、前記第kスケーリングパラメータのうちで特定の第kスケーリングパラメータであり、FL及びBWはそれぞれ前記FL値及び前記BW値であり、Q演算は、前記FL値及び前記BW値を参照して生成されたCkiθの量子化された値とCkiθとの間の差を生成する演算であり、
前記(b)段階は、前記コンピューティング装置が、前記△Lを最も小さくする前記Ckiを選択することにより、前記第k最適スケーリングパラメータそれぞれを決定することを特徴とする請求項2に記載の方法。
The step (a) includes
Wherein is generated the first k quantization loss value by a formula, when in theta p is the equation is a constant to m 2 is (i) k, wherein the (k-1), wherein the map and the first k initial con If (ii) k is 1, the value of the k-th initial weighting value of the convolution feature map includes the input image and the value of the k-th initial weighting value of the k-th initial convolution feature map, and C ki is , A specific k-th scaling parameter among the k-th scaling parameters, FL and BW are the FL value and the BW value, respectively, and a Q operation is generated by referring to the FL value and the BW value. and a calculation for generating the difference between the C ki theta i quantized values and C ki theta i of
Step (b), the computing device, wherein the △ by selecting the C ki a L k be minimized, according to claim 2, wherein determining a respective said first k optimal scaling parameters the method of.
前記コンピューティング装置が、ネステロフ加速勾配(Nesterov Accelerated Gradient)法を使用して、前記Ckiを選択して前記第k最適スケーリングパラメータを決定することを特徴とする請求項3に記載の方法。 4. The method of claim 3, wherein the computing device uses the Nesterov Accelerated Gradient method to select the C ki to determine the k-th optimal scaling parameter. 前記(c)段階は、
前記コンピューティング装置が、
前記第k最適スケーリングパラメータそれぞれがその構成要素として決定される前記第kスケーリングレイヤを生成し、前記第k最適スケーリングパラメータの逆数それぞれがその構成要素として決定される前記第k逆スケーリングレイヤを生成することを特徴とする請求項1に記載の方法。
The step (c) includes
The computing device is
Each of the k-th optimal scaling parameters produces the k-th scaling layer whose constituents are determined, and each of the reciprocals of the k-th optimal scaling parameter produces the k-th inverse scaling layer whose constituents are determined. The method of claim 1, wherein:
前記(d)段階は、
前記コンピューティング装置が、(1)kが1である場合、(i)前記第k初期コンボリューションレイヤ及び前記第kスケーリングレイヤの演算を入力値に適用して生成された結果と、(ii)前記第k統合コンボリューションレイヤの演算を前記入力値に適用して生成された結果との間の差が閾値より小さくなるように前記第k初期コンボリューションレイヤを前記第k統合コンボリューションレイヤに変換し、(2)kが2以上m以下の常数である場合、(i)第(k−1)逆スケーリングレイヤと、前記第k初期コンボリューションレイヤと、前記第kスケーリングレイヤとの演算を入力値に適用して生成された結果と、(ii)前記第k統合コンボリューションレイヤの演算を入力値に適用して生成された結果との間の差が前記閾値より小さくなるように前記第k初期コンボリューションレイヤを前記第k統合コンボリューションレイヤに変換することを特徴とする請求項1に記載の方法。
The step (d) includes
(1) when k is 1, (i) a result generated by applying (i) an operation of the kth initial convolution layer and the kth scaling layer to an input value; and (ii) Transforming the kth initial convolution layer into the kth integrated convolution layer such that a difference between the result generated by applying the operation of the kth integrated convolution layer to the input value is smaller than a threshold value; If (2) k is a constant of 2 or more and m or less, (i) the (k-1) inverse scaling layer, the kth initial convolution layer, and the kth scaling layer are input. The k th th such that a difference between a result generated by applying the value to the value and (ii) a result generated by applying the operation of the k th integrated convolution layer to the input value is smaller than the threshold. The method of claim 1, converting an initial convolutional layer to the kth integrated convolutional layer.
(e)前記コンピューティング装置が、前記第kコンボリューションブロックに含まれた前記第k統合コンボリューションレイヤの各重み付け値を量子化して、前記第kコンボリューションブロックにより遂行されるCNN演算に対する最適化重み付け値として、第k量子化重み付け値を生成する段階;
をさらに含むことを特徴とする請求項1に記載の方法。
(E) The computing device quantizes each weighting value of the kth integrated convolution layer included in the kth convolution block to optimize the CNN operation performed by the kth convolution block. Generating a k-th quantization weighting value as a weighting value;
The method of claim 1, further comprising:
m個のコンボリューションブロックを含むCNNのコンボリューションレイヤを変換するコンピューティング装置において、
各インストラクションを格納する少なくとも一つのメモリと、
(I)(i)第kコンボリューションブロックに含まれた第k初期コンボリューションレイヤの一つ以上の第k初期重み付け値と、(ii)(ii−1)kが1である場合、スケーリングパラメータを決定するために使用される入力イメージ、(ii−2)kが2からmまでの常数である場合、第(k−1)コンボリューションブロックから出力された前記入力イメージに対応する第(k−1)特徴マップと、(iii)(iii−1)kが1である場合、前記入力イメージに含まれたチャンネルそれぞれに対応する第kスケーリングパラメータそれぞれ、及び(iii−2)kが2からmまでの常数である場合、前記第(k−1)特徴マップに含まれたチャンネルそれぞれに対応する第kスケーリングパラメータそれぞれを参照して、一つ以上の第k量子化ロス値と、を生成するプロセス(kは1からmまでの常数である);(II)前記第k量子化ロス値を参照して、前記第kスケーリングパラメータのうちで前記第(k−1)特徴マップに含まれた前記チャンネルそれぞれに対応する第k最適スケーリングパラメータそれぞれを決定するプロセス;(III)前記第k最適スケーリングパラメータを参照して、第kスケーリングレイヤ及び第k逆スケーリングレイヤを生成するプロセス;(IV)(i)kが1である場合、前記第kスケーリングレイヤを使用して、前記第k初期コンボリューションレイヤを第k統合コンボリューションレイヤに変換し、(ii)kが2からmまでの常数である場合、前記第kスケーリングレイヤ及び前記第(k−1)逆スケーリングレイヤを使用して前記第k初期コンボリューションレイヤを前記第k統合コンボリューションレイヤに変換するプロセス;を遂行するための前記インストラクションを実行するように構成された少なくとも一つのプロセッサと、
を含むことを特徴とするコンピューティング装置。
In a computing device for transforming a CNN convolution layer containing m convolution blocks,
At least one memory for storing each instruction,
(I) (i) one or more k-th initial weighting values of the k-th initial convolution layer included in the k-th convolution block, and (ii) (ii-1) k is 1, a scaling parameter The input image used to determine (ii-2)k is a constant from 2 to m, the (k-1)th corresponding to the input image output from the (k-1) convolution block. -1) If the feature map and (iii)(iii-1)k are 1, the k-th scaling parameter corresponding to each channel included in the input image, and (iii-2)k from 2 If it is a constant up to m, one or more k-th quantization loss values are generated by referring to the k-th scaling parameter corresponding to each channel included in the (k-1)th feature map. (K) is a constant number from 1 to m; (II) is included in the (k-1)th feature map among the kth scaling parameters with reference to the kth quantization loss value. And (IV) generating a kth scaling layer and a kth inverse scaling layer by referring to the kth optimal scaling parameter. (I) When k is 1, the k-th scaling layer is used to transform the k-th initial convolution layer into a k-th integrated convolution layer, and (ii) k is a constant from 2 to m. A step of converting the kth initial convolutional layer to the kth integrated convolutional layer using the kth scaling layer and the (k-1)th inverse scaling layer, if any; At least one processor configured to execute
A computing device comprising:.
前記(I)プロセスは、
前記プロセッサが、(iv)BW値(前記BW値は、前記CNNに含まれた重み付け値及び特徴マップに含まれた値を二進数で表現するために使用されたビットの個数である)、及び(v)第kFL値(前記第kFL値は、(1)前記第k初期コンボリューションレイヤの前記第k初期重み付け値、及び(2)kが2からmまでの常数である場合、前記第(k−1)特徴マップに含まれた値であり、kが1である場合、前記入力イメージに含まれた値のLSBが示す数の指数の絶対値である)をさらに参照して、前記第k量子化ロス値を生成することを含むことを特徴とする請求項8に記載のコンピューティング装置。
The process (I) is
The processor is (iv) a BW value (the BW value is the number of bits used to represent the weight value included in the CNN and the value included in the feature map in binary); and (V) kth FL value (the kth FL value is (1) the kth initial weighting value of the kth initial convolution layer, and (2) when k is a constant from 2 to m, the k-1) a value included in the feature map, where k is 1, it is the absolute value of the exponent of the number indicated by the LSB of the value included in the input image). The computing device of claim 8 including generating a k-quantization loss value.
前記(I)プロセスは、
前記プロセッサが、
前記数式によって前記第k量子化ロス値が生成され、前記数式でθは(i)kが2からmまでの常数である場合、前記第(k−1)特徴マップ及び前記第k初期コンボリューション特徴マップの前記第k初期重み付け値の値、(ii)kが1である場合、前記入力イメージ及び前記第k初期コンボリューション特徴マップの前記第k初期重み付け値の値を含み、Ckiは、前記第kスケーリングパラメータのうちで特定の第kスケーリングパラメータであり、FL及びBWはそれぞれ前記FL値及び前記BW値であり、Q演算は、前記FL値及び前記BW値を参照して生成されたCkiθの量子化された値とCkiθとの間の差を生成する演算であり、
前記(II)プロセスは、
前記プロセッサが、
前記△Lを最も小さくする前記Ckiを選択することにより、前記第k最適スケーリングパラメータそれぞれを決定することを特徴とする請求項9に記載のコンピューティング装置。
The process (I) is
The processor is
Wherein is generated the first k quantization loss value by a formula, when in theta p is the equation is a constant to m 2 is (i) k, wherein the (k-1), wherein the map and the first k initial con If (ii) k is 1, the value of the k-th initial weighting value of the convolution feature map includes the input image and the value of the k-th initial weighting value of the k-th initial convolution feature map, and C ki is , A specific k-th scaling parameter among the k-th scaling parameters, FL and BW are the FL value and the BW value, respectively, and a Q operation is generated by referring to the FL value and the BW value. and a calculation for generating the difference between the C ki theta i quantized values and C ki theta i of
The process (II) is
The processor is
The △ L by selecting the smallest to the C ki and k, computing device of claim 9, wherein determining a respective said first k optimal scaling parameter.
前記プロセッサが、ネステロフ加速勾配(Nesterov Accelerated Gradient)法を使用して、前記Ckiを選択して前記第k最適スケーリングパラメータを決定することを特徴とする請求項10に記載のコンピューティング装置。 11. The computing device of claim 10, wherein the processor uses the Nesterov Accelerated Gradient method to select the C ki to determine the k-th optimal scaling parameter. 前記(III)プロセスは、
前記プロセッサが、前記第k最適スケーリングパラメータそれぞれがその構成要素として決定される前記第kスケーリングレイヤを生成し、前記第k最適スケーリングパラメータの逆数それぞれがその構成要素として決定される前記第k逆スケーリングレイヤを生成することを特徴とする請求項8に記載のコンピューティング装置。
The process (III) is
The processor generates the kth scaling layer, each of the kth optimal scaling parameters being determined as its constituents, and each of the kth inverse scalings, wherein each reciprocal of the kth optimal scaling parameter is determined as its constituents. The computing device of claim 8, wherein the computing device generates a layer.
前記(IV)プロセスは、
前記プロセッサが、(1)kが1である場合、(i)前記第k初期コンボリューションレイヤ及び前記第kスケーリングレイヤの演算を入力値に適用して生成された結果と、(ii)前記第k統合コンボリューションレイヤの演算を前記入力値に適用して生成された結果との差が閾値より小さくなるように前記第k初期コンボリューションレイヤを前記第k統合コンボリューションレイヤに変換し、(2)kが2以上m以下の常数である場合、(i)第(k−1)逆スケーリングレイヤと、前記第k初期コンボリューションレイヤと、前記第kスケーリングレイヤとの演算を入力値に適用して生成された結果と、(ii)前記第k統合コンボリューションレイヤの演算を入力値に適用して生成された結果との間の差が前記閾値より小さくなるように前記第k初期コンボリューションレイヤを前記第k統合コンボリューションレイヤに変換することを特徴とする請求項8に記載のコンピューティング装置。
The process (IV) is
(1) when k is 1, (i) a result generated by applying the operation of the k-th initial convolution layer and the k-th scaling layer to an input value; and (ii) the converting the k-th initial convolution layer to the k-th integrated convolution layer such that the difference between the k-integrated convolution layer operation and the result generated by applying the input value to the input value is smaller than a threshold value; ) When k is a constant of 2 or more and m or less, (i) the (k-1) inverse scaling layer, the kth initial convolution layer, and the kth scaling layer are applied to input values. The kth initial convolution layer such that the difference between the result generated by (ii) the result generated by applying the operation of the kth integrated convolution layer to the input value is smaller than the threshold value. 9. The computing device of claim 8, wherein is converted to the kth integrated convolution layer.
前記プロセッサが、
(V)前記第kコンボリューションブロックに含まれた前記第k統合コンボリューションレイヤの重み付け値を量子化して、前記第kコンボリューションブロックにより遂行されるCNN演算に対する最適化重み付け値として、第k量子化重み付け値を生成するプロセス;をさらに遂行することを特徴とする請求項8に記載のコンピューティング装置。

The processor is
(V) The weighting value of the kth integrated convolution layer included in the kth convolution block is quantized, and the kth quantum is used as an optimized weighting value for the CNN operation performed by the kth convolution block. 9. The computing device of claim 8, further comprising the step of: generating a quantization weighting value.

JP2019238383A 2019-01-23 2019-12-27 Methods and equipment for transforming CNN layers to optimize CNN parameter quantization used in mobile devices or precision small networks through hardware optimization Active JP6872264B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US16/255,197 2019-01-23
US16/255,197 US10325352B1 (en) 2019-01-23 2019-01-23 Method and device for transforming CNN layers to optimize CNN parameter quantization to be used for mobile devices or compact networks with high precision via hardware optimization

Publications (2)

Publication Number Publication Date
JP2020119518A true JP2020119518A (en) 2020-08-06
JP6872264B2 JP6872264B2 (en) 2021-05-19

Family

ID=66826142

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019238383A Active JP6872264B2 (en) 2019-01-23 2019-12-27 Methods and equipment for transforming CNN layers to optimize CNN parameter quantization used in mobile devices or precision small networks through hardware optimization

Country Status (5)

Country Link
US (1) US10325352B1 (en)
EP (1) EP3686808B1 (en)
JP (1) JP6872264B2 (en)
KR (1) KR102349916B1 (en)
CN (1) CN111476341B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10560696B2 (en) * 2018-06-25 2020-02-11 Tfi Digital Media Limited Method for initial quantization parameter optimization in video coding
US11551054B2 (en) 2019-08-27 2023-01-10 International Business Machines Corporation System-aware selective quantization for performance optimized distributed deep learning
JP7357225B2 (en) * 2020-03-27 2023-10-06 パナソニックIpマネジメント株式会社 How to perform inference
KR102368590B1 (en) * 2020-05-19 2022-03-02 삼성전자주식회사 Electronic apparatus and control method thereof
WO2021251614A1 (en) 2020-06-12 2021-12-16 Samsung Electronics Co., Ltd. Image processing apparatus and method of operating the same
KR20220045357A (en) * 2020-10-05 2022-04-12 삼성전자주식회사 Electronic device and method for controlling electronic device
KR102539876B1 (en) * 2020-11-30 2023-06-02 경희대학교 산학협력단 Layer optimization system for 3d rram device using artificial intelligence technology and method thereof
WO2023008678A1 (en) * 2021-07-30 2023-02-02 삼성전자 주식회사 Image processing device and operation method thereof
GB2622875A (en) * 2022-09-30 2024-04-03 Imagination Tech Ltd Methods and systems for performing channel equalisation on a convolution layer in a neural network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015078018A1 (en) * 2013-11-30 2015-06-04 Xiaoou Tang Method and system for face image recognition
WO2017196931A1 (en) * 2016-05-10 2017-11-16 Google Llc Frequency based audio analysis using neural networks
WO2018031833A1 (en) * 2016-08-12 2018-02-15 The Procter & Gamble Company Aerosol container having valve cup with integral bag
JP2018181124A (en) * 2017-04-18 2018-11-15 Kddi株式会社 Program for improving sense of resolution in encoder/decoder convolutional neural network

Family Cites Families (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9418319B2 (en) * 2014-11-21 2016-08-16 Adobe Systems Incorporated Object detection using cascaded convolutional neural networks
US10410096B2 (en) * 2015-07-09 2019-09-10 Qualcomm Incorporated Context-based priors for object detection in images
US10970617B2 (en) * 2015-08-21 2021-04-06 Institute Of Automation Chinese Academy Of Sciences Deep convolutional neural network acceleration and compression method based on parameter quantification
US11074492B2 (en) * 2015-10-07 2021-07-27 Altera Corporation Method and apparatus for performing different types of convolution operations with the same processing elements
US9965719B2 (en) * 2015-11-04 2018-05-08 Nec Corporation Subcategory-aware convolutional neural networks for object detection
US20170124409A1 (en) * 2015-11-04 2017-05-04 Nec Laboratories America, Inc. Cascaded neural network with scale dependent pooling for object detection
US9904874B2 (en) * 2015-11-05 2018-02-27 Microsoft Technology Licensing, Llc Hardware-efficient deep convolutional neural networks
US10002313B2 (en) * 2015-12-15 2018-06-19 Sighthound, Inc. Deeply learned convolutional neural networks (CNNS) for object localization and classification
US9858496B2 (en) * 2016-01-20 2018-01-02 Microsoft Technology Licensing, Llc Object detection and classification in images
CN108475331B (en) * 2016-02-17 2022-04-05 英特尔公司 Method, apparatus, system and computer readable medium for object detection
US10354362B2 (en) * 2016-09-08 2019-07-16 Carnegie Mellon University Methods and software for detecting objects in images using a multiscale fast region-based convolutional neural network
US10387740B2 (en) * 2016-10-10 2019-08-20 Gyrfalcon Technology Inc. Object detection and recognition apparatus based on CNN based integrated circuits
US11321609B2 (en) * 2016-10-19 2022-05-03 Samsung Electronics Co., Ltd Method and apparatus for neural network quantization
US20180107926A1 (en) * 2016-10-19 2018-04-19 Samsung Electronics Co., Ltd. Method and apparatus for neural network quantization
US10198671B1 (en) * 2016-11-10 2019-02-05 Snap Inc. Dense captioning with joint interference and visual context
CN106504190B (en) * 2016-12-29 2019-09-13 浙江工商大学 A kind of three-dimensional video-frequency generation method based on 3D convolutional neural networks
US11392825B2 (en) * 2017-01-09 2022-07-19 Samsung Electronics Co., Ltd. Method and algorithm of recursive deep learning quantization for weight bit reduction
US20180211403A1 (en) * 2017-01-20 2018-07-26 Ford Global Technologies, Llc Recurrent Deep Convolutional Neural Network For Object Detection
CN108345939B (en) * 2017-01-25 2022-05-24 微软技术许可有限责任公司 Neural network based on fixed-point operation
US10127495B1 (en) * 2017-04-14 2018-11-13 Rohan Bopardikar Reducing the size of a neural network through reduction of the weight matrices
CN107239826A (en) * 2017-06-06 2017-10-10 上海兆芯集成电路有限公司 Computational methods and device in convolutional neural networks
GB201709672D0 (en) * 2017-06-16 2017-08-02 Ucl Business Plc A system and computer-implemented method for segmenting an image
CN107330852A (en) * 2017-07-03 2017-11-07 深圳市唯特视科技有限公司 A kind of image processing method based on real-time zero point image manipulation network
US10474908B2 (en) * 2017-07-06 2019-11-12 GM Global Technology Operations LLC Unified deep convolutional neural net for free-space estimation, object detection and object pose estimation
US10878273B2 (en) * 2017-07-06 2020-12-29 Texas Instruments Incorporated Dynamic quantization for deep neural network inference system and method
US10728553B2 (en) * 2017-07-11 2020-07-28 Sony Corporation Visual quality preserving quantization parameter prediction with deep neural network
JP7149692B2 (en) * 2017-08-09 2022-10-07 キヤノン株式会社 Image processing device, image processing method
KR20190034985A (en) * 2017-09-25 2019-04-03 삼성전자주식회사 Method and apparatus of artificial neural network quantization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015078018A1 (en) * 2013-11-30 2015-06-04 Xiaoou Tang Method and system for face image recognition
WO2017196931A1 (en) * 2016-05-10 2017-11-16 Google Llc Frequency based audio analysis using neural networks
WO2018031833A1 (en) * 2016-08-12 2018-02-15 The Procter & Gamble Company Aerosol container having valve cup with integral bag
JP2018181124A (en) * 2017-04-18 2018-11-15 Kddi株式会社 Program for improving sense of resolution in encoder/decoder convolutional neural network

Also Published As

Publication number Publication date
CN111476341B (en) 2024-04-12
EP3686808C0 (en) 2024-01-24
US10325352B1 (en) 2019-06-18
CN111476341A (en) 2020-07-31
EP3686808B1 (en) 2024-01-24
JP6872264B2 (en) 2021-05-19
KR20200091785A (en) 2020-07-31
EP3686808A1 (en) 2020-07-29
KR102349916B1 (en) 2022-01-12

Similar Documents

Publication Publication Date Title
JP2020119518A (en) Method and device for transforming cnn layers to optimize cnn parameter quantization to be used for mobile devices or compact networks with high precision via hardware optimization
JP2019067408A (en) Learning method and learning device for image segmentation, and image segmentation method and image segmentation device using the same
US10282864B1 (en) Method and device for encoding image and testing method and testing device using the same
JP6863619B2 (en) Method and device for providing an integrated feature map using an ensemble of multiple outputs from a convolutional neural network {METHOD AND DEVICE FOR PROVIDING INTERGRATED FEATURE MAP USING ENSEMBLE OF MULTIPLE OUTPUTS FROM
JP6810415B2 (en) A monitoring image segmentation method and device that uses a weighted convolution filter for each grid cell by switching modes according to the class of the area in order to satisfy level 4 of an autonomous vehicle, and a test method and test device that uses it.
KR102112997B1 (en) Method and device for performing activation and convolution operation at the same time, learning method and learning device for the same
JP6957050B2 (en) Methods and devices that utilize masking parameters to pool ROI that can be used to optimize hardware applicable to mobile devices or small networks, and test methods and devices that utilize them {LEARNING METHOD AND LEARNING DEVICE FOR POOLING ROI BY USING MASKING PARAMETERS TO BE USED FOR MOBILE DEVICES OR COMPACT NETWORKS VIA HARDWARE optimester
KR20200095356A (en) Method for recognizing face using multiple patch combination based on deep neural network with fault tolerance and fluctuation robustness in extreme situation
JP6970460B2 (en) FL (Fractional Length) value using weighted quantization loss value to quantize CNN parameters and feature values used to optimize hardware applicable to mobile devices or precision small networks. how to determine and apparatus {mETHOD aND dEVICE fOR dETERMINING FL VALUE BY USING WEIGHTED QUANTIZATION LOSS VALUES tO THEREBY QUANTIZE CNN PARAMETERS aND FEATURE VALUES tO bE USED fOR OPTIMIZING HARDWARE APPLICABLE tO MOBILE dEVICES oR COMPACT NETWORKS wITH HIGH PRECISION}
JP7252120B2 (en) A learning method and device for extracting features from input images in a plurality of blocks in a CNN so that hardware optimization that satisfies the core figure of merit is performed, and a test method and device using the same
US10325185B1 (en) Method and device for online batch normalization, on-device learning, and continual learning applicable to mobile devices or IOT devices additionally referring to one or more previous batches to be used for military purpose, drone or robot, and testing method and testing device using the same
JP2020038666A (en) Method for generating data set for learning for detection of obstacle in autonomous driving circumstances and computing device, learning method, and learning device using the same
KR102313604B1 (en) Learning method, learning device with multi feeding layers and test method, test device using the same
KR102320995B1 (en) Learning method and learning device for object detector to be used for surveillance based on convolutional neural network capable of converting modes according to scales of objects, and testing method and testing device using the same
KR20200040185A (en) Learniung method and device for neural network at adaptive learning rate, and testing method and device using the same
JP2020119567A (en) Method and device for performing on-device continual learning of neural network which analyzes input data to be used for smartphones, drones, ships, or military purpose, and method and device for testing neural network learned by the same
KR20200066143A (en) Method for lighting neural network using ruduction-repetition block and apparatus using the same
JP6856957B2 (en) Learning methods and devices to allow CNNs learned in the virtual world used in the real world by converting run-time inputs using photo style conversion, and test methods and devices using them.
KR102349969B1 (en) Method and device for on-device continual learning of neural network which analyzes input data by optimized sampling of training images, and method and device for testing the neural network for smartphones, drones, vessels, or military purpose
CN117274049A (en) Video superdivision method based on quantization after training
CN115760942A (en) Monocular depth estimation method and device based on neural network and edge computing chip

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191227

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201124

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210217

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20210330

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210412

R150 Certificate of patent or registration of utility model

Ref document number: 6872264

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250