KR20180013674A - Method for lightening neural network and recognition method and apparatus using the same - Google Patents
Method for lightening neural network and recognition method and apparatus using the same Download PDFInfo
- Publication number
- KR20180013674A KR20180013674A KR1020170020034A KR20170020034A KR20180013674A KR 20180013674 A KR20180013674 A KR 20180013674A KR 1020170020034 A KR1020170020034 A KR 1020170020034A KR 20170020034 A KR20170020034 A KR 20170020034A KR 20180013674 A KR20180013674 A KR 20180013674A
- Authority
- KR
- South Korea
- Prior art keywords
- parameters
- layer
- layers
- neural network
- bit
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 81
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 65
- 210000000225 synapse Anatomy 0.000 claims abstract description 36
- 210000002569 neuron Anatomy 0.000 claims abstract description 18
- 238000010606 normalization Methods 0.000 claims description 80
- 230000000946 synaptic effect Effects 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 2
- 238000009826 distribution Methods 0.000 description 38
- 238000007906 compression Methods 0.000 description 32
- 230000008569 process Effects 0.000 description 32
- 230000006835 compression Effects 0.000 description 29
- 238000010586 diagram Methods 0.000 description 25
- 238000013139 quantization Methods 0.000 description 22
- 239000013585 weight reducing agent Substances 0.000 description 17
- 238000003860 storage Methods 0.000 description 15
- 230000006837 decompression Effects 0.000 description 14
- 238000005520 cutting process Methods 0.000 description 13
- 230000008859 change Effects 0.000 description 10
- 230000007423 decrease Effects 0.000 description 10
- 238000012545 processing Methods 0.000 description 9
- 238000012795 verification Methods 0.000 description 8
- 230000003247 decreasing effect Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000014509 gene expression Effects 0.000 description 4
- 230000003864 performance function Effects 0.000 description 4
- 238000012805 post-processing Methods 0.000 description 4
- 239000013598 vector Substances 0.000 description 4
- 239000000284 extract Substances 0.000 description 3
- 230000000593 degrading effect Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000011946 reduction process Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 229920001690 polydopamine Polymers 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Image Analysis (AREA)
Abstract
Description
아래 실시예들은 뉴럴 네트워크의 경량화 방법, 이를 이용한 인식 방법, 및 그 장치에 관한 것이다.The following embodiments relate to a neural network lightening method, a recognition method using the neural network, and a device thereof.
객체 인식은 입력 데이터에 포함된 특정 객체를 인식하는 방법이다. 객체는 영상과 음성 등 일정한 패턴에 따라 인식의 대상이 되는 다양한 데이터를 포함할 수 있다. 예를 들어, 영상 기반의 객체 분류기는 입력 영상에 포함된 특정 객체를 자동으로 찾아낼 수 있다. 객체 분류기는 뉴런들 및 뉴런들을 연결하는 다수의 시냅스들을 포함할 수 있고, 학습 데이터(training data)에 기초하여 학습(training)될 수 있다. 객체 분류기에 포함된 뉴런들 및 시냅스들의 수에 따라 학습 및 인식을 위한 메모리 사용량이 급격하게 증가할 수 있고, 편중되거나 과도한 학습은 과적합(overfitting) 등을 야기할 수 있다.Object recognition is a method of recognizing a specific object included in input data. The object may include various data to be recognized according to a certain pattern such as image and voice. For example, an image-based object classifier can automatically find a specific object included in an input image. The object classifier may include a plurality of synapses connecting neurons and neurons and may be trained based on training data. Depending on the number of neurons and synapses included in the object classifier, the memory usage for learning and recognition may increase dramatically, and biased or excessive learning may lead to overfitting.
뉴럴 네트워크는 각각 뉴런들을 포함하는 복수의 레이어들 및 이웃한 레이어들에 포함된 상기 뉴런들을 연결하는 시냅스들을 포함한다.The neural network includes a plurality of layers each including neurons and synapses connecting the neurons contained in neighboring layers.
일 측에 따르면, 뉴럴 네트워크에 있어서 0보다 크고 a(a>0)보다 작은 값을 가지는 시냅스 가중치들 중 적어도 일부가 0으로 설정된다. 상기 0으로 설정된 시냅스 가중치들은 상기 복수의 레이어들 중 일부의 이웃한 레이어들을 연결하는 시냅스들에 해당할 수 있다. 상기 a는 상기 복수의 레이어들 별로 다르게 설정될 수 있다. 또는, 상기 a는 특정 레이어 내 출력 맵 채널 별로 다르게 설정될 수 있다.According to one aspect, at least some of the synaptic weights having a value greater than 0 and less than a (a > 0) in the neural network are set to zero. The synapse weights set to 0 may correspond to synapses connecting neighboring layers of some of the plurality of layers. The a may be set differently for the plurality of layers. Alternatively, the value a may be set differently for each output map channel in a specific layer.
b(b>a)보다 큰 값을 가지는 시냅스 가중치들 중 적어도 일부가 상기 b로 설정될 수 있다. 상기 b로 설정된 시냅스 가중치들은 상기 복수의 레이어들 중 일부의 이웃한 레이어들을 연결하는 시냅스들에 해당할 수 있다. 상기 b는 상기 복수의 레이어들 별로 다르게 설정될 수 있다. 또는, 상기 b는 특정 레이어 내 출력 맵 채널 별로 다르게 설정될 수 있다.At least some of the synaptic weights having a value greater than b (b > a) may be set to b. The synapse weights set in b may correspond to synapses connecting neighboring layers of some of the plurality of layers. The b may be set differently for each of the plurality of layers. Alternatively, b may be set differently for each output map channel in a specific layer.
상기 a보다 크거나 같은 값을 가지는 시냅스 가중치들 각각은 log2(max-a)에 대응하는 비트 수-상기 max는 상기 a보다 큰 최대 시냅스 가중치이고, 상기 a 및 상기 max는 정수임-로 표현될 수 있다. 상기 a보다 크거나 같은 값을 가지고, 상기 b보다 작거나 같은 값을 가지는 시냅스 가중치들 각각은 log2(b-a)에 대응하는 비트 수-상기 a 및 상기 b는 정수임-로 표현될 수 있다.Wherein each of the synaptic weights having a value equal to or greater than a is a maximum number of bits corresponding to log 2 (max-a), wherein max is a maximum synapse weight greater than a, and a and max are integers . Each of the synaptic weights having a value equal to or greater than the a and having a value less than or equal to b may be expressed by the number of bits corresponding to log 2 (ba), where a and b are integers.
일 측에 따르면, 뉴럴 네트워크에 있어서 b(b>0)보다 큰 값을 가지는 시냅스 가중치들 중 적어도 일부가 b로 설정된다. 상기 b로 설정된 시냅스 가중치들은 상기 복수의 레이어들 중 일부의 이웃한 레이어들을 연결하는 시냅스들에 해당할 수 있다. 상기 b는 상기 복수의 레이어들 별로 다르게 설정될 수 있다. 상기 b는 특정 레이어 내 출력 맵 채널 별로 다르게 설정될 수 있다. 상기 b보다 작거나 같은 값을 가지는 시냅스 가중치들 각각은 log2(b)에 대응하는 비트 수-상기 b는 정수임-로 표현될 수 있다.According to one aspect, at least some of the synaptic weights having a value greater than b (b> 0) in the neural network are set to b. The synapse weights set in b may correspond to synapses connecting neighboring layers of some of the plurality of layers. The b may be set differently for each of the plurality of layers. B may be set differently for each output map channel in a specific layer. Each of the synapse weights having a value less than or equal to b may be expressed by the number of bits corresponding to log2 (b), where b is an integer.
일 측에 따른 인식 방법은 뉴럴 네트워크에 포함된 레이어에 대응하는 파라미터들의 분포에 기초하여 정규화된(regularized) 파라미터들을 획득하는 단계; 상기 레이어에 대응하는 정규화 변수에 기초하여, 상기 정규화된 파라미터들을 비정규화(de-regularization)하는 단계; 상기 레이어에 상기 비정규화된 파라미터들을 적용하는 단계; 및 상기 뉴럴 네트워크를 이용하여, 입력 데이터를 인식하는 단계를 포함할 수 있다.A method according to one aspect of the present invention includes obtaining parameters that are regularized based on a distribution of parameters corresponding to layers included in a neural network; De-normalizing the normalized parameters based on a normalization variable corresponding to the layer; Applying the non-normalized parameters to the layer; And recognizing input data using the neural network.
상기 레이어에 대응하는 정규화 변수는 상기 뉴럴 네트워크에 포함된 복수의 레이어들 별로 상이하게 설정되거나, 상기 레이어에 포함된 복수의 출력 맵 채널들 별로 상이하게 설정될 수 있다.The normalization variable corresponding to the layer may be set differently for a plurality of layers included in the neural network or may be set differently for a plurality of output map channels included in the layer.
상기 정규화 변수는 0을 기준으로 상기 정규화된 파라미터들을 시프트(shift) 시키는 오프셋을 포함할 수 있다. 상기 비정규화된 파라미터들이 m비트의 정수이고, 상기 뉴럴 네트워크가 상기 m비트보다 큰 n비트의 실수를 입력 받는 경우, 상기 레이어에 상기 비정규화된 파라미터들을 적용하는 단계는 상기 비정규화된 파라미터들을 상기 n비트의 실수로 비양자화(de-quantization)하는 단계; 및 상기 레이어에 상기 비양자화된 파라미터들을 적용하는 단계를 더 포함할 수 있다.The normalization variable may include an offset to shift the normalized parameters with respect to zero. Wherein when the denormalized parameters are m bit integers and the neural network receives an n-bit real number greater than the m bits, applying the denormalized parameters to the layer further comprises: de-quantizing by an error of n bits; And applying the non-quantized parameters to the layer.
상기 인식 방법은 상기 레이어에 상기 비정규화된 파라미터들을 적용하는 단계는 상기 레이어에 대응하여, 파라미터의 값이 0인지 여부를 지시하는 비트 시퀀스를 획득하는 단계; 상기 비트 시퀀스에 기초하여, 논-제로 시퀀스를 구성하는 상기 비정규화된 파라미터들의 압축을 해제하는 단계; 및 상기 레이어에 상기 압축 해제된 파라미터들을 적용하는 단계를 더 포함할 수 있다. 상기 비정규화된 파라미터들의 압축을 해제하는 단계는 상기 비트 시퀀스 내 제1 인덱스의 비트 값과 상기 논-제로 시퀀스 내 제2 인덱스의 파라미터를 곱하여, 상기 제1 인덱스의 압축 해제된 파라미터를 결정하는 단계; 상기 제2 인덱스를 상기 비트 시퀀스 내 상기 제1 인덱스의 비트 값만큼 증가시키는 단계; 및 상기 제1 인덱스를 1만큼 증가시키는 단계를 포함할 수 있다.Wherein the applying the non-normalized parameters to the layer comprises: obtaining a bit sequence corresponding to the layer, the bit sequence indicating whether the value of the parameter is zero; Decompressing said non-normalized parameters constituting a non-zero sequence based on said bit sequence; And applying the decompressed parameters to the layer. Decompressing the denormalized parameters comprises determining a decompressed parameter of the first index by multiplying a bit value of the first index in the bit sequence by a parameter of a second index in the non-zero sequence, ; Increasing the second index by a bit value of the first index in the bit sequence; And increasing the first index by one.
일 측에 따른 인식 장치는 프로세서; 및 컴퓨터에서 읽을 수 있는 명령어를 포함하는 메모리를 포함하고, 상기 명령어가 상기 프로세서에서 실행되면, 상기 프로세서는 뉴럴 네트워크에 포함된 레이어에 대응하는 파라미터들의 분포에 기초하여 정규화된(regularized) 파라미터들을 획득하고, 상기 레이어에 대응하는 정규화 변수에 기초하여, 상기 정규화된 파라미터들을 비정규화(de-regularization)하고, 상기 레이어에 상기 비정규화된 파라미터들을 적용하고, 상기 뉴럴 네트워크를 이용하여, 입력 데이터를 인식한다.A recognition device according to one side comprises: a processor; And a memory containing instructions readable by the computer, wherein when the instruction is executed in the processor, the processor obtains parameters that are regularized based on a distribution of parameters corresponding to layers included in the neural network De-normalizes the normalized parameters based on a normalization variable corresponding to the layer, applies the non-normalized parameters to the layer, and recognizes input data using the neural network do.
도 1은 일 실시예에 따른 뉴럴 네트워크의 경량화 장치를 나타낸 도면.
도 2는 일 실시예에 따른 양자화 과정을 나타낸 도면.
도 3은 일 실시예에 따른 컷오프 동작을 나타낸 도면.
도 4는 일 실시예에 따른 절단 동작을 나타낸 도면.
도 5a 및 도 5b는 일 실시예에 따른 정규화 동작 및 그에 따른 파라미터들의 분포를 설명하는 도면들.
도 6은 일 실시예에 따른 반복적 정규화 과정을 나타낸 동작 흐름도.
도 7a 및 도 7b는 실시예들에 따른 후보 범위를 결정하는 방법을 나타낸 도면들.
도 8은 일 실시예에 따른 정규화에 의한 시퀀스의 변화를 나타낸 도면.
도 9는 일 실시예에 따른 압축에 의한 시퀀스의 변화를 나타낸 도면.
도 10은 일 실시예에 따른 경량화에 의한 파라미터들의 분포 변화를 나타낸 도면.
도 11은 일 실시예에 따른 학습된 파라미터들의 후처리 과정을 나타낸 도면.
도 12는 일 실시예에 따른 파라미터 튜닝 과정을 나타낸 도면.
도 13은 일 실시예에 따른 학습 과정을 나타낸 도면.
도 14는 일 실시예에 따른 인식 과정을 나타낸 도면.
도 15는 일 실시예에 따른 복원에 의한 파라미터들의 분포 변화를 나타낸 도면.
도 16은 일 실시예에 따른 압축 해제에 의한 시퀀스의 변화를 나타낸 도면.
도 17은 일 실시예에 따른 나눗셈에 의한 시퀀스의 변화를 나타낸 도면.
도 18은 일 실시예에 따른 나눗셈 및 압축에 의한 시퀀스의 변화를 나타낸 도면.
도 19는 일 실시예에 따른 경량화 방법을 나타낸 동작 흐름도.
도 20은 일 실시예에 따른 인식 방법을 나타낸 동작 흐름도.
도 21은 일 실시예에 따른 전자 시스템을 나타낸 도면.BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a view of a lightening device for a neural network according to one embodiment.
FIG. 2 illustrates a quantization process according to an embodiment; FIG.
3 illustrates a cut-off operation in accordance with one embodiment;
4 illustrates a cutting operation according to one embodiment;
5A and 5B are diagrams illustrating a normalization operation and a distribution of parameters according to an embodiment.
6 is an operational flow diagram illustrating an iterative normalization process according to an embodiment;
Figures 7A and 7B are diagrams illustrating a method for determining a candidate range according to embodiments.
8 illustrates a variation of a sequence by normalization according to one embodiment;
FIG. 9 illustrates a variation of a sequence by compression in accordance with one embodiment; FIG.
10 illustrates a variation of the distribution of parameters by weighting according to one embodiment.
11 illustrates a post-processing process of learned parameters in accordance with an embodiment;
12 illustrates a parameter tuning process according to an embodiment;
13 illustrates a learning process according to an embodiment;
FIG. 14 illustrates a recognition process according to an embodiment; FIG.
15 illustrates a variation of the distribution of parameters by restoration according to an embodiment;
Figure 16 illustrates a variation of a sequence by decompression according to one embodiment;
FIG. 17 is a diagram illustrating a sequence change by division according to an embodiment; FIG.
18 shows a variation of a sequence by division and compression according to an embodiment;
19 is an operational flow diagram illustrating a method of weight reduction according to one embodiment.
20 is an operational flowchart illustrating a recognition method according to an embodiment;
21 illustrates an electronic system according to one embodiment.
본 명세서에 개시되어 있는 실시예들의 특정한 구조 또는 기능들은 단지 기술적 개념을 설명하기 위한 목적으로 예시된 것으로서, 다양한 다른 형태로 실시될 수 있다. The specific structure or functions of the embodiments disclosed herein are merely illustrative of the technical concept, and may be embodied in various other forms.
제1 또는 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 이런 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 이해되어야 한다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소는 제1 구성요소로도 명명될 수 있다.The terms first or second may be used to describe various components, but such terms should be understood only for the purpose of distinguishing one component from another. For example, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 등의 용어는 설시된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함으로 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The singular expressions include plural expressions unless the context clearly dictates otherwise. In this specification, the words "comprising ", etc. are intended to designate the presence of stated features, integers, steps, operations, elements, parts or combinations thereof, It is to be understood that they do not preclude the presence or addition of components, components or combinations thereof.
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 해당 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 명세서에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art. Terms such as those defined in commonly used dictionaries are to be interpreted as having a meaning consistent with the meaning of the context in the relevant art and, unless explicitly defined herein, are to be interpreted as ideal or overly formal Do not.
이하, 실시예들을 첨부된 도면을 참조하여 상세하게 설명한다. 각 도면에 제시된 동일한 참조 부호는 동일한 부재를 나타낸다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. Like reference symbols in the drawings denote like elements.
도 1은 일 실시예에 따른 뉴럴 네트워크의 경량화 장치를 나타낸 도면이다. 도 1을 참조하면, 경량화 장치(100)는 뉴럴 네트워크에 포함된 레이어에 대응하는 파라미터들을 획득한다. 뉴럴 네트워크는 복수의 레이어들을 포함할 수 있고, 레이어들 각각은 복수의 뉴런들을 포함할 수 있다. 이웃한 레이어들의 뉴런들은 시냅스들로 연결될 수 있다. 학습에 따라 시냅스들에는 가중치들이 부여될 수 있고, 파라미터들은 이러한 가중치들을 포함할 수 있다.FIG. 1 is a view illustrating an apparatus for reducing weight of a neural network according to an exemplary embodiment of the present invention. Referring to FIG. 1, the light-
경량화 장치(100)는 획득된 파라미터들을 경량화한다. 경량화 장치(100)는 양자화(quantization), 정규화(regularization) 및 압축(compression) 중 적어도 하나를 통해 파라미터들을 경량화할 수 있다. 양자화는 데이터의 사이즈가 감소하도록 표현 방식을 변환하는 것이고, 정규화는 절단(truncation) 동작 및 컷오프(cutoff) 동작 중 적어도 하나를 통해 파라미터들이 갖는 값의 범위를 감소시키는 것이고, 압축은 값이 0인 파라미터를 분류하여 데이터의 사이즈를 감소시키는 것이다. 양자화, 정규화 및 압축에 관한 구체적인 내용은 후술하도록 한다.The lightening
도 1에 도시된 그래프들에서, 가로 축은 파라미터들의 값을 나타내고, 세로 축은 파라미터들의 빈도를 나타낸다. 파라미터들은 학습 과정에 따라 다양한 값을 가질 수 있고, 경량화 장치(100)는 경량화를 통해 파라미터들의 값을 제한할 수 있다. 경량화 이전의 파라미터들은 제1 범위에 분포된다. 경량화에 따라 파라미터들의 값이 제한되고, 파라미터들은 제1 범위에 비해 좁은 제2 범위에 분포하게 된다. 파라미터들의 분포 범위가 제한됨에 따라 뉴럴 네트워크의 메모리 사용량이 감소할 수 있다. 이하, 제1 범위는 원 범위(original range)라고 하고, 제2 범위는 경량 범위(light-weight range)라고 한다.In the graphs shown in FIG. 1, the horizontal axis represents the values of the parameters, and the vertical axis represents the frequency of the parameters. The parameters may have various values depending on the learning process, and the
정교한 학습을 위해 뉴럴 네트워크에 포함된 레이어의 수를 증가시킬 수 있는데, 레이어의 수가 증가함에 따라 뉴럴 네트워크의 학습 및 뉴럴 네트워크를 통한 인식에 요구되는 자원은 급격하게 증가하게 된다. 뉴럴 네트워크의 경량화는 이러한 자원의 증가를 억제할 수 있다. 이하, 뉴럴 네트워크의 경량화는 뉴럴 네트워크를 위한 파라미터들의 경량화를 의미할 수 있다.For sophisticated learning, the number of layers included in the neural network can be increased. As the number of layers increases, the resources required for learning through the neural network and recognition through the neural network increase sharply. The weight reduction of the neural network can suppress the increase of such resources. Hereinafter, weight reduction of the neural network may mean weight reduction of the parameters for the neural network.
뉴럴 네트워크의 경량화에 따라 고도의 자원을 활용 가능한 서버뿐만 아니라, 사용 가능한 자원이 제한적인 사용자 기기에서도 뉴럴 네트워크의 학습이 가능할 수 있다. 따라서, 사용자는 모바일 단말과 같은 사용자 기기를 통해 최적화된 모델을 온라인으로 학습시킬 수 있다. 한편, 편중되거나 과도한 학습에 따라 뉴럴 네트워크에는 과적합(overfitting)이 발생할 수 있고, 과적합에 따라 뉴럴 네트워크의 성능이 저하될 수 있다. 뉴럴 네트워크의 경량화는 과적합을 야기하는 불필요한 파라미터들을 제거하거나 보완할 수 있다. 따라서, 뉴럴 네트워크의 경량화를 통해 뉴럴 네트워크의 성능을 높일 수 있다.As neural networks become lightweight, learning of neural networks can be possible not only in servers that can utilize highly sophisticated resources but also in user devices with limited available resources. Accordingly, the user can learn an optimized model online through a user equipment such as a mobile terminal. On the other hand, excessive or excessive learning can cause overfitting in the neural network, and the performance of the neural network may be degraded depending on the overlay. The light weight of the neural network can eliminate or compensate for unnecessary parameters that cause over sum. Therefore, the performance of the neural network can be enhanced by reducing the weight of the neural network.
뉴럴 네트워크를 경량화 하는 경량화 과정은 학습 및 인식을 위한 다양한 동작들에 적용될 수 있다. 예를 들어, 경량화 과정은 학습이 완료된 파라미터들의 후처리에 적용되거나, 학습이 완료된 파라미터들의 튜닝에 적용되거나, 파라미터들의 학습에 직접 적용될 수 있다. 이러한 경량화 과정을 통하여 학습이 완료된 파라미터들이 차지하는 메모리가 감소되고, 과적합의 해소를 통해 뉴럴 네트워크의 성능이 향상될 수 있다.The lightweighting process of lighter weight neural networks can be applied to various operations for learning and recognition. For example, the lighterization process may be applied to post-processing of learned parameters, to tuning of learned parameters, or to learning of parameters directly. Through this weight reduction process, the memory occupied by the learned parameters is reduced, and the performance of the neural network can be improved by solving the overarching agreement.
경량화된 파라미터는 저장 장치에 저장될 수 있고, 인식 과정에서 이용될 수 있다. 복원 장치는 파라미터들에 적용된 경량화 기법에 따라, 비양자화(de-quantization), 비정규화(de-regularization) 및 압축 해제(de-compression) 중 적어도 하나를 통해 파라미터를 복원할 수 있다.The lightened parameters can be stored in the storage device and used in the recognition process. The restoration device may restore the parameters through at least one of de-quantization, de-regularization, and de-compression in accordance with the lightening technique applied to the parameters.
도 2는 일 실시예에 따른 양자화 과정을 나타낸 도면이다. 양자화는 데이터의 사이즈가 감소하도록 표현 방식을 변환하는 것을 의미한다. 파라미터들은 시스템에 따라 미리 정해진 표현 방식을 가질 수 있다. 예를 들어, 파라미터들은 부동 소수점(floating-point) 타입의 소수(decimal)로 표현될 수 있다. 경량화 장치는 경량화를 위해 데이터의 사이즈가 감소하도록 파라미터들의 표현 방식을 변환할 수 있다. 예를 들어, 경량화 장치는 파라미터들의 표현 방식을 고정 소수점(fixed-point) 타입의 정수(integer)로 변환할 수 있다. 일 측에 따르면, 경량화 장치는 양자화를 위해 양자화 함수(2Q)를 이용할 수 있다. 예를 들어, 32-비트의 부동 소수점으로 표현된 파라미터들은 양자화 함수(2Q)를 통해 16-비트의 고정 소수점으로 표현될 수 있다.2 is a diagram illustrating a quantization process according to an embodiment. Quantization means transforming the representation to reduce the size of the data. The parameters may have a predetermined expression depending on the system. For example, parameters can be represented as a decimal number of floating-point type. The light weighting device can convert the expression of the parameters so that the size of the data decreases in order to reduce the weight. For example, a lightweight device may convert the representation of parameters into an integer of a fixed-point type. According to one aspect, the lightweighting device may use a quantization function ( 2Q ) for quantization. For example, parameters expressed as 32-bit floating-point numbers may be represented as 16-bit fixed-point numbers through a quantization function ( 2Q ).
소수 범위, 정수 범위, 부동 소수점 및 고정 소수점은 하나의 예시에 불과하며, 양자화에는 이들 외에도 잘 알려진 표현 방식이 적용될 수 있다. 또한, 실시예에 따른 뉴럴 네트워크의 경량화에는 양자화, 정규화 및 압축 중 적어도 하나가 적용될 수 있으므로, 정규화 및 압축만으로도 뉴럴 네트워크의 경량화가 수행될 수 있다. 다만, 아래에서는 설명의 편의를 위해 파라미터들이 16-비트의 고정 소수점을 갖는 정수로 양자화된 경우를 예로 설명한다. 이 경우, 파라미터들은 -215에서 215-1의 정수 범위로 표현될 수 있다.The decimal range, integer range, floating point, and fixed point are only examples, and other well-known representations can be applied to quantization. In addition, since at least one of quantization, normalization and compression can be applied to light weight of the neural network according to the embodiment, weight reduction of the neural network can be performed by normalization and compression alone. However, for convenience of explanation, the following description will be made on the assumption that parameters are quantized into 16-bit fixed-point integers. In this case, the parameters may be expressed in an integer range of -2 15 to 2 15 -1.
도 3은 일 실시예에 따른 컷오프 동작을 나타낸 도면이다. 도 3을 참조하면, 파라미터들은 학습 과정에 따라 다양한 값을 가질 수 있다. 경량화 장치는 절단 동작 및 컷오프 동작 중 적어도 하나를 통해 파라미터들을 정규화할 수 있다. 컷오프 동작은 파라미터들을 미리 정해진 최대값 또는 최소값으로 설정하는 것이다. 경량화 장치는 최대값 이상의 파라미터를 최대값으로 설정할 수 있고, 최소값 이하의 파라미터를 최소값으로 설정할 수 있다. 최대값 및 최소값은 변수(b)에 의해 결정될 수 있다.3 is a diagram illustrating a cutoff operation according to an exemplary embodiment. Referring to FIG. 3, the parameters may have various values depending on the learning process. The lightening device may normalize the parameters through at least one of a cutting operation and a cut-off operation. The cut-off operation is to set the parameters to a predetermined maximum or minimum value. The light weighting device can set the parameter that is the maximum value or more to the maximum value and the parameter that is the minimum value can be set to the minimum value. The maximum value and the minimum value can be determined by the variable (b).
파라미터들이 다양한 값을 갖는 것은 인식기의 성능에 도움을 줄 수 있지만, 파라미터들이 과도하게 크거나 과도하게 작은 값을 가질 경우 인식기의 성능이 저하될 수 있다. 따라서, 컷오프 동작을 통해 파라미터들의 값이 갖는 범위를 제한함으로써 인식기의 성능을 향상시킬 수 있다. 또한, 파라미터의 값을 제한함으로써 파라미터를 표현하기 위한 데이터의 사이즈를 감소시킬 수 있으므로, 컷오프 동작을 통해 경량화가 가능하다. 데이터의 사이즈를 감소시키면서, 인식기의 성능을 향상시키거나 적어도 유지하기 위해서는 파라미터들을 적절한 최대값 또는 최소값으로 컷오프할 필요가 있다. 컷오프를 위한 변수(b)의 결정 과정은 추후 상세히 설명한다.Having the various values of the parameters may help the performance of the recognizer, but the performance of the recognizer may be degraded if the parameters are excessively large or too small. Therefore, the performance of the recognizer can be improved by restricting the range of values of the parameters through the cutoff operation. In addition, since the size of the data for expressing the parameter can be reduced by limiting the value of the parameter, the weight can be reduced through the cut-off operation. In order to improve or at least maintain the performance of the recognizer while reducing the size of the data, it is necessary to cut the parameters to the appropriate maximum or minimum value. The process of determining the variable (b) for the cutoff will be described in detail later.
도 4는 일 실시예에 따른 절단 동작을 나타낸 도면이다. 경량화 장치는 절단 동작을 통해 파라미터들을 정규화할 수 있다. 도 4를 참조하면, 경량화 장치는 입력된 파라미터 중에 절단 범위 내의 파라미터를 0으로 설정한다. 절단 범위는 변수(a)에 의해 결정될 수 있다. 0에 가까운 파라미터는 인식기의 성능에 미치는 영향이 크지 않을 수 있지만, 추후 설명될 압축 과정에서 값 0을 갖는 파라미터는 사이즈를 크게 감소시킬 수 있으므로, 0에 가까운 파라미터를 0으로 설정함에 따라 경량화를 최대화할 수 있다. 다만, 데이터의 사이즈를 감소시키면서, 인식기의 성능을 향상시키거나 적어도 유지하기 위해서는 파라미터들을 적절한 절단 범위로 절단할 필요가 있다. 절단을 위한 변수(a)의 결정 과정은 추후 상세히 설명한다.4 is a view illustrating a cutting operation according to an embodiment. The lightening device may normalize the parameters through a cutting operation. Referring to Fig. 4, the lightening device sets the parameter within the cut-off range to 0 among the input parameters. The cutting range can be determined by the variable (a). A parameter close to 0 may have a small effect on the performance of the recognizer, but a parameter having a value of 0 in a compression process to be described later can greatly reduce the size, so that by setting a parameter close to 0 to 0, can do. However, in order to improve or at least maintain the performance of the recognizer while reducing the size of the data, it is necessary to cut the parameters to an appropriate cutting range. The process of determining the variable (a) for cutting will be described in detail later.
도 5a 및 도 5b는 일 실시예에 따른 정규화 동작 및 그에 따른 파라미터들의 분포를 설명하는 도면들이다. 도 5a를 참조하면, 컷오프 동작 및 절단 동작이 모두 수행된 경우를 예로 설명한다. 경량화 장치는 데이터의 사이즈를 감소시키면서, 인식기의 성능을 향상시키거나 적어도 유지하기 위해 원 범위에서 적절한 경량 범위를 추출할 수 있다. 5A and 5B are diagrams illustrating a normalization operation and a distribution of parameters according to an embodiment. Referring to FIG. 5A, a case where both the cutoff operation and the cutting operation are performed will be described as an example. The lightweighting device can extract the appropriate lightweight range from the original range to improve or at least maintain the performance of the recognizer while reducing the size of the data.
도 5b를 참조하면, 정규화 이전 파라미터 값들의 분포도(510) 및 정규화 이후 파라미터 값들의 분포도(520)를 나타낸다. 도 5b에서, x축은 파라미터들의 시퀀스를 나타내고, y축은 해당 시퀀스에서 파라미터의 값을 나타낸다. 원 범위는 입력된 파라미터 값들이 분포된 전체 범위에 해당하며, 분포도(510)에서 최소 y값 내지 최대 y값으로 표현될 수 있다. 경량 범위는 원 범위 중에 정규화에 의해 추출된 범위에 해당하며, 분포도(520)에서 y값이 분포된 범위(예를 들어, -b 내지 -a 및 a 내지 b)로 표현될 수 있다. 이처럼, 경량 범위는 변수(a) 및 변수(b)를 포함하는 정규화 변수에 의해 결정될 수 있다.Referring to FIG. 5B, a distribution diagram 510 of pre-normalization parameter values and a distribution diagram 520 of parameter values after normalization are shown. In Figure 5b, the x-axis represents the sequence of parameters and the y-axis represents the value of the parameter in that sequence. The original range corresponds to the entire range in which the input parameter values are distributed, and can be represented by a minimum y value to a maximum y value in the distribution diagram 510. The lightweight range corresponds to the range extracted by the normalization in the original range, and may be represented by a range (for example, -b to -a and a to b) in which the y value is distributed in the distribution diagram 520. [ As such, the lightweight range can be determined by a normalization variable including the variable (a) and the variable (b).
다시 도 5a를 참조하면, 경량화 장치는 정규화 변수를 조절하기 위해 변수(a)의 증가 및 변수(b)의 감소 중 적어도 하나를 수행할 수 있다. 일 실시예에 따르면, 경량화 장치는 정규화 변수를 반복적으로(iteratively) 조절할 수 있다. 예를 들어, 경량화 장치는 매 이터레이션마다 정규화 변수를 설정하고, 미리 정의된 성능 함수에 기초하여 정규화 변수에 따른 성능 지표를 구할 수 있다. 경량화 장치는 성능 지표가 미리 정해진 기준을 만족시킬 때까지 정규화 변수를 반복적으로 조절하면서 앞선 동작들을 반복할 수 있다. 성능 지표가 미리 정해진 기준을 만족시키는 경우, 경량화 장치는 이터레이션을 종료하고, 최종 정규화 변수에 기초하여 경량 범위를 결정할 수 있다. 성능 지표는 인식률 및/또는 에러율을 포함할 수 있다.Referring again to FIG. 5A, the lightening device may perform at least one of increasing the variable a and decreasing the variable b to adjust the normalization variable. According to one embodiment, the lightening device may adjust the normalization variable iteratively. For example, the lightweight device may set a normalization variable for each iteration and obtain a performance index according to the normalization variable based on a predefined performance function. The light weighting device can repeat the preceding operations while iteratively adjusting the normalization variable until the performance index satisfies a predetermined criterion. If the performance index meets a predetermined criterion, the lightening device may terminate the iteration and determine the lightweight range based on the final normalization variable. The performance indicator may include a recognition rate and / or an error rate.
미리 정해진 기준은 정규화 이후의 성능이 정규화 이전의 성능보다 나빠지지 않으면서, 최대한 이터레이션이 반복되도록 하는 제1 기준으로 설정되거나, 정규화 이후의 성능이 최대한 향상되도록 하는 제2 기준으로 설정될 수 있다. 아래에서 상세히 설명되겠으나, 제1 기준이 이용되는 경우 경량화가 최대화될 수 있으며, 제2 기준이 이용되는 경우 인식 성능이 최대화될 수 있다.The predetermined criterion may be set as a first criterion that permits repeated iterations to be repeated as much as possible without degrading the performance after normalization to that before the normalization or may be set as a second criterion that maximizes performance after normalization . As will be described in detail below, weight reduction can be maximized when a first criterion is used, and recognition performance can be maximized when a second criterion is used.
도 6은 일 실시예에 따른 반복적 정규화 과정을 나타낸 동작 흐름도이다. 도 6을 참조하면, 단계(625) 및 단계(635)를 통하여 목표 인식률이 결정된다. 단계(625)에서 원 학습 파라미터(original trained parameter)를 이용하여 검증 데이터베이스의 검증 데이터로부터 특징이 추출된다. 각각의 검증 데이터는 한 쌍(pair)의 데이터로 구성될 수 있다. 예를 들어, 검증 데이터는 동일인에 해당하는 한 쌍의 데이터로 구성되거나, 타인에 해당하는 한 쌍의 데이터로 구성될 수 있다. 단계(625)에서는 각 데이터의 특징이 추출될 수 있다.6 is a flowchart illustrating an iterative normalization process according to an exemplary embodiment of the present invention. Referring to FIG. 6, a target recognition rate is determined through
단계(635)에서 특징 매칭을 통하여 목표 인식률이 결정된다. 보다 구체적으로, 동일한 검증 데이터에 속한 한 쌍의 데이터로부터 각각 추출된 특징을 매칭함으로써, 인식률이 계산될 수 있다. 여기서, 인식률은 동일 얼굴의 성공적 인식률을 나타내는 VR(Verification Rate)일 수 있다. 동일인에 해당하는 한 쌍의 데이터의 특징 매칭 결과가 동일인을 지시하면 인식률이 증가하고, 타인을 지시하면 인식률이 감소될 수 있다. 단계(625)에서 원 학습 파라미터를 이용하여 특징을 추출하였으므로, 목표 인식률은 원 학습 파라미터에 의한 인식률일 수 있다.In
반복적 정규화(iterative regularization) 과정은 뉴럴 네트워크의 레이어 별로 정규화 변수인 a(예를 들어, 절단 포인트) 및 b(예를 들어, 컷오프 포인트)의 차이가 최소가 되는 시점까지 연속적으로 경량 범위를 탐색하는 과정이다.The iterative regularization process consecutively searches the lightweight range until the difference between the normalization variable a (for example, cutoff point) and b (for example, cutoff point) becomes minimum for each layer of the neural network Process.
일 실시예에 따르면, 단계(610), 단계(620), 단계(630), 및 단계(640)의 반복을 통하여, 반복적 정규화가 수행될 수 있다. 보다 구체적으로, 첫 이터레이션의 단계(610)에서 원 학습 파라미터의 정규화가 수행된다. 단계(620)에서 정규화된 파라미터를 이용하여 검증 데이터의 특징이 추출된다. 단계(630)에서 검증 데이터의 특징이 매칭됨으로써, 정규화된 인식률(regularized recognition rate)이 계산된다. 단계(640)에서 정규화된 인식률과 목표 인식률이 비교된다. 정규화된 인식률이 목표 인식률보다 작지 않은 경우, 단계(610)으로 돌아가 두 번째 이터레이션을 수행한다. 다른 실시예에 따르면 인식률 대신 에러율이 이용될 수 있다. 이 경우, 단계(640)은 정규화된 에러율이 목표 에러율보다 작으면 이터레이션을 반복하는 것으로 변형될 수 있다.According to one embodiment, iterative normalization may be performed through iterations of
두 번째 이후의 이터레이션의 단계(610)에서는 이전 이터레이션에서 정규화된 파라미터가 추가로 정규화됨으로써 갱신된다. 예를 들어, 경량화 장치는 변수(a)의 증가 및 변수(b)를 감소 중 적어도 하나를 통해 후보 범위를 감소시킬 수 있다. 후보 범위는 아직 확정되기 전의 중간 정규화 변수에 따른 파라미터 값들이 분포된 범위일 수 있다.In the second and later
일 측에 따르면, 정규화 변수는 정규화 변수는 0을 기준으로 정규화된 파라미터들을 시프트(shift) 시키는 오프셋을 포함할 수 있다. 경량화 장치는 시프트 연산을 통해 정규화 변수를 증가시키거나 감소시킬 수 있다. 예를 들어, 변수(a)가 0이고, 변수(b)가 15인 경우, 후보 범위는 20 내지 215-1로 결정될 수 있다. 경량화 장치는 후보 범위를 추가로 감소시킬 때, 변수(a)를 1로 증가시키고, 변수(b)를 14로 감소시킬 수 있다. 이 때, 후보 범위는 시프트 연산을 통해 21 내지 214-1로 간편하게 결정될 수 있다. 경량화 장치는 시프트 연산을 위한 시프트 레지스터를 포함할 수 있다. 다른 일 측에 따르면, 경량화 장치는 미니 배치(mini batch) 단위로 후보 범위를 감소시킬 수 있다. 예를 들어, 경량화 장치는 29 단위로 후보 범위를 감소시킬 수 있다. 후보 범위를 적당히 큰 단위로 감소시킬 경우 반복에 따른 성능의 변화가 예측 가능한 형태로 변화할 수 있으므로, 미니 배치 단위로 후보 범위를 감소시킴으로써 적절한 정규화 변수를 결정할 수 있게 된다.According to one aspect, the normalization variable may include an offset that shifts the normalized parameter by zero based on the normalization variable. The lightening device may increase or decrease the normalization variable through a shift operation. For example, when the variable a is 0 and the variable b is 15, the candidate range may be determined to be 2 0 to 2 15 -1. When the lightening device further decreases the candidate range, the variable a can be increased to 1 and the variable b can be decreased to 14. At this time, the candidate range can be easily determined from 2 1 to 2 14 -1 through a shift operation. The light-weighting device may include a shift register for a shift operation. According to the other party, the lightening device can reduce the candidate range in mini batches. For example, a lightweight device can reduce the candidate range by 2 9 units. If the candidate range is reduced to a relatively large unit, the performance change due to the iteration can be changed into a predictable form, so that it is possible to determine an appropriate normalization variable by reducing the candidate range in units of mini batches.
단계(620), 단계(630), 및 단계(640)은 추가로 정규화된 파라미터에 기초하여 수행된다. 이터레이션이 반복됨에 따라 정규화된 인식률이 목표 인식률보다 작아지는 경우, 단계(640)에서 이터레이션을 종료하고 최적 정규화된 파라미터를 출력할 수 있다. 다른 실시예에 따라 인식률 대신 에러율이 이용되는 경우, 정규화된 에러율이 목표 에러율보다 작지 않으면 최적 정규화된 파라미터가 출력될 수 있다.
일 실시예에 따르면, 전술한 반복적 정규화 과정은 후술할 도 11의 경량화 장치(1120)에 의하여 수행될 수 있다. 예를 들어, 경량화 장치(1120)는 학습 장치(1110)로부터 원 학습 파라미터에 해당하는 학습된 파라미터들을 수신하고, 전술한 반복적 정규화 과정을 거쳐서 최적 정규화된 파라미터에 해당하는 경량화된 파라미터들을 출력할 수 있다. 아래에서 상세히 설명하겠으나, 경량화 장치(1120)는 정규화뿐 아니라 양자화와 압축을 더 수행할 수도 있다.According to one embodiment, the repetitive normalization process described above can be performed by the lightening
도 7a 및 도 7b는 실시예들에 따른 후보 범위를 결정하는 방법을 나타낸 도면들이다. 도 7a를 참조하면, 이터레이션이 반복됨에 따라 본인 인증 성공률은 일정한 이터레이션 시점까지는 오히려 증가하다가 다시 감소한다.7A and 7B are diagrams illustrating a method for determining a candidate range according to embodiments. Referring to FIG. 7A, as the iteration is repeated, the authentication success rate of the user increases rather than until a predetermined iteration time, and then decreases again.
파라미터의 정규화가 수행되면 적어도 일부의 파라미터가 기존 학습된 값을 잃게 된다. 그럼에도 불구하고 일정한 이터레이션 시점까지 인식률이 증가하는 것은 기존 학습된 데이터베이스 내 존재했던 노이즈 및 오류에 대한 왜곡이 정규화로 인하여 완화되기 때문이다. 예를 들어, 절단 값이 커지면 기 학습된 뉴런들 사이의 미세한 연결고리가 제외되면서 전체 파라미터 값들의 분포 중 0의 비중이 높아진다. 또한, 컷오프 값에 의하여 파라미터의 최대 값에 대한 자유도가 제한된다. 이로 인하여, 기존 학습된 데이터베이스 내 존재했던 노이즈 및 오류에 대한 왜곡이 완화될 수 있다.When parameter normalization is performed, at least some of the parameters lose the previously learned value. Nevertheless, the increase in the recognition rate up to a certain iteration time is due to the normalization of the distortions of the noise and errors that existed in the existing learned database. For example, when the cutoff value is increased, the finer linkage between the learned neurons is excluded, and the proportion of 0 in the distribution of the entire parameter values increases. Further, the degree of freedom with respect to the maximum value of the parameter is limited by the cutoff value. This can mitigate the noise and errors that existed in existing learned databases.
전술한 바와 같이, 경량화 장치는 본인 인증 성공률이 증가하다가 다시 감소하면서 성능 임계치와 만나는 시점까지 파라미터 정규화를 반복할 수 있다. 결과적으로, 경량화 장치는 성능 저하 없이 경량 범위가 최소가 되도록 하는 제 1 기준을 이용하여 최적 정규화 파라미터들(a와 b)을 결정할 수 있다. 이와 달리, 인식률이 최대가 되는 시점까지 정규화를 반복하는 제 2 기준을 이용하여 정규화 파라미터들을 결정할 수도 있다. 이 경우, 경량화 정도는 감소할 수 있으나, 성능은 최대화될 수 있다.As described above, the light weighting device can repeat the parameter normalization until the authentication threshold is met while the success rate of authentication is increased. As a result, the lightweighting device can determine the optimal normalization parameters a and b using a first criterion that minimizes the lightweight range without degrading performance. Alternatively, the normalization parameters may be determined using a second criterion in which the normalization is repeated until the recognition rate becomes maximum. In this case, the degree of lightening can be reduced, but the performance can be maximized.
도 7b를 참조하면, 인식률 대신 에러율을 이용하여 정규화가 수행될 수 있다. 에러율은 다양하게 정의될 수 있다. 예를 들어, 에러율의 일 예로 얼굴 인식에서 손실(Loss)를 나타내는 얼굴 분류 학습 손실이 이용될 수 있다.Referring to FIG. 7B, normalization may be performed using an error rate instead of the recognition rate. The error rate can be defined in various ways. For example, as an example of the error rate, a face classification learning loss indicating a loss in face recognition may be used.
이 경우, 이터레이션이 반복됨에 따라 에러율은 감소하다가 증가될 수 있다. 예를 들어, 초기 에러율은 제1 기준 값일 수 있다. 이터레이션이 i1회 반복됨에 따라 에러율은 제2 기준 값까지 감소한다. 이후, 에러율은 점차 증가하여, 이터레이션이 i2회 반복됨에 따라 제1 기준 값까지 증가한다.In this case, as the iteration is repeated, the error rate can be reduced and increased. For example, the initial error rate may be a first reference value. Depending on the iteration i 1 times repeated error rate is decreased to the second reference value. Thereafter, the error rate gradually increases and increases to the first reference value as the iteration is repeated i 2 times.
전술한 바와 같이, 경량화 장치는 경량화를 최대화하기 위해 제 1 기준을 이용하여i2회의 반복에 따른 후보 범위를 경량 범위로 결정할 수 있다. 경우에 따라, 경량화 장치는 일정 수준의 경량화와 함께 성능을 최대화하기 위해 i1회까지만 반복된 제 2 기준을 이용하여 후보 범위를 경량 범위로 결정할 수 있다. 이 경우, i2회의 반복에 비해 경량화 정도는 감소할 수 있으나, 성능은 최대화될 수 있다. As described above, in order to maximize the weight reduction, the lightening device can determine the candidate range according to the repetition of i 2 times as the lightweight range by using the first criterion. In some cases, light weight device can be repeated using a second reference only i 1 times to maximize performance with a certain degree of weight to determine the weight range as the candidate range. In this case, the degree of lighter weight can be reduced compared to repeating i 2 times, but the performance can be maximized.
일 실시예에 따르면, 파라미터들이 학습되는 도중 정규화가 함께 수행될 수 있다. 예를 들어, 도 12 또는 도 13을 참조하여 후술하겠지만, 학습 장치에 의하여 학습이 진행 중인 중간 파라미터들에 대하여 정규화가 수행됨으로써 정규화가 학습에 영향을 미칠 수 있다. 이 경우, 도 7a 및 도 7b를 통하여 전술한 기준에 기초하여 학습 및 정규화의 반복 횟수가 결정될 수 있다.According to one embodiment, normalization may be performed together while the parameters are being learned. For example, as will be described later with reference to FIG. 12 or FIG. 13, normalization is performed on intermediate parameters in which learning is in progress by the learning apparatus, so that normalization may affect learning. In this case, the number of iterations of learning and normalization can be determined based on the above-described criteria through Figs. 7A and 7B.
도 8은 일 실시예에 따른 정규화에 의한 시퀀스의 변화를 나타낸 도면이다. 도 8을 참조하면, 정규화 전의 시퀀스(810) 및 정규화된 시퀀스(820)가 도시되어 있다. 시퀀스(810, 820) 내에서 Vi는 파라미터를 나타내고, i는 0이 아닌 파라미터의 인덱스를 나타낸다. 시퀀스(810, 820)는 16개의 파라미터들을 포함하는 것으로 표현되었지만, 시퀀스(810, 820)는 시냅스의 수에 대응하는 파라미터들을 포함할 수 있다. 도 2를 참조하여 설명된 것처럼, 파라미터들은 16-비트의 고정 소수점 타입의 정수로 양자화될 수 있다. 따라서, 시퀀스(810)의 파라미터들은 16-비트의 사이즈를 가질 수 있다.FIG. 8 is a diagram illustrating a variation of a sequence by normalization according to an embodiment. Referring to FIG. 8, a
경량화 장치는 경량 범위에 기초하여 파라미터들을 표현하는 데이터의 사이즈를 감소시킬 수 있다. 파라미터들의 분포 범위가 원 범위에서 경량 범위로 감소함에 따라 파라미터들을 표현하기 위한 비트 수도 감소하기 때문에, 경량화 장치는 정규화에 따라 파라미터들을 정규화 전에 비해 적은 비트 수로 표현할 수 있다. 예를 들어, 경량화 장치는 경량 범위에 대응하는 유한 집합(finite set) 내 원소들을 표현 가능한 최소 비트 수를 결정하고, 결정된 최소 비트 수에 기초하여, 파라미터들을 표현할 수 있다. 구체적으로, 경량화 장치는 조건 (2x ≤ a)를 만족하는 min(x)를 m로 결정하고, 조건 (2x ≥ b)를 만족하는 max(x)를 n으로 결정할 수 있다. 이 경우, 시퀀스(820)의 파라미터들은 (n-m) 비트의 사이즈를 갖게 된다. 경량 범위는 원 범위에 비해 좁기 때문에, (n-m)은 16보다 작다. 따라서, 정규화에 따라 파라미터 당 16-(n-m) 비트만큼 사이즈가 감소하게 된다. The lightening device may reduce the size of the data representing the parameters based on the lightweight range. As the distribution range of the parameters decreases from the original range to the lightweight range, the number of bits for representing the parameters decreases, so that the light weighting device can express the parameters according to normalization with a smaller number of bits than before normalization. For example, a lightweight device may determine the minimum number of bits that can represent elements in a finite set corresponding to a lightweight range, and may express parameters based on the determined minimum number of bits. Specifically, the light-weighting device can determine min (x) satisfying the condition (2 x ? A) as m and max (x) satisfying the condition (2 x ? B) as n. In this case, the parameters of the
도 9는 일 실시예에 따른 압축에 의한 시퀀스의 변화를 나타낸 도면이다. 압축 이전에 0의 값을 갖는 파라미터는 0이 아닌 값을 갖는 파라미터와 동일한 메모리 공간을 차지한다. 아래에서 설명되는 압축을 거쳐 0의 값을 갖는 파라미터가 차지하는 메모리 공간을 최소화 함으로써, 정규화에 따른 경량화가 극대화될 수 있다.9 is a diagram illustrating a change of a sequence by compression according to an embodiment. A parameter with a value of 0 before compression occupies the same memory space as a parameter with a non-zero value. By minimizing the memory space occupied by the parameter having a value of 0 through the compression described below, weight reduction due to normalization can be maximized.
도 9를 참조하면, 압축 전의 시퀀스(910), 비트 시퀀스(920) 및 논-제로 시퀀스(930)이 도시되어 있다. 비트 시퀀스(920) 및 논-제로 시퀀스(930)는 시퀀스(910)의 압축 상태를 나타낸다. Vi는 파라미터를 나타내고, i는 0이 아닌 파라미터의 인덱스를 나타낸다. 시퀀스(910)의 파라미터들은 정규화에 따라 (n-m) 비트의 사이즈를 갖는다. 경량화 장치는 값이 0인 파라미터에 기초하여, 시퀀스(910)를 무손실 압축할 수 있다. 추후 설명되는 것처럼, 압축된 시퀀스(920, 930)로 압축 전의 시퀀스(910)를 그대로 복원할 수 있으므로 실시예에 따른 압축은 무손실 압축에 해당한다.Referring to FIG. 9, a
경량화 장치는 시퀀스(910)에 포함된 파라미터들 중에 값이 0이 아닌 파라미터들만 포함하는 논-제로 시퀀스(920), 및 시퀀스(910)에서 파라미터의 값이 0인지 여부를 지시하는 비트 시퀀스(930)를 생성할 수 있다. 비트 시퀀스(930)에서 각각의 데이터들은 1-비트로 표현될 수 있다. 비트 시퀀스(930)는 시퀀스(910)에 포함된 파라미터들의 개수와 동일한 수의 비트들을 포함할 수 있다. 비트 시퀀스(930)에 포함된 각 비트들은 시퀀스(910) 내 각 파라미터들에 1대1로 대응할 수 있다. 비트 시퀀스(930)에 포함된 특정 비트가 1인 경우 시퀀스(910) 내 대응하는 파라미터의 값이 0이 아니라는 것을 지시하고, 비트 시퀀스(930)에 포함된 특정 비트가 0인 경우 시퀀스(910) 내 대응하는 파라미터의 값이 0이라는 것을 지시할 수 있다. (n-m) * 총 파라미터 수만큼의 비트의 크기를 갖는 시퀀스(910)는 전술한 무손실 압축을 통해 (n-m) * 논-제로 파라미터 수 + 파라미터 수 만큼의 비트로 표현될 수 있다. 이러한 압축 효과는 0의 값을 갖는 파라미터가 증가할수록 극대화될 수 있다.The lightening device includes a
도 10은 일 실시예에 따른 경량화에 의한 파라미터들의 분포 변화를 나타낸 도면이다. 도 10을 참조하면, 경량화 전의 분포(1010), 양자화 이후의 분포(1020), 정규화 이후의 분포(1030) 및 압축 이후의 분포(1040)가 도시되어 있다. 각각의 분포를 통해 0의 값을 갖는 파라미터가 가장 많고, 파라미터의 값이 증가할수록 그 빈도는 감소하는 것을 알 수 있다. 양자화는 파라미터들의 표현 형식만을 변화시키므로, 양자화에 따른 분포의 변화는 없다.FIG. 10 is a diagram illustrating a distribution change of parameters by weight reduction according to an embodiment. Referring to FIG. 10, a
정규화에 따라 절단 범위(-a 내지 a) 내의 파라미터들은 0으로 절단되고, 최대값(b) 이상의 값을 갖는 파라미터들 및 최소값(-b) 이하의 값을 갖는 파라미터들은 최대값(b) 또는 최소값(-b)으로 컷오프된다. 따라서, 분포(1030)을 참조하면, 절단 동작으로 인하여 0의 값을 갖는 파라미터들의 빈도가 증가하고, 컷오프 동작으로 인하여 최대값(b) 및 최소값(-b)을 갖는 파라미터들의 빈도가 증가한다.The parameters within the cut-off range (-a to a) are truncated to zero, and the parameters having a value of the maximum value (b) or more and the parameters having the value of the minimum value (-b) (-b). Thus, referring to
압축에 따라 분포(1030)에서 0의 값을 갖는 파라미터들이 제거된다. 분포(1040)는 압축에 따라 앞서 설명된 논-제로 파라미터들만 포함한다. 0의 값을 갖는 파라미터들은 앞서 설명된 비트 시퀀스를 통해 식별될 수 있다. 분포(1030)에서 파라미터들은 -b 내지 -a, 0, 및 a 내지 b에 분포되며, 경량화 장치는 정규화 과정에서 파라미터들을 표현 가능한 비트 수를 최소화하기 위해 파라미터들의 절대값을 a만큼 감소시킬 수 있다. 이 경우, 분포(1040)를 참조하면, 양(positive)의 파라미터들의 값은 a만큼 감소하고, 음(negative)의 파라미터들의 값은 a만큼 증가할 수 있다. 파라미터들의 절대값이 감소함에 따라 최대 값이 b에서 b-a로 감소하므로, 파라미터들을 표현 가능한 비트 수가 감소할 수 있다. 따라서, 경량 범위는 -(b-a) 내지 b-a로 결정될 수 있다. 이 경우, 파라미터들 각각은 log2(b-a)에 대응하는 비트 수로 표현될 수 있다. 예를 들어, 파라미터들이 경량 범위 내 정수 값을 가지는 경우, 파라미터들 각각이 가질 수 있는 값의 경우의 수는 2*(b-a)+1일 수 있다. 파라미터들 각각은 log2(2*(b-a)+1)보다 크거나 같은 최소 자연수의 비트들로 표현될 수 있다.The parameters with a value of zero in
일 실시예에 따르면, 이상에서 설명한 경량화 과정은 뉴럴 네트워크 내 각 레이어 별로 적용될 수 있다. 다시 말해, 레이어 별로 경량화가 다르게 적용될 수 있다. 일 예로, 총 10개의 콘볼루션 레이어들을 포함하는 뉴럴 네트워크의 경우, 제1 레이어에는 경량화가 적용되지 않고, 제2 내지 제8 레이어들에는 컷오프 동작에 의한 경량화만 적용되며, 제9 레이어에는 컷오프 동작 및 절단 동작에 의한 경량화가 적용되고, 제10 레이어에는 절단 동작에 의한 경량화만 적용될 수 있다. 최적 경량화된 뉴럴 네트워크의 인식 성능은 경량화 이전과 동일하거나 경량화 이전보다 오히려 우세하면서, 뉴럴 네트워크를 위한 모델 크기가 크게 감소될 수 있다.According to one embodiment, the weight reduction process described above can be applied to each layer in the neural network. In other words, lightweighting can be applied differently for each layer. For example, in the case of a neural network including a total of 10 convolution layers, weight reduction is not applied to the first layer, only weight reduction by the cutoff operation is applied to the second to eighth layers, And lightening by the cutting operation is applied, and only the lightening by the cutting operation can be applied to the tenth layer. The recognition performance of the optimal lightweight neural network is the same as before the weight reduction, rather than before, and the model size for the neural network can be greatly reduced.
또한, 콘볼루션 레이어 등과 같이 각 레이어 내 출력 맵 채널을 분류할 수 있는 경우, 채널 별로 경량화가 다르게 적용될 수도 있다. 예를 들어, 콘볼루션 레이어의 경우, 해당하는 레이어에 대응하는 커널의 채널 수만큼 출력 맵 채널이 존재할 수 있다.In addition, if the output map channels in each layer can be classified, such as a convolution layer, weighting may be applied differently for each channel. For example, in the case of a convolution layer, an output map channel may exist as many as the number of channels of the kernel corresponding to the corresponding layer.
일 실시예에 따른 뉴럴 네트워크는 절단 동작에 의한 정규화가 적용된 것일 수 있다. 예를 들어, 뉴럴 네트워크는 각각 뉴런들을 포함하는 복수의 레이어들 및 이웃한 레이어들에 포함된 뉴런들을 연결하는 시냅스들을 포함하며, 0보다 크고 a(a>0)보다 작은 값을 가지는 시냅스 가중치들 중 적어도 일부가 0으로 설정된다. 이 때, 0으로 설정된 시냅스 가중치들은 복수의 레이어들 중 일부의 이웃한 레이어들을 연결하는 시냅스들에 해당할 수 있다. 정규화 변수인 a는 복수의 레이어들 별로 다르게 설정되거나, 특정 레이어 내 출력 맵 채널 별로 다르게 설정될 수 있다. The neural network according to an embodiment may be one in which normalization by a cutting operation is applied. For example, the neural network may include a plurality of layers each including neurons and synapses connecting neurons contained in neighboring layers, wherein the synapse weights greater than 0 and less than a (a > 0) Is set to zero. At this time, the synapse weights set to 0 may correspond to synapses connecting neighboring layers of some of the plurality of layers. The normalization variable a may be set differently for a plurality of layers or differently for each output map channel in a specific layer.
또한, 뉴럴 네트워크는 절단 동작과 컷오프 동작에 의한 정규화가 적용된 것일 수 있다. 예를 들어, 뉴럴 네트워크에서 b(b>a)보다 큰 값을 가지는 시냅스 가중치들 중 적어도 일부가 b로 설정될 수 있다. 이 때, b로 설정된 시냅스 가중치들은 복수의 레이어들 중 일부의 이웃한 레이어들을 연결하는 시냅스들에 해당할 수 있다. 정규화 변수인 b는 복수의 레이어들 별로 다르게 설정되거나, 특정 레이어 내 출력 맵 채널 별로 다르게 설정될 수 있다.In addition, the neural network may be a normalized by the cutting operation and the cutoff operation. For example, at least some of the synaptic weights having a value greater than b (b > a) in the neural network may be set to b. At this time, the synapse weights set to b may correspond to synapses connecting neighboring layers of some of the plurality of layers. The normalization variable b may be set differently for a plurality of layers or differently for each output map channel in a specific layer.
다른 실시예에 따른 뉴럴 네트워크는 컷오프 동작에 의한 정규화가 적용된 것일 수 있다. 예를 들어, 뉴럴 네트워크는 각각 뉴런들을 포함하는 복수의 레이어들 및 이웃한 레이어들에 포함된 뉴런들을 연결하는 시냅스들을 포함하며, b(b>0)보다 큰 값을 가지는 시냅스 가중치들 중 적어도 일부가 b로 설정된다. 이 때, b로 설정된 시냅스 가중치들은 복수의 레이어들 중 일부의 이웃한 레이어들을 연결하는 시냅스들에 해당할 수 있다. 정규화 변수인 b는 복수의 레이어들 별로 다르게 설정되거나, 특정 레이어 내 출력 맵 채널 별로 다르게 설정될 수 있다.The neural network according to another embodiment may be one in which the normalization by the cutoff operation is applied. For example, the neural network may comprise a plurality of layers each including neurons and synapses connecting neurons contained in neighboring layers, wherein at least some of the synaptic weights having a value greater than b (b > 0) Is set to b. At this time, the synapse weights set to b may correspond to synapses connecting neighboring layers of some of the plurality of layers. The normalization variable b may be set differently for a plurality of layers or differently for each output map channel in a specific layer.
도 11은 일 실시예에 따른 학습된 파라미터들의 후처리 과정을 나타낸 도면이다. 도 11을 참조하면, 학습 장치(1110)는 학습 데이터베이스(1111), 파라미터 조절부(1112) 및 복수의 레이어들(1113)을 포함한다. 학습 장치(1110)는 학습 데이터베이스(1111)로 복수의 레이어들(1113)을 학습시킬 수 있다. 파라미터 조절부(1112)는 제1 레이어 내지 제n 레이어를 통한 손실에 기초하여 복수의 레이어들(1113)의 파라미터들을 조절할 수 있다. 학습 장치(1110)는 학습된 파라미터들을 경량화 장치(1120)에 전송할 수 있다. 경량화 장치(1120)는 후처리 과정을 통해 학습된 파라미터들을 경량화할 수 있다. 경량화 장치(1120)는 앞서 설명된 양자화, 정규화 및 압축 중 적어도 하나에 기초하여 학습된 파라미터를 경량화할 수 있다. 경량화 장치(1120)는 경량화된 파라미터들을 저장 장치(1130)에 저장할 수 있다. 저장 장치(1130)에 저장된 경량화된 파라미터들은 인식 과정에서 이용될 수 있다. 도 11에서, 학습 장치(1110), 경량화 장치(1120) 및 저장 장치(1130)는 서로 분리된 것으로 도시되어 있으나, 학습 장치(1110), 경량화 장치(1120) 및 저장 장치(1130) 중 둘 또는 셋 모두를 하나의 장치로 구성할 수 있다. 경량화 장치(1120)는 양자화, 정규화 및/또는 압축을 위한 하드웨어 모듈 또는 소프트웨어 모듈을 포함할 수 있다.11 is a diagram illustrating a post-processing process of learned parameters according to an embodiment. 11, the
도 12는 일 실시예에 따른 파라미터 튜닝 과정을 나타낸 도면이다. 도 12를 참조하면, 파라미터 튜닝 장치(1220)는 학습 데이터베이스(1221) 및 복수의 레이어들(1222)을 포함한다. 파라미터 튜닝 장치(1220)는 학습 장치(1210)로부터 수신한 학습된 파라미터들을 미세 튜닝(fine tuning)하기 위해, 복수의 레이어들(1222)을 추가로 학습할 수 있다. 12 is a diagram illustrating a parameter tuning process according to an embodiment. Referring to FIG. 12, the
파라미터 튜닝 장치(1220)는 학습 장치(1210)로부터 수신한 학습된 파라미터들을 복수의 레이어들(1222)에 적용하고, 복수의 레이어들(1222)에 포함된 제1 레이어 내지 제n 레이어 각각을 추가로 학습할 수 있다. 이 때, 추가 학습의 대상이 되는 레이어를 제외한 나머지 레이어들의 파라미터들은 고정될 수 있다. 예를 들어, 파라미터 튜닝 장치(1220)가 제n 레이어를 추가로 학습할 때, 제1 레이어 내지 제n-1 레이어의 파라미터들은 고정될 수 있다.The
추가 학습에는 경량화 장치(1230)가 이용될 수 있다. 경량화 장치(1230)는 특징 벡터의 손실을 평가하는 함수를 이용하여 추가 학습의 대상이 되는 레이어의 파라미터를 정규화할 수 있다. 구체적으로, 경량화 장치(1230)는 특징 벡터의 손실을 최소화하는 후보 범위를 경량 범위로 하여 정규화를 진행할 수 있다. 도 12에는 도시되지 않았으나, 경량화 장치(1230)는 파라미터들을 양자화할 수 있다.The lightening
경량화 장치(1230)는 정규화된 파라미터들을 압축함으로써, 경량화된 파라미터들을 생성할 수 있다. 경량화 장치(1230)는 경량화된 파라미터들을 저장 장치(1240)에 저장할 수 있다. 저장 장치(1240)에 저장된 경량화된 파라미터들은 인식 과정에서 이용될 수 있다. The lightening
도 12에는 복수의 레이어들(1222)이 각 단계의 레이어를 중복하여 포함하는 것으로 도시되어 있으나, 이는 설명의 편의를 위한 것으로 복수의 레이어들(1222)은 각 단계의 레이어를 한 개씩만 포함할 수 있다. 이 경우, 복수의 레이어들(1222)에 포함된 제1 레이어 내지 제n 레이어 각각은 순차적으로 추가 학습될 수 있다.In FIG. 12, a plurality of
도 12에서, 학습 장치(1210), 파라미터 튜닝 장치(1220), 경량화 장치(1230) 및 저장 장치(1240)는 서로 분리된 것으로 도시되어 있으나, 학습 장치(1210), 파라미터 튜닝 장치(1220), 경량화 장치(1230) 및 저장 장치(1240) 중 둘 또는 그 이상이 동일한 장치에 포함될 수 있다. 경량화 장치(1230)는 양자화, 정규화 및/또는 압축을 위한 하드웨어 모듈 또는 소프트웨어 모듈을 포함할 수 있다.12, the
도 13은 일 실시예에 따른 학습 과정을 나타낸 도면이다. 도 13을 참조하면, 학습 장치(1310)는 학습 데이터베이스(1311), 복수의 레이어들(1312) 및 경량화 장치(1320)를 포함한다. 경량화 장치(1320)는 복수의 레이어들(1312)의 학습 과정에서 파라미터들을 정규화할 수 있다. 13 is a diagram illustrating a learning process according to an embodiment. 13, the
경량화 장치(1320)는 정규화에 따라 감소된 사이즈의 데이터로 표현되는 파라미터들에 기초하여 복수의 레이어들(1312)을 학습시킬 수 있다. 예를 들어, 학습 장치(1310)는 학습 데이터베이스(1311)에 기초하여 복수의 레이어들(1312)을 학습할 수 있다. 경량화 장치(1320)는 제n 레이어의 파라미터들을 양자화하고 제n 레이어의 손실이 최소화되도록 제n 레이어의 파라미터들을 정규화할 수 있다. 정규화된 제n 레이어의 파라미터들은 압축된 이후에 저장 장치(1330)에 저장될 수 있다. 정규화된 제n 레이어의 파라미터들은 비양자화되어 제n 레이어에 적용될 수 있다. 다음으로, 경량화 장치(1320)는 제n-1 레이어에 대해서도 제n 레이어와 동일하게 양자화, 정규화, 압축 및 비양자화를 수행할 수 있다. 저장 장치(1330)에 저장된 경량화된 파라미터들은 인식 과정에서 이용될 수 있다. The lightening
도 13에서, 학습 장치(1310)는 경량화 장치(1320)를 포함하는 것으로 도시되어 있으나, 학습 장치(1310)와 경량화 장치(1320)는 서로 분리될 수 있다. 또한, 도 13에서, 학습 장치(1310)와 저장 장치(1330)는 서로 분리된 것으로 도시되어 있으나, 학습 장치(1310)와 저장 장치(1330)는 하나의 장치를 구성할 수 있다. 경량화 장치(1230)는 양자화, 비양자화, 정규화 및/또는 압축을 위한 하드웨어 모듈 또는 소프트웨어 모듈을 포함할 수 있다.13, the
도 14는 일 실시예에 따른 인식 과정을 나타낸 도면이다. 도 14를 참조하면, 인식 장치(1410)는 복수의 레이어들(1411), 인식기(1412) 및 복원 장치(1420)를 포함한다. 복원 장치(1420)는 경량화된 파라미터들을 복원하고, 복원된 파라미터들을 복수의 레이어들(1411)에 적용할 수 있다. 복수의 레이어들(1411)은 적용된 파라미터들에 기초하여 입력 데이터에서 특징 벡터를 추출하고, 인식기(1412)는 특징 벡터에 기초하여 입력 데이터에서 객체를 인식할 수 있다.FIG. 14 is a diagram illustrating a recognition process according to an embodiment. 14, the
복원 장치(1420)는 앞서 언급된 저장 장치 등으로부터 경량화된 파라미터들을 획득할 수 있다. 복원 장치(1420)는 경량화된 파라미터들에 적용된 기법에 따라, 비정규화, 비양자화 및 압축 해제 중 적어도 하나를 수행함으로써 파라미터들을 복원할 수 있다. 예를 들어, 경량화된 파라미터들에 정규화가 적용된 경우, 복원 장치(1420)는 경량화된 파라미터들에 비정규화를 수행할 수 있다. 복원 장치(1420)는 비정규화를 통해 파라미터들의 절대값을 a만큼 증가시킬 수 있다. 따라서, 양(positive)의 파라미터들의 값은 a만큼 증가하고, 음(negative)의 파라미터들의 값은 a만큼 감소한다.The
경량화된 파라미터들에 양자화가 적용된 경우, 복원 장치(1420)는 경량화된 파라미터들에 비양자화를 수행할 수 있다. 복원 장치(1420)는 비양자화를 통해 양자화된 파라미터들의 표현 방식을 시스템에 맞게 변환할 수 있다. 예를 들어, 파라미터들이 16-비트의 고정 소수점 타입의 정수로 양자화된 경우, 32-비트의 부동 소수점 타입의 실수로 비양자화될 수 있다. 실시예에 따라, 복수의 레이어(1411)들이 고정 소수점 방식의 데이터 타입을 사용하는 경우, 비양자화는 수행되지 않을 수 있다. When quantization is applied to the lightened parameters, the
경량화된 파라미터들이 압축된 경우, 복원 장치(1420)는 경량화된 파라미터들의 압축을 해제할 수 있다. 복원 장치(1420)는 파라미터의 값이 0인지 여부를 지시하는 비트 시퀀스 및 논-제로 시퀀스에 기초하여 경량화된 파라미터들의 압축을 해제할 수 있다. 압축 해제에 따라 0의 값을 갖는 파라미터들이 생성되므로, 0의 값을 갖는 파라미터들에 대한 데이터 처리로 인한 불필요한 자원 소모를 방지하기 위해, 복원 장치(1420)는 비정규화, 비양자화 및 압축 해제 중에 압축 해제를 가장 늦게 적용할 수 있다.If the lightened parameters are compressed, the
도 15는 일 실시예에 따른 복원에 의한 파라미터들의 분포 변화를 나타낸 도면이다. 도 15를 참조하면, 경량화된 파라미터들의 분포(1510), 비정규화된 파라미터들의 분포(1520), 비양자화된 파라미터들의 분포(1530) 및 압축이 해제된 파라미터들의 분포(1540)가 도시되어 있다. 경량화 상태에서 파라미터들은 -(b-a) 내지 (b-a)의 경량 범위에 분포되어 있다. 분포(1520)에서, 비정규화에 따라 파라미터들의 절대값은 a만큼 증가하고, 파라미터들은 -b 내지 -a 및 a 내지 b에 분포한다. 비양자화는 데이터의 표현 형식에 영향을 미칠 뿐이므로, 분포(1530)에서 비양자화에 따른 분포의 변화는 없다. 분포(1540)에서, 압축 해제에 따라 0의 값을 갖는 파라미터들이 다수 생성된다.FIG. 15 is a diagram illustrating a distribution change of parameters by restoration according to an embodiment. Referring to FIG. 15, a
도 16은 일 실시예에 따른 압축 해제에 의한 시퀀스의 변화를 나타낸 도면이다. 도 16을 참조하면, 논-제로 시퀀스(Vk), 비트 시퀀스(LOi) 및 압축이 해제된 시퀀스(Wi)가 도시되어 있다. 여기서, i 및 k는 인덱스를 나타낸다. 복원 장치는 아래의 표 1을 통해 압축을 간단히 해제할 수 있다.16 is a diagram illustrating a change in sequence by decompression according to an embodiment. Referring to Figure 16, a non-zero sequence (V k ), a bit sequence (LO i ) and a decompressed sequence (W i ) are shown. Here, i and k represent indices. The decompression device can be easily decompressed through the following Table 1.
{
Wi = Vk * LOi ;
k += LOi ;
}for (i = 0, k = 0; i <Len; i ++)
{
W i = V k * LO i ;
k + = LO i ;
}
여기서, Len은 비트 시퀀스(LOi)의 길이를 나타낸다. 표 1 및 도 16을 참조하면, 복원 장치는 비트 시퀀스(LOi) 내 인덱스(i=0)의 비트 값과 논-제로 시퀀스(Vk) 내 인덱스(k=0)의 파라미터를 곱하여, 인덱스(i=0)의 압축이 해제된 시퀀스(Wi)에서 압축 해제된 파라미터(V1)를 결정한다. 다음으로, 복원 장치는 인덱스(k)를 비트 시퀀스(LOi) 내 인덱스(i=0)의 비트 값(1)만큼 증가시킨다. 따라서, 인덱스(k)는 비트 시퀀스(LOi) 내의 비트 값이 1인 경우에만 증가하게 된다. 다음으로, 복원 장치는 인덱스(i)를 1만큼 증가시킨다. 표 1에 따라 이러한 단계들을 반복함으로써, 압축이 해제된 시퀀스(Wi)를 획득할 수 있다. 도 16을 통해 설명된 압축 해제 기법은 하나의 실시예에 불과하므로, 경량화된 파라미터들의 압축은 다른 압축 해제 기법으로 해제될 수 있다.Here, Len represents the length of the bit sequence (LO i ). Referring to Table 1 and FIG. 16, the restoration apparatus multiplies the bit value of the index (i = 0) in the bit sequence (LO i ) by the parameter of the index (k = 0) in the non-zero sequence (V k ) (V 1 ) decompressed in the decompressed sequence W i (i = 0). Next, the restoration device increases the index k by the bit value (1) of the index (i = 0) in the bit sequence (LO i ). Therefore, the index k is increased only when the bit value in the bit sequence LO i is 1. Next, the restoration device increments the index (i) by one. By repeating these steps according to Table 1, the decompressed sequence W i can be obtained. Since the decompression technique described with reference to FIG. 16 is only one embodiment, the compression of the lightened parameters can be released with other decompression techniques.
도 17은 일 실시예에 따른 나눗셈에 의한 시퀀스의 변화를 나타낸 도면이다. 도 17을 참조하면, 나눗셈 전의 시퀀스(1710) 및 나눗셈 이후의 시퀀스(1720)이 도시되어 있다. 앞서 언급된 것처럼, 압축 과정에서 0의 값을 갖는 파라미터들이 증가할수록 압축 효과가 향상될 수 있다. 따라서, 나눗셈을 통해 0의 값을 갖는 파라미터들을 증가시킬 수 있다. 시퀀스(1710)의 V를 미리 정해진 나눗수(divisor)로 나누면, 시퀀스(1710)는 시퀀스(1720)로 나타낼 수 있다. 시퀀스(1720)에서, 서브 파라미터 Vq는 몫을 나타내고, 서브 파라미터 Vr은 나머지를 나타낸다. 도 10 및 도 15의 분포들을 참조하면, 파라미터들은 대체로 크지 않은 값을 갖는다. 따라서, 나눗수를 적절히 선택함으로써 몫을 0으로 만들 수 있고, 시퀀스에서 0의 값을 갖는 파라미터들을 증가시킬 수 있다.FIG. 17 is a diagram illustrating a sequence change by division according to an embodiment. Referring to FIG. 17, a
도 18은 일 실시예에 따른 나눗셈 및 압축에 의한 시퀀스의 변화를 나타낸 도면이다. 도 18을 참조하면, 나눗셈 전의 시퀀스(1810), 나눗셈 이후의 시퀀스(1820), 논-제로 시퀀스(1830) 및 비트 시퀀스(1840)가 도시되어 있다. 시퀀스(1810)의 파라미터들은 (n-m)-비트의 사이즈를 갖고, 시퀀스(1820)의 파라미터들은 (n-m)/2-비트의 사이즈를 가질 수 있다. 일 예로, 시퀀스(1810)의 파라미터들을 2(n-m)/2의 나눗수로 나누면 시퀀스(1820)를 얻을 수 있다. 시퀀스(1820)을 참조하면, 파라미터 v2, v4 및 v5를 2(n-m)/2로 나눈 몫은 0이고, v2, v4 및 v5는 2(n-m)/2보다 작다는 것을 알 수 있다. 따라서, 나눗셈을 통해 0의 값을 갖는 서브 파라미터들이 추가적으로 생성되었다.FIG. 18 is a diagram showing a change of a sequence by division and compression according to an embodiment. Referring to FIG. 18, a
논-제로 시퀀스(1830)는 서브 파라미터들의 시퀀스 중 값이 0이 아닌 서브 파라미터들만 포함하고, 비트 시퀀스(1840)는 서브 파라미터가 0인지 여부를 지시한다. 시퀀스(1810)을 표현하기 위해서는 (n-m) * 파라미터 수 만큼의 비트가 필요하고, 시퀀스(1810)을 나눗셈을 적용하지 않은 상태에서 압축할 경우 앞선 설명에 따라 (n-m) * 논 제로 파라미터 수 + 총 파라미터 수 만큼의 비트가 필요하다. 시퀀스(1810)을 나눗셈을 적용한 상태에서 압축할 경우 (n-m)/2 * 논 제로 서브 파라미터 수 + 총 논 제로 서브 파라미터 수 만큼의 비트가 필요하다. 나눗셈을 통해 0의 값을 가지는 서브 파라미터 수가 증가할수록 압축 효과가 향상될 수 있다.The
도 19는 일 실시예에 따른 경량화 방법을 나타낸 동작 흐름도이다. 도 19를 참조하면, 단계(1910)에서, 경량화 장치는 뉴럴 네트워크에 포함된 레이어에 대응하는 파라미터들을 획득한다. 단계(1920)에서, 경량화 장치는 미리 정의된 성능 함수에 기초하여, 파라미터들이 분포된 원 범위 중 일부에 해당하는 경량 범위를 추출한다. 단계(1930)에서, 경량화 장치는 경량 범위에 기초하여, 파라미터들을 표현하는 데이터의 사이즈를 감소시킨다. 그 밖에, 경량화 방법에는 앞서 설명된 동작들이 적용될 수 있으므로, 보다 상세한 설명은 생략한다.19 is an operational flowchart illustrating a lightening method according to an embodiment. Referring to Fig. 19, in
도 20은 일 실시예에 따른 인식 방법을 나타낸 동작 흐름도이다. 도 20을 참조하면, 단계(2010)에서, 인식 장치는 뉴럴 네트워크에 포함된 레이어에 대응하는 파라미터들의 분포에 기초하여 정규화된 파라미터들을 획득한다. 단계(2020)에서, 인식 장치는 레이어에 대응하는 정규화 변수에 기초하여, 정규화된 파라미터들을 비정규화한다. 단계(2030)에서, 인식 장치는 레이어에 비정규화된 파라미터들을 적용한다. 단계(2040)에서, 인식 장치는 뉴럴 네트워크를 이용하여, 입력 데이터를 인식한다. 그 밖에, 인식 방법에는 앞서 설명된 동작들이 적용될 수 있으므로, 보다 상세한 설명은 생략한다.20 is an operation flowchart showing a recognition method according to an embodiment. Referring to Fig. 20, at
도 21은 일 실시예에 따른 전자 시스템을 나타낸 도면이다. 도 21을 참조하면, 전자 시스템은 센서(2110), 프로세서(2120) 및 메모리(2130)를 포함한다. 센서(2110), 프로세서(2120) 및 메모리(2130)는 버스(2140)를 통하여 서로 통신할 수 있다. 앞서 설명된 경량화 장치, 복원 장치, 학습 장치 및 인식 장치 등은 전자 시스템의 적어도 일부로 구현될 수 있다.21 is a diagram illustrating an electronic system according to one embodiment. 21, the electronic system includes a
센서(2110)는 객체 인식을 위한, 영상 데이터 및 음성 데이터 등을 센싱하기 위한 이미지 센서 및 마이크 등을 포함할 수 있다. 센서(2110)는 잘 알려진 방식(예를 들어, 광학 이미지를 전기 신호로 변환하는 방식 등)으로 이미지 등을 감지할 수 있다. 센서(2110)의 출력은 프로세서(2120) 또는 메모리(2130)로 출력된다.The
프로세서(2110)는 도 1 내지 도 20을 통하여 전술한 적어도 하나의 장치들을 포함하거나, 도 1 내지 도 20을 통하여 전술한 적어도 하나의 방법을 수행할 수 있다. 예를 들어, 프로세서(2110)는, 경량화를 수행하기 위해, 뉴럴 네트워크에 포함된 레이어에 대응하는 파라미터들을 획득하고, 미리 정의된 성능 함수에 기초하여, 상기 파라미터들이 분포된 원 범위 중 일부에 해당하는 경량 범위를 추출하고, 상기 경량 범위에 기초하여, 상기 파라미터들을 표현하는 데이터의 사이즈를 감소시킬 수 있다. 또한, 프로세서(2110)는, 객체 인식을 수행하기 위해, 뉴럴 네트워크에 포함된 레이어에 대응하는 파라미터들의 분포에 기초하여 정규화된 파라미터들을 획득하고, 상기 레이어에 대응하는 정규화 변수에 기초하여, 상기 정규화된 파라미터들을 비정규화하고, 상기 레이어에 상기 비정규화된 파라미터들을 적용하고, 상기 뉴럴 네트워크를 이용하여, 입력 데이터를 인식할 수 있다.The
메모리(2130)는 앞서 언급된 경량화 변수, 성능 함수, 성능 지표 및 경량화된 파라미터들 등을 저장할 수 있다. 또한, 메모리(2130)는 컴퓨터에서 읽을 수 있는 명령어를 포함할 수 있다. 프로세서(2110)는 메모리(2130)에 저장된 명령어가 프로세서(2110)에서 실행됨에 따라 앞서 언급된 동작들을 수행할 수 있다. 메모리(2130)는 휘발성 메모리 또는 비휘발성 메모리일 수 있다.The
프로세서(2110)는 프로그램을 실행하고, 전자 시스템을 제어할 수 있다. 전자 시스템은 입출력 장치(도면 미 표시)를 통하여 외부 장치(예를 들어, 퍼스널 컴퓨터 또는 네트워크)에 연결되고, 데이터를 교환할 수 있다. 전자 시스템은 이동 전화, 스마트 폰, PDA, 태블릿 컴퓨터, 랩톱 컴퓨터 등 모바일 장치, 퍼스널 컴퓨터, 태블릿 컴퓨터, 넷북 등 컴퓨팅 장치, 또는 텔레비전, 스마트 텔레비전, 게이트 제어를 위한 보안 장치 등 전자 제품 등 다양한 전자 시스템들을 포함할 수 있다. 사용자는 경량화된 뉴럴 네트워크를 통해 모바일 장치 등의 사용자 기기에서도 모델을 학습시킬 수 있다.The
이상에서 설명된 실시예들은 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치, 방법 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(Arithmetic Logic Unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(Field Programmable Gate Array), PLU(Programmable Logic Unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The embodiments described above may be implemented in hardware components, software components, and / or a combination of hardware components and software components. For example, the devices, methods, and components described in the embodiments may be implemented within a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate Such as an array, a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to execution of the software. For ease of understanding, the processing apparatus may be described as being used singly, but those skilled in the art will recognize that the processing apparatus may have a plurality of processing elements and / As shown in FIG. For example, the processing unit may comprise a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as a parallel processor.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of the foregoing, and may be configured to configure the processing device to operate as desired or to process it collectively or collectively Device can be commanded. The software and / or data may be in the form of any type of machine, component, physical device, virtual equipment, computer storage media, or device , Or may be permanently or temporarily embodied in a transmitted signal wave. The software may be distributed over a networked computer system and stored or executed in a distributed manner. The software and data may be stored on one or more computer readable recording media.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to an embodiment may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The program instructions to be recorded on the medium may be those specially designed and configured for the embodiments or may be available to those skilled in the art of computer software. Examples of computer-readable media include magnetic media such as hard disks, floppy disks, and magnetic tape; optical media such as CD-ROMs and DVDs; magnetic media such as floppy disks; Magneto-optical media, and hardware devices specifically configured to store and execute program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions include machine language code such as those produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.
이상과 같이 실시예들이 비록 한정된 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기를 기초로 다양한 기술적 수정 및 변형을 적용할 수 있다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described with reference to the drawings, various technical modifications and variations may be applied to those skilled in the art. For example, it is to be understood that the techniques described may be performed in a different order than the described methods, and / or that components of the described systems, structures, devices, circuits, Lt; / RTI > or equivalents, even if it is replaced or replaced.
Claims (28)
0보다 크고 a(a>0)보다 작은 값을 가지는 시냅스 가중치들 중 적어도 일부가 0으로 설정된 것을 특징으로 하는 뉴럴 네트워크.A neural network comprising a plurality of layers each including neurons and synapses connecting the neurons contained in neighboring layers,
Wherein at least some of the synapse weights having a value greater than 0 and less than a (a > 0) are set to zero.
상기 0으로 설정된 시냅스 가중치들은 상기 복수의 레이어들 중 일부의 이웃한 레이어들을 연결하는 시냅스들에 해당하는 뉴럴 네트워크. The method according to claim 1,
Wherein the synapse weights set to zero correspond to synapses connecting neighbors of some of the plurality of layers.
b(b>a)보다 큰 값을 가지는 시냅스 가중치들 중 적어도 일부가 상기 b로 설정된 것을 특징으로 하는 뉴럴 네트워크.The method according to claim 1,
wherein at least some of the synaptic weights having a value greater than b (b > a) are set to b.
상기 b로 설정된 시냅스 가중치들은 상기 복수의 레이어들 중 일부의 이웃한 레이어들을 연결하는 시냅스들에 해당하는 뉴럴 네트워크.The method of claim 3,
Wherein the synapse weights set to b correspond to synapses connecting neighboring layers of some of the plurality of layers.
상기 a는 상기 복수의 레이어들 별로 다르게 설정되는, 뉴럴 네트워크.The method according to claim 1,
Wherein the a is set differently for each of the plurality of layers.
상기 a는 특정 레이어 내 출력 맵 채널 별로 다르게 설정되는, 뉴럴 네트워크.The method according to claim 1,
Wherein a is set differently for each intra-layer output map channel.
상기 b는 상기 복수의 레이어들 별로 다르게 설정되는, 뉴럴 네트워크.The method of claim 3,
And b is set differently for the plurality of layers.
상기 b는 특정 레이어 내 출력 맵 채널 별로 다르게 설정되는, 뉴럴 네트워크.The method of claim 3,
And b is set differently for each intra-layer output map channel.
상기 a보다 크거나 같은 값을 가지는 시냅스 가중치들 각각은 log2(max-a)에 대응하는 비트 수-상기 max는 상기 a보다 큰 최대 시냅스 가중치이고, 상기 a 및 상기 max는 정수임-로 표현되는 뉴럴 네트워크.The method according to claim 1,
Wherein each of the synaptic weights having a value equal to or greater than a is a maximum number of bits corresponding to log 2 (max-a), wherein max is a maximum synaptic weight greater than a, and a and max are integers Neural network.
상기 a보다 크거나 같은 값을 가지고, 상기 b보다 작거나 같은 값을 가지는 시냅스 가중치들 각각은 log2(b-a)에 대응하는 비트 수-상기 a 및 상기 b는 정수임-로 표현되는 뉴럴 네트워크.The method of claim 3,
Wherein each of the synaptic weights having a value equal to or greater than a and equal to or less than b is expressed by a number of bits corresponding to log 2 (ba), where a and b are integers.
b(b>0)보다 큰 값을 가지는 시냅스 가중치들 중 적어도 일부가 b로 설정된 것을 특징으로 하는 뉴럴 네트워크.A neural network comprising a plurality of layers each including neurons and synapses connecting the neurons contained in neighboring layers,
wherein at least some of the synapse weights having a value greater than b (b > 0) are set to b.
상기 b로 설정된 시냅스 가중치들은 상기 복수의 레이어들 중 일부의 이웃한 레이어들을 연결하는 시냅스들에 해당하는 뉴럴 네트워크.12. The method of claim 11,
Wherein the synapse weights set to b correspond to synapses connecting neighboring layers of some of the plurality of layers.
상기 b는 상기 복수의 레이어들 별로 다르게 설정되는, 뉴럴 네트워크.12. The method of claim 11,
And b is set differently for the plurality of layers.
상기 b는 특정 레이어 내 출력 맵 채널 별로 다르게 설정되는, 뉴럴 네트워크.12. The method of claim 11,
And b is set differently for each intra-layer output map channel.
상기 b보다 작거나 같은 값을 가지는 시냅스 가중치들 각각은 log2(b)에 대응하는 비트 수-상기 b는 정수임-로 표현되는 뉴럴 네트워크.12. The method of claim 11,
Wherein each of the synapse weights having a value less than or equal to b is expressed by a number of bits corresponding to log 2 (b), where b is an integer.
상기 레이어에 대응하는 정규화 변수에 기초하여, 상기 정규화된 파라미터들을 비정규화(de-regularization)하는 단계;
상기 레이어에 상기 비정규화된 파라미터들을 적용하는 단계; 및
상기 뉴럴 네트워크를 이용하여, 입력 데이터를 인식하는 단계
를 포함하는, 인식 방법.Obtaining regularized parameters corresponding to the layers included in the neural network;
De-normalizing the normalized parameters based on a normalization variable corresponding to the layer;
Applying the non-normalized parameters to the layer; And
Recognizing input data using the neural network
/ RTI >
상기 레이어에 대응하는 정규화 변수는
상기 뉴럴 네트워크에 포함된 복수의 레이어들 별로 상이하게 설정되거나, 상기 레이어에 포함된 복수의 출력 맵 채널들 별로 상이하게 설정되는, 인식 방법.17. The method of claim 16,
The normalization variable corresponding to the layer is
Wherein the plurality of output map channels are set differently for each of a plurality of layers included in the neural network or different for each of a plurality of output map channels included in the layer.
상기 정규화 변수는
0을 기준으로 상기 정규화된 파라미터들을 시프트(shift) 시키는 오프셋을 포함하는, 인식 방법.17. The method of claim 16,
The normalization variable
And an offset to shift the normalized parameters based on zero.
상기 비정규화된 파라미터들이 m비트의 정수이고, 상기 뉴럴 네트워크가 상기 m비트보다 큰 n비트의 실수를 입력 받는 경우,
상기 레이어에 상기 비정규화된 파라미터들을 적용하는 단계는
상기 비정규화된 파라미터들을 상기 n비트의 실수로 비양자화(de-quantization)하는 단계; 및
상기 레이어에 상기 비양자화된 파라미터들을 적용하는 단계
를 더 포함하는, 인식 방법.17. The method of claim 16,
When the denormalized parameters are m-bit integers and the neural network receives an n-bit real number greater than the m-bit,
Wherein applying the non-normalized parameters to the layer comprises:
De-quantizing the denormalized parameters by a real number of n bits; And
Applying the non-quantized parameters to the layer
≪ / RTI >
상기 레이어에 상기 비정규화된 파라미터들을 적용하는 단계는
상기 레이어에 대응하여, 파라미터의 값이 0인지 여부를 지시하는 비트 시퀀스를 획득하는 단계;
상기 비트 시퀀스에 기초하여, 논-제로 시퀀스를 구성하는 상기 비정규화된 파라미터들의 압축을 해제하는 단계; 및
상기 레이어에 상기 압축 해제된 파라미터들을 적용하는 단계
를 포함하는, 인식 방법.17. The method of claim 16,
Wherein applying the non-normalized parameters to the layer comprises:
Obtaining a bit sequence corresponding to the layer, the bit sequence indicating whether the value of the parameter is 0;
Decompressing said non-normalized parameters constituting a non-zero sequence based on said bit sequence; And
Applying the decompressed parameters to the layer
/ RTI >
상기 비정규화된 파라미터들의 압축을 해제하는 단계는
상기 비트 시퀀스 내 제1 인덱스의 비트 값과 상기 논-제로 시퀀스 내 제2 인덱스의 파라미터를 곱하여, 상기 제1 인덱스의 압축 해제된 파라미터를 결정하는 단계;
상기 제2 인덱스를 상기 비트 시퀀스 내 상기 제1 인덱스의 비트 값만큼 증가시키는 단계; 및
상기 제1 인덱스를 1만큼 증가시키는 단계
를 포함하는, 인식 방법.21. The method of claim 20,
Wherein decompressing the denormalized parameters comprises:
Determining a decompressed parameter of the first index by multiplying a bit value of the first index in the bit sequence by a parameter of a second index in the non-zero sequence;
Increasing the second index by a bit value of the first index in the bit sequence; And
Increasing the first index by one
/ RTI >
컴퓨터에서 읽을 수 있는 명령어를 포함하는 메모리
를 포함하고,
상기 명령어가 상기 프로세서에서 실행되면, 상기 프로세서는 뉴럴 네트워크에 포함된 레이어에 대응하는 정규화된(regularized) 파라미터들을 획득하고, 상기 레이어에 대응하는 정규화 변수에 기초하여, 상기 정규화된 파라미터들을 비정규화(de-regularization)하고, 상기 레이어에 상기 비정규화된 파라미터들을 적용하고, 상기 뉴럴 네트워크를 이용하여, 입력 데이터를 인식하는, 인식 장치.A processor; And
A memory containing instructions that can be read by the computer
Lt; / RTI >
If the instruction is executed in the processor, the processor obtains regularized parameters corresponding to the layers contained in the neural network, and normalizes the normalized parameters based on the normalized variable corresponding to the layer de-regularization, applying the non-normalized parameters to the layer, and recognizing input data using the neural network.
상기 레이어에 대응하는 정규화 변수는
상기 뉴럴 네트워크에 포함된 복수의 레이어들 별로 상이하게 설정되거나, 상기 레이어에 포함된 복수의 출력 맵 채널들 별로 상이하게 설정되는, 인식 장치.24. The method of claim 23,
The normalization variable corresponding to the layer is
Wherein the plurality of output map channels are set differently for each of a plurality of layers included in the neural network or different for each of a plurality of output map channels included in the layer.
상기 정규화 변수는
0을 기준으로 상기 정규화된 파라미터들을 시프트(shift) 시키는 오프셋을 포함하는, 인식 장치.24. The method of claim 23,
The normalization variable
And an offset to shift the normalized parameters based on zero.
상기 비정규화된 파라미터들이 m비트의 정수이고, 상기 뉴럴 네트워크가 상기 m비트보다 큰 n비트의 실수를 입력 받는 경우,
상기 프로세서는 상기 비정규화된 파라미터들을 상기 n비트의 실수로 비양자화(de-quantization)하고, 상기 레이어에 상기 비양자화된 파라미터들을 적용하는, 인식 장치.24. The method of claim 23,
When the denormalized parameters are m-bit integers and the neural network receives an n-bit real number greater than the m-bit,
Wherein the processor de-quantizes the non-normalized parameters by the real number of the n bits and applies the non-quantized parameters to the layer.
상기 프로세서는
상기 레이어에 대응하여, 파라미터의 값이 0인지 여부를 지시하는 비트 시퀀스를 획득하고, 상기 비트 시퀀스에 기초하여, 논-제로 시퀀스를 구성하는 상기 비정규화된 파라미터들의 압축을 해제하고, 상기 레이어에 상기 압축 해제된 파라미터들을 적용하는, 인식 장치.24. The method of claim 23,
The processor
Corresponding to the layer, obtaining a bit sequence indicating whether the value of the parameter is 0, decompressing the non-normalized parameters constituting the non-zero sequence based on the bit sequence, And applies the decompressed parameters.
상기 프로세서는
상기 비정규화된 파라미터들의 압축을 해제하기 위해, 상기 비트 시퀀스 내 제1 인덱스의 비트 값과 상기 논-제로 시퀀스 내 제2 인덱스의 파라미터를 곱하여, 상기 제1 인덱스의 압축 해제된 파라미터를 결정하고, 상기 제2 인덱스를 상기 비트 시퀀스 내 상기 제1 인덱스의 비트 값만큼 증가시키고, 상기 제1 인덱스를 1만큼 증가시키는, 인식 장치.28. The method of claim 27,
The processor
Determining a decompressed parameter of the first index by multiplying a bit value of a first index in the bit sequence by a parameter of a second index in the non-zero sequence to decompress the non-normalized parameters, Increases the second index by a bit value of the first index in the bit sequence and increases the first index by one.
Priority Applications (6)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US15/630,610 US11222263B2 (en) | 2016-07-28 | 2017-06-22 | Neural network method and apparatus |
US15/655,203 US10452977B2 (en) | 2016-07-28 | 2017-07-20 | Neural network method and apparatus |
EP17182605.0A EP3276540B1 (en) | 2016-07-28 | 2017-07-21 | Neural network method and apparatus |
CN201710629393.6A CN107665364B (en) | 2016-07-28 | 2017-07-28 | Neural network method and apparatus |
US16/564,494 US11625601B2 (en) | 2016-07-28 | 2019-09-09 | Neural network method and apparatus |
US17/574,408 US20230021306A9 (en) | 2016-07-28 | 2022-01-12 | Neural network method and apparatus |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR20160096173 | 2016-07-28 | ||
KR1020160096173 | 2016-07-28 |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20180013674A true KR20180013674A (en) | 2018-02-07 |
KR102608467B1 KR102608467B1 (en) | 2023-12-04 |
Family
ID=61204146
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020170020034A KR102608467B1 (en) | 2016-07-28 | 2017-02-14 | Method for lightening neural network and recognition method and apparatus using the same |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102608467B1 (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20190098671A (en) * | 2018-02-14 | 2019-08-22 | 삼성전자주식회사 | High speed processing method of neural network and apparatus using thereof |
KR20190137470A (en) * | 2018-06-01 | 2019-12-11 | 아주대학교산학협력단 | Method and apparatus for compressing large capacity networks |
CN110598731A (en) * | 2019-07-31 | 2019-12-20 | 浙江大学 | Efficient image classification method based on structured pruning |
KR20200023695A (en) * | 2018-08-21 | 2020-03-06 | 재단법인 아산사회복지재단 | Learning system to reduce computation volume |
WO2021118140A1 (en) * | 2019-12-11 | 2021-06-17 | 한국전자기술연구원 | Method and apparatus for encoding/decoding deep learning network |
KR102277810B1 (en) * | 2020-11-03 | 2021-07-15 | 아주대학교산학협력단 | System and method for learning of student network using knowledge distillation |
KR102340091B1 (en) * | 2021-03-26 | 2021-12-16 | 세종대학교산학협력단 | Error compensation system and method for quantization of artificial neural network |
US11429838B2 (en) | 2018-11-23 | 2022-08-30 | Samsung Electronics Co., Ltd. | Neural network device for neural network operation, method of operating neural network device, and application processor including the neural network device |
KR20230038636A (en) | 2021-09-07 | 2023-03-21 | 주식회사 노타 | Deep learning model optimization method and system through weight reduction by layer |
US11734577B2 (en) | 2019-06-05 | 2023-08-22 | Samsung Electronics Co., Ltd | Electronic apparatus and method of performing operations thereof |
US11948074B2 (en) | 2018-05-14 | 2024-04-02 | Samsung Electronics Co., Ltd. | Method and apparatus with neural network parameter quantization |
WO2024090600A1 (en) * | 2022-10-26 | 2024-05-02 | 한국전자기술연구원 | Deep learning model training method and deep learning computation apparatus applied with same |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070033419A1 (en) * | 2003-07-07 | 2007-02-08 | Cryptography Research, Inc. | Reprogrammable security for controlling piracy and enabling interactive content |
US20120183187A1 (en) * | 2009-09-17 | 2012-07-19 | Sharp Kabushiki Kaisha | Diagnosis processing device, diagnosis processing system, diagnosis processing method, diagnosis processing program and computer-readable recording medium, and classification processing device |
US20130138589A1 (en) * | 2011-11-28 | 2013-05-30 | Microsoft Corporation | Exploiting sparseness in training deep neural networks |
KR20160034814A (en) * | 2014-09-22 | 2016-03-30 | 삼성전자주식회사 | Client device with neural network and system including the same |
US9323498B2 (en) * | 2013-03-13 | 2016-04-26 | Wisconsin Alumni Research Foundation | Multiplier circuit with dynamic energy consumption adjustment |
US20160174902A1 (en) * | 2013-10-17 | 2016-06-23 | Siemens Aktiengesellschaft | Method and System for Anatomical Object Detection Using Marginal Space Deep Neural Networks |
-
2017
- 2017-02-14 KR KR1020170020034A patent/KR102608467B1/en active IP Right Grant
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070033419A1 (en) * | 2003-07-07 | 2007-02-08 | Cryptography Research, Inc. | Reprogrammable security for controlling piracy and enabling interactive content |
US20120183187A1 (en) * | 2009-09-17 | 2012-07-19 | Sharp Kabushiki Kaisha | Diagnosis processing device, diagnosis processing system, diagnosis processing method, diagnosis processing program and computer-readable recording medium, and classification processing device |
US20130138589A1 (en) * | 2011-11-28 | 2013-05-30 | Microsoft Corporation | Exploiting sparseness in training deep neural networks |
US9323498B2 (en) * | 2013-03-13 | 2016-04-26 | Wisconsin Alumni Research Foundation | Multiplier circuit with dynamic energy consumption adjustment |
US20160174902A1 (en) * | 2013-10-17 | 2016-06-23 | Siemens Aktiengesellschaft | Method and System for Anatomical Object Detection Using Marginal Space Deep Neural Networks |
KR20160034814A (en) * | 2014-09-22 | 2016-03-30 | 삼성전자주식회사 | Client device with neural network and system including the same |
Non-Patent Citations (1)
Title |
---|
Han, Song, Huizi Mao, and William J. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149v5. 2016.2.15.* * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20190098671A (en) * | 2018-02-14 | 2019-08-22 | 삼성전자주식회사 | High speed processing method of neural network and apparatus using thereof |
US11948074B2 (en) | 2018-05-14 | 2024-04-02 | Samsung Electronics Co., Ltd. | Method and apparatus with neural network parameter quantization |
KR20190137470A (en) * | 2018-06-01 | 2019-12-11 | 아주대학교산학협력단 | Method and apparatus for compressing large capacity networks |
KR20200023695A (en) * | 2018-08-21 | 2020-03-06 | 재단법인 아산사회복지재단 | Learning system to reduce computation volume |
US11429838B2 (en) | 2018-11-23 | 2022-08-30 | Samsung Electronics Co., Ltd. | Neural network device for neural network operation, method of operating neural network device, and application processor including the neural network device |
US11734577B2 (en) | 2019-06-05 | 2023-08-22 | Samsung Electronics Co., Ltd | Electronic apparatus and method of performing operations thereof |
CN110598731B (en) * | 2019-07-31 | 2021-08-20 | 浙江大学 | Efficient image classification method based on structured pruning |
CN110598731A (en) * | 2019-07-31 | 2019-12-20 | 浙江大学 | Efficient image classification method based on structured pruning |
WO2021118140A1 (en) * | 2019-12-11 | 2021-06-17 | 한국전자기술연구원 | Method and apparatus for encoding/decoding deep learning network |
KR102277810B1 (en) * | 2020-11-03 | 2021-07-15 | 아주대학교산학협력단 | System and method for learning of student network using knowledge distillation |
KR102340091B1 (en) * | 2021-03-26 | 2021-12-16 | 세종대학교산학협력단 | Error compensation system and method for quantization of artificial neural network |
KR20230038636A (en) | 2021-09-07 | 2023-03-21 | 주식회사 노타 | Deep learning model optimization method and system through weight reduction by layer |
WO2024090600A1 (en) * | 2022-10-26 | 2024-05-02 | 한국전자기술연구원 | Deep learning model training method and deep learning computation apparatus applied with same |
Also Published As
Publication number | Publication date |
---|---|
KR102608467B1 (en) | 2023-12-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR20180013674A (en) | Method for lightening neural network and recognition method and apparatus using the same | |
US20220138576A1 (en) | Neural network method and apparatus | |
US20210089922A1 (en) | Joint pruning and quantization scheme for deep neural networks | |
CN109685198B (en) | Method and device for quantifying parameters of a neural network | |
CN109389219B (en) | Method and device for quantifying parameters of a neural network | |
EP3242254B1 (en) | Convolutional neural network hardware configuration | |
US11403528B2 (en) | Self-tuning incremental model compression solution in deep neural network with guaranteed accuracy performance | |
US11481613B2 (en) | Execution method, execution device, learning method, learning device, and recording medium for deep neural network | |
US10491239B1 (en) | Large-scale computations using an adaptive numerical format | |
KR20190034985A (en) | Method and apparatus of artificial neural network quantization | |
US11604987B2 (en) | Analytic and empirical correction of biased error introduced by approximation methods | |
EP3915056A1 (en) | Neural network activation compression with non-uniform mantissas | |
WO2020176250A1 (en) | Neural network layer processing with normalization and transformation of data | |
US11475308B2 (en) | Jointly pruning and quantizing deep neural networks | |
EP4008057B1 (en) | Lossless exponent and lossy mantissa weight compression for training deep neural networks | |
WO2022168604A1 (en) | Softmax function approximation calculation device, approximation calculation method, and approximation calculation program | |
CN114402596A (en) | Neural network model compression | |
KR20190130443A (en) | Method and apparatus for quantization of neural network | |
WO2021246892A1 (en) | Method for training an artificial neural network comprising quantized parameters | |
US20220405561A1 (en) | Electronic device and controlling method of electronic device | |
US20210174815A1 (en) | Quantization method of latent vector for audio encoding and computing device for performing the method | |
US20200143282A1 (en) | Quantizing machine learning models with balanced resolution via damped encoding | |
US20220164411A1 (en) | Bias scaling for n-bit constrained hardware acceleration | |
WO2021083154A1 (en) | Method and apparatus for quantization of neural networks post training | |
CN114065913A (en) | Model quantization method and device and terminal equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |