KR20210111677A - Method for clipping neural networks, method for calculating convolution of neural networks and apparatus for performing the methods - Google Patents
Method for clipping neural networks, method for calculating convolution of neural networks and apparatus for performing the methods Download PDFInfo
- Publication number
- KR20210111677A KR20210111677A KR1020210020655A KR20210020655A KR20210111677A KR 20210111677 A KR20210111677 A KR 20210111677A KR 1020210020655 A KR1020210020655 A KR 1020210020655A KR 20210020655 A KR20210020655 A KR 20210020655A KR 20210111677 A KR20210111677 A KR 20210111677A
- Authority
- KR
- South Korea
- Prior art keywords
- kernel
- slice
- slices
- similar
- input channel
- Prior art date
Links
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 74
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000012935 Averaging Methods 0.000 claims description 3
- 238000004590 computer program Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 35
- 238000004364 calculation method Methods 0.000 description 23
- 238000012545 processing Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 9
- 238000013527 convolutional neural network Methods 0.000 description 6
- 239000013598 vector Substances 0.000 description 4
- 230000001174 ascending effect Effects 0.000 description 3
- 241000282472 Canis lupus familiaris Species 0.000 description 2
- 230000009471 action Effects 0.000 description 2
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000013138 pruning Methods 0.000 description 1
- 238000004064 recycling Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 239000013585 weight reducing agent Substances 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/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
- G06N20/10—Machine learning using kernel methods, e.g. support vector machines [SVM]
-
- 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
-
- 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
- G06N3/082—Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
Abstract
Description
아래 실시예들은 뉴럴 네트워크의 경량화에 관한 것으로, 뉴럴 네트워크를 클리핑하고 클리핑된 뉴럴 네트워크에서 컨벌루션을 수행하는 기술에 관한 것이다.The following embodiments relate to weight reduction of a neural network, and to a technique for clipping a neural network and performing convolution in the clipped neural network.
컨벌루션 뉴럴 네트워크의 공간 복잡성과 저장 공간 문제를 해결하기 위해, 뉴럴 네트워크를 클리핑하는 압축 방법이 사용될 수 있다. 컨벌루션 뉴럴 네트워크가 학습된 후에 0 또는 임계 값에 가까운 가중치가 검색되고 클리핑될 수 있다. 클리핑된 가중치의 인덱스는 인덱스 정보에 저장될 수 있다. 다만, 단순한 클리핑 방법은 클리핑된 가중치 분포가 무작위이기 때문에 클리핑된 가중치의 인덱스를 저장하기 위해 대량의 추가적인 참조 공간을 필요로 하고, 클리핑된 가중치가 불규칙한 형태인 경우 추론 과정에서 가중치에 대한 액세스에 문제가 발생할 수 있다.In order to solve the spatial complexity and storage space problems of convolutional neural networks, a compression method of clipping neural networks may be used. After the convolutional neural network is trained, weights close to zero or a threshold can be retrieved and clipped. The index of the clipped weight may be stored in index information. However, the simple clipping method requires a large amount of additional reference space to store the index of the clipped weight because the clipped weight distribution is random. may occur.
위에서 설명한 배경기술은 발명자가 본원의 개시 내용을 도출하는 과정에서 보유하거나 습득한 것으로서, 반드시 본 출원 전에 일반 공중에 공개된 공지기술이라고 할 수는 없다. The background art described above is possessed or acquired by the inventor in the process of deriving the disclosure of the present application, and it cannot necessarily be said to be a known technology disclosed to the general public prior to the present application.
일 실시예에 따른 뉴럴 네트워크의 클리핑 방법 은, 뉴럴 네트워크에 포함된 컨벌루션 레이어의 컨벌루션 매개 변수에 기초하여 상기 컨벌루션 레이어의 입력 채널의 커널 슬라이스(kernel slice)를 선택하는 동작; 상기 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정하는 동작; 하나 이상의 상기 유사한 커널 슬라이스를 기초로 상기 선택된 커널 슬라이스를 대체하는 대체 슬라이스를 결정하는 동작; 및 상기 선택된 커널 슬라이스를 클리핑하고 상기 대체 슬라이스로 상기 클리핑된 커널 슬라이스를 대체하는 동작을 포함하고, 상기 컨벌루션 매개 변수는 상기 컨벌루션 레이어의 상기 입력 채널의 수, 출력 채널의 수, 컨벌루션 커널의 필터의 폭, 컨벌루션 커널의 필터의 높이를 포함할 수 있다.A clipping method of a neural network according to an embodiment includes: selecting a kernel slice of an input channel of a convolutional layer based on a convolution parameter of a convolutional layer included in the neural network; determining one or more kernel slices similar to the selected kernel slice; determining a replacement slice to replace the selected kernel slice based on one or more of the similar kernel slices; and clipping the selected kernel slice and replacing the clipped kernel slice with the replacement slice, wherein the convolution parameters are the number of input channels, number of output channels, and filter of the convolutional kernel of the convolutional layer. It can include the width and height of the filter in the convolution kernel.
상기 클리핑된 커널 슬라이스의 인덱스를 저장하는 동작을 더 포함할 수 있다.The method may further include storing an index of the clipped kernel slice.
상기 유사한 하나 이상의 커널 슬라이스를 결정하는 동작은, 상기 컨벌루션 레이어의 각 입력 채널의 커널 슬라이스의 놈(norm)을 계산하는 동작; 및 상기 각 입력 채널의 커널 슬라이스의 놈을 기초로 상기 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정하는 동작을 포함할 수 있다.The determining of the one or more similar kernel slices may include: calculating a norm of a kernel slice of each input channel of the convolutional layer; and determining one or more kernel slices similar to the selected kernel slice based on the norm of the kernel slice of each input channel.
상기 놈을 기초로 상기 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정하는 동작은, 상기 각 입력 채널의 커널 슬라이스의 놈을 기초로 상기 각 입력 채널의 커널 슬라이스를 하나 이상의 클래스로 분류하는 단계; 및 상기 선택된 커널 슬라이스가 속한 클래스로 분류된 하나 이상의 커널 슬라이스 간의 유사도를 기초로 상기 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정하는 동작을 포함할 수 있다.The determining of one or more kernel slices similar to the selected kernel slice based on the norm may include: classifying the kernel slice of each input channel into one or more classes based on the norm of the kernel slice of each input channel; and determining one or more kernel slices similar to the selected kernel slice based on a similarity between one or more kernel slices classified into a class to which the selected kernel slice belongs.
상기 유사도를 기초로 상기 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정하는 동작은, 상기 선택된 커널 슬라이스가 속한 클래스로 분류된 각각의 커널 슬라이스와 상기 선택된 커널 슬라이스 간의 차이의 놈을 계산함으로써 유사도를 결정하는 동작; 및 상기 유사도가 임계값 이하인 커널 슬라이스를 상기 선택된 커널 슬라이스와 유사한 커널 슬라이스로 결정하는 동작을 포함할 수 있다.The determining of one or more kernel slices similar to the selected kernel slice based on the similarity may include determining the similarity by calculating a norm of a difference between each kernel slice classified into a class to which the selected kernel slice belongs and the selected kernel slice. action to do; and determining a kernel slice having the similarity equal to or less than a threshold value as a kernel slice similar to the selected kernel slice.
상기 대체 슬라이스를 결정하는 동작은, 상기 선택된 커널 슬라이스 및 상기 하나 이상의 유사한 커널 슬라이스를 평균하여 평균 커널 슬라이스를 계산하는 동작; 및 상기 선택된 커널 슬라이스 및 상기 하나 이상의 유사한 커널 슬라이스 중 적어도 하나의 커널 슬라이스를 상기 평균 커널 슬라이스로 대체하는 동작을 포함할 수 있다.The determining of the replacement slice may include calculating an average kernel slice by averaging the selected kernel slice and the one or more similar kernel slices; and replacing at least one kernel slice among the selected kernel slice and the one or more similar kernel slices with the average kernel slice.
상기 커널 슬라이스를 선택하는 동작은, 상기 입력 채널의 수를 기초로 상기 커널 슬라이스의 수를 결정하는 동작; 및 상기 결정된 커널 슬라이스의 수 및 상기 컨벌루션 매개 변수를 기초로 상기 컨벌루션 레이어의 컨벌루션 커널을 나타내는 텐서(tensor)로부터 상기 입력 채널의 커널 슬라이스를 추출하는 동작을 포함할 수 있다.The selecting of the kernel slices may include: determining the number of kernel slices based on the number of input channels; and extracting the kernel slice of the input channel from a tensor indicating a convolutional kernel of the convolutional layer based on the determined number of kernel slices and the convolution parameter.
일 실시예에 따른 뉴럴 네트워크의 컨벌루션 계산 방법은, 뉴럴 네트워크에 포함된 컨벌루션 레이어의 인덱스 정보를 기초로 상기 각 입력 채널의 커널 슬라이스가 대체 슬라이스인지 판단하는 동작; 상기 커널 슬라이스가 대체 슬라이스인 경우 상기 인덱스 정보 중에서 상기 대체 슬라이스의 인덱스를 획득하는 동작; 및 상기 대체 슬라이스의 인덱스를 기초로 컨벌루션을 계산하는 동작을 포함하고, 상기 컨벌루션 레이어의 컨벌루션 매개 변수에 기초하여 선택된 커널 슬라이스와 유사한 커널 슬라이스는 클리핑되고 상기 대체 슬라이스로 대체될 수 있다.According to an embodiment, a method for calculating a convolution of a neural network includes: determining whether a kernel slice of each input channel is a replacement slice based on index information of a convolution layer included in the neural network; obtaining an index of the replacement slice from among the index information when the kernel slice is a replacement slice; and calculating a convolution based on the index of the replacement slice, wherein a kernel slice similar to the selected kernel slice based on the convolution parameter of the convolution layer may be clipped and replaced with the replacement slice.
일 실시예에 따른 컴퓨터 판독가능 기록매체는 상기 방법을 실행하는 컴퓨터 프로그램을 저장할 수 있다.A computer-readable recording medium according to an embodiment may store a computer program for executing the method.
일 실시예에 따른 전자 장치는, 적어도 하나의 프로세서를 포함하고, 상기 프로세서는, 뉴럴 네트워크에 포함된 컨벌루션 레이어의 컨벌루션 매개 변수에 기초하여 상기 컨벌루션 레이어의 입력 채널의 커널 슬라이스(kernel slice)를 선택하는 동작; 상기 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정하는 동작; 하나 이상의 상기 유사한 커널 슬라이스를 기초로 상기 선택된 커널 슬라이스를 대체하는 대체 슬라이스를 결정하는 동작; 및 상기 선택된 커널 슬라이스를 클리핑하고 상기 대체 슬라이스로 상기 클리핑된 커널 슬라이스를 대체하는 동작을 수행하고, 상기 컨벌루션 매개 변수는 상기 컨벌루션 레이어의 상기 입력 채널의 수, 출력 채널의 수, 컨벌루션 커널의 필터의 폭, 컨벌루션 커널의 필터의 높이를 포함할 수 있다.An electronic device according to an embodiment includes at least one processor, wherein the processor selects a kernel slice of an input channel of the convolutional layer based on a convolution parameter of a convolutional layer included in a neural network. action to do; determining one or more kernel slices similar to the selected kernel slice; determining a replacement slice to replace the selected kernel slice based on one or more of the similar kernel slices; and clipping the selected kernel slice and replacing the clipped kernel slice with the replacement slice, wherein the convolution parameters are the number of input channels, number of output channels, and filter of the convolutional kernel of the convolutional layer. It can include the width and height of the filter in the convolution kernel.
도 1은 일 실시예에 따른 뉴럴 네트워크의 클리핑 방법의 동작을 도시한 흐름도이다.
도 2는 일 실시예에 따른 뉴럴 네트워크의 클리핑 방법의 예시적인 흐름도이다.
도 3은 일 실시예에 따른 뉴럴 네트워크의 클리핑 방법에서 커널 슬라이스를 추출하는 예시를 도시한 도면이다.
도 4는 일 실시예에 따른 뉴럴 네트워크의 클리핑 방법에서 커널 슬라이스의 클래스를 분류하는 예시를 도시한 도면이다.
도 5는 일 실시예에 따른 뉴럴 네트워크의 클리핑 방법에서 동일한 클래스에 속한 커널 슬라이스의 유사도를 결정하는 예시를 도시한 도면이다.
도 6은 일 실시예에 따른 뉴럴 네트워크의 클리핑 방법에서 선택된 커널 슬라이스와 유사한 커널 슬라이스를 클리핑하는 예시를 도시한 도면이다.
도 7은 일 실시예에 따른 뉴럴 네트워크의 계산 방법의 동작을 도시한 흐름도이다.
도 8은 일반적인 컨벌루션 계산의 예시를 도시한 도면이다.
도 9는 일 실시예에 따른 뉴럴 네트워크의 계산 방법에서 컨벌루션 계산의 예시를 도시한 도면이다.
도 10은 일 실시예에 따른 전자 장치의 구성을 도시한 도면이다.1 is a flowchart illustrating an operation of a clipping method of a neural network according to an embodiment.
2 is an exemplary flowchart of a clipping method of a neural network according to an embodiment.
3 is a diagram illustrating an example of extracting a kernel slice in a clipping method of a neural network according to an embodiment.
4 is a diagram illustrating an example of classifying a class of a kernel slice in a clipping method of a neural network according to an embodiment.
5 is a diagram illustrating an example of determining a degree of similarity between kernel slices belonging to the same class in a clipping method of a neural network according to an embodiment.
6 is a diagram illustrating an example of clipping a kernel slice similar to a selected kernel slice in a neural network clipping method according to an embodiment.
7 is a flowchart illustrating an operation of a method for calculating a neural network according to an embodiment.
8 is a diagram illustrating an example of a general convolutional calculation.
9 is a diagram illustrating an example of a convolution calculation in a method of calculating a neural network according to an embodiment.
10 is a diagram illustrating a configuration of an electronic device according to an exemplary embodiment.
실시예들에 대한 특정한 구조적 또는 기능적 설명들은 단지 예시를 위한 목적으로 개시된 것으로서, 다양한 형태로 변경되어 구현될 수 있다. 따라서, 실제 구현되는 형태는 개시된 특정 실시예로만 한정되는 것이 아니며, 본 명세서의 범위는 실시예들로 설명한 기술적 사상에 포함되는 변경, 균등물, 또는 대체물을 포함한다.Specific structural or functional descriptions of the embodiments are disclosed for purposes of illustration only, and may be changed and implemented in various forms. Accordingly, the actual implemented form is not limited to the specific embodiments disclosed, and the scope of the present specification includes changes, equivalents, or substitutes included in the technical idea described in the embodiments.
제1 또는 제2 등의 용어를 다양한 구성요소들을 설명하는데 사용될 수 있지만, 이런 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 해석되어야 한다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소는 제1 구성요소로도 명명될 수 있다.Although terms such as first or second may be used to describe various components, these terms should be interpreted only for the purpose of distinguishing one component from another. For example, a first component may be termed a second component, and similarly, a second component may also be termed a first component.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다.When a component is referred to as being “connected to” another component, it may be directly connected or connected to the other component, but it should be understood that another component may exist in between.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 설명된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함으로 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The singular expression includes the plural expression unless the context clearly dictates otherwise. In this specification, terms such as "comprise" or "have" are intended to designate that the described feature, number, step, operation, component, part, or combination thereof exists, and includes one or more other features or numbers, It should be understood that the possibility of the presence or addition of steps, operations, components, parts or combinations thereof is not precluded in advance.
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 해당 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 명세서에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art. Terms such as those defined in a commonly used dictionary should be interpreted as having a meaning consistent with the meaning in the context of the related art, and should not be interpreted in an ideal or excessively formal meaning unless explicitly defined in the present specification. does not
이하, 실시예들을 첨부된 도면들을 참조하여 상세하게 설명한다. 첨부 도면을 참조하여 설명함에 있어, 도면 부호에 관계없이 동일한 구성 요소는 동일한 참조 부호를 부여하고, 이에 대한 중복되는 설명은 생략하기로 한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. In the description with reference to the accompanying drawings, the same components are assigned the same reference numerals regardless of the reference numerals, and overlapping descriptions thereof will be omitted.
도 1은 일 실시예에 따른 뉴럴 네트워크의 클리핑 방법의 동작을 도시한 흐름도이다.1 is a flowchart illustrating an operation of a clipping method of a neural network according to an embodiment.
일 실시예에 따르면, 전자 장치는 학습이 수행된 뉴럴 네트워크의 컨벌루션 레이어의 커널 슬라이스(kernel slice)를 클리핑(clipping)할 수 있다. 전자 장치는 유사한 커널 슬라이스들을 대체 슬라이스로 대체함으로써 커널 슬라이스의 저장 공간 및 복잡도를 줄일 수 있다. 전자 장치는 클리핑된 커널 슬라이스의 인덱스를 대체 슬라이스에 재활용할 수 있다. 이하에서, 클리핑은 프루닝(pruning)으로 지칭될 수 있다.According to an embodiment, the electronic device may clip a kernel slice of a convolutional layer of a neural network on which learning is performed. The electronic device may reduce the storage space and complexity of the kernel slice by replacing similar kernel slices with the replacement slice. The electronic device may reuse the index of the clipped kernel slice to the replacement slice. Hereinafter, clipping may be referred to as pruning.
일 실시예에 따르면, 동작(101)에서, 전자 장치는 뉴럴 네트워크에 포함된 컨벌루션 레이어의 컨벌루션 매개 변수에 기초하여 컨벌루션 레이어의 입력 채널의 커널 슬라이스를 선택할 수 있다. 일 실시예에 따르면, 전자 장치는 입력 채널의 수를 기초로 커널 슬라이스의 수를 결정할 수 있다. 일 실시예에 따르면, 전자 장치는 결정된 커널 슬라이스의 수 및 컨벌루션 매개 변수를 기초로 컨벌루션 레이어의 컨벌루션 커널을 나타내는 텐서(tensor)로부터 입력 채널의 커널 슬라이스를 추출할 수 있다. 여기서, 컨벌루션 매개 변수는 컨벌루션 레이어의 입력 채널의 수, 출력 채널의 수, 컨벌루션 커널의 필터의 폭, 컨벌루션 커널의 필터의 높이를 포함할 수 있다.According to an embodiment, in operation 101, the electronic device may select a kernel slice of an input channel of a convolutional layer based on a convolution parameter of a convolutional layer included in the neural network. According to an embodiment, the electronic device may determine the number of kernel slices based on the number of input channels. According to an embodiment, the electronic device may extract a kernel slice of an input channel from a tensor indicating a convolutional kernel of a convolutional layer based on the determined number of kernel slices and a convolution parameter. Here, the convolution parameter may include the number of input channels of the convolutional layer, the number of output channels, the width of the filter of the convolutional kernel, and the height of the filter of the convolutional kernel.
일 실시예에 따르면, 동작(103)에서, 전자 장치는 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정할 수 있다.According to an embodiment, in operation 103 , the electronic device may determine one or more kernel slices similar to the selected kernel slice.
일 실시예에 따르면, 전자 장치는 컨벌루션 레이어의 각 입력 채널의 커널 슬라이스의 놈(norm)을 계산할 수 있다.According to an embodiment, the electronic device may calculate a norm of a kernel slice of each input channel of the convolutional layer.
일 실시예에 따르면, 전자 장치는 각 입력 채널의 커널 슬라이스의 놈을 기초로 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정할 수 있다. 일 실시예에 따르면, 전자 장치는 각 입력 채널의 커널 슬라이스의 놈을 기초로 각 입력 채널의 커널 슬라이스를 하나 이상의 클래스로 분류할 수 있다. 일 실시예에 따르면, 전자 장치는 선택된 커널 슬라이스가 속한 클래스로 분류된 하나 이상의 커널 슬라이스 간의 유사도를 기초로 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정할 수 있다. According to an embodiment, the electronic device may determine one or more kernel slices similar to the selected kernel slice based on the norm of the kernel slice of each input channel. According to an embodiment, the electronic device may classify the kernel slice of each input channel into one or more classes based on the norm of the kernel slice of each input channel. According to an embodiment, the electronic device may determine one or more kernel slices similar to the selected kernel slice based on a similarity between one or more kernel slices classified into a class to which the selected kernel slice belongs.
일 실시예에 따르면, 전자 장치는 선택된 커널 슬라이스가 속한 클래스로 분류된 각각의 커널 슬라이스와 선택된 커널 슬라이스 간의 차이의 놈을 계산함으로써 유사도를 결정할 수 있다. 일 실시예에 따르면, 전자 장치는 유사도가 임계값 이하인 커널 슬라이스를 선택된 커널 슬라이스와 유사한 커널 슬라이스로 결정할 수 있다. 전자 장치는 유사도 계산을 분류된 클래스 별로 수행함으로써 유사도 계산에 필요한 리소스 및 시간을 절약할 수 있다.According to an embodiment, the electronic device may determine the similarity by calculating a norm of a difference between each kernel slice classified into a class to which the selected kernel slice belongs and the selected kernel slice. According to an embodiment, the electronic device may determine a kernel slice having a similarity equal to or less than a threshold value as a kernel slice similar to the selected kernel slice. The electronic device may save resources and time required for the similarity calculation by performing the similarity calculation for each classified class.
일 실시예에 따르면, 동작(105)에서, 전자 장치는 하나 이상의 유사한 커널 슬라이스를 기초로 선택된 커널 슬라이스를 대체하는 대체 슬라이스를 결정할 수 있다. 일 실시예에 따르면, 전자 장치는 선택된 커널 슬라이스 및 하나 이상의 유사한 커널 슬라이스를 평균하여 평균 커널 슬라이스를 계산할 수 있다. 일 실시예에 따르면, 전자 장치는 선택된 커널 슬라이스 및 하나 이상의 유사한 커널 슬라이스 중 적어도 하나의 커널 슬라이스를 평균 커널 슬라이스로 대체할 수 있다. 다른 실시예에 따르면, 전자 장치는 선택된 커널 슬라이스 및 하나 이상의 유사한 커널 슬라이스 중 적어도 하나의 커널 슬라이스를 선택된 커널 슬라이스 및 하나 이상의 유사한 커널 슬라이스 중의 다른 커널 슬라이스로 대체할 수도 있다.According to an embodiment, in operation 105 , the electronic device may determine a replacement slice to replace the selected kernel slice based on one or more similar kernel slices. According to an embodiment, the electronic device may calculate an average kernel slice by averaging the selected kernel slice and one or more similar kernel slices. According to an embodiment, the electronic device may replace at least one kernel slice among the selected kernel slice and one or more similar kernel slices with an average kernel slice. According to another embodiment, the electronic device may replace at least one kernel slice among the selected kernel slice and one or more similar kernel slices with another kernel slice among the selected kernel slice and one or more similar kernel slices.
일 실시예에 따르면, 동작(107)에서, 전자 장치는 선택된 커널 슬라이스를 클리핑하고 대체 슬라이스로 클리핑된 커널 슬라이스를 대체할 수 있다. 일 실시예에 따르면, 전자 장치는 클리핑된 커널 슬라이스의 인덱스를 저장할 수 있다. According to an embodiment, in operation 107 , the electronic device may clip the selected kernel slice and replace the clipped kernel slice with the replacement slice. According to an embodiment, the electronic device may store the index of the clipped kernel slice.
일 실시예에 따르면, 전자 장치는 유사한 커널 슬라이스를 클리핑하고 클리핑된 커널 슬라이스의 인덱스를 재활용함으로써 추가적인 참조 공간 없이도 효율적으로 컨벌루션 뉴럴 네트워크의 공간 복잡성과 저장 공간 문제를 완화할 수 있다. 뉴럴 네트워크에서 미리 설정된 가중치가 차지하는 저장 공간을 클리핑하는 대신 입력 채널의 유사한 커널 슬라이스를 클리핑함으로써, 전자 장치는 뉴럴 네트워크의 공간 복잡성과 컨벌루션 레이어가 요구하는 저장 공간을 줄일 수 있다. 전자 장치는 컨벌루션 뉴럴 네트워크의 가중치의 표현 형식에 구애되지 않고 가중치를 클리핑할 수 있다. According to an embodiment, the electronic device may efficiently alleviate spatial complexity and storage space problems of a convolutional neural network without an additional reference space by clipping a similar kernel slice and recycling an index of the clipped kernel slice. By clipping a similar kernel slice of an input channel instead of clipping the storage space occupied by the preset weight in the neural network, the electronic device can reduce the spatial complexity of the neural network and the storage space required by the convolutional layer. The electronic device may clip the weights regardless of the expression format of the weights of the convolutional neural network.
도 2는 일 실시예에 따른 뉴럴 네트워크의 클리핑 방법의 예시적인 흐름도이다.2 is an exemplary flowchart of a clipping method of a neural network according to an embodiment.
전자 장치는 학습된 뉴럴 네트워크에 대해 입력 채널을 클리핑할 수 있다. 뉴럴 네트워크는 딥 뉴럴 네트워크로서 컨벌루션 레이어를 포함할 수 있다. 이하에서, 뉴럴 네트워크는 N으로 표시될 수 있다.The electronic device may clip the input channel with respect to the learned neural network. The neural network may include a convolutional layer as a deep neural network. Hereinafter, the neural network may be denoted by N.
동작(201)에서, 전자 장치는 뉴럴 네트워크 N의 정보를 획득할 수 있다. 전자 장치는 뉴럴 네트워크 N의 제1 컨벌루션 레이어의 커널 를 읽고 제1 컨벌루션 레이어의 컨벌루션 매개 변수를 획득할 수 있다. 컨벌루션 매개 변수는 입력 채널의 수 C, 출력 채널 수S, 컨벌루션 필터 너비w 및 컨벌루션 필터 높이h를 포함할 수 있다. 제1 컨벌루션 레이어는 입력 데이터가 통과하는 순방향을 기준으로 첫번째 컨벌루션 레이어를 의미할 수 있다.In
동작(203)에서, 전자 장치는 1에서 C까지의 입력 채널 각각에 대응하는 커널 슬라이스의 정보 를 획득할 수 있다. 여기서, 커널 은 4차원 텐서(tensor)일 수 있고, 커널 슬라이스는 각 입력 채널에 대응하는 일 수 있다. 예를 들어, 커널 슬라이스는 컨벌루션 레이어의 커널에 대응하는 행렬에서 추출된 벡터일 수 있다. 전자 장치는 길이가 C인 입력 채널에 대응하는 제1차원의 인덱스 1을 선택하고, 나머지 가능한 S, w 및 h의 모든 조합을 포함하는 커널 슬라이스 를 획득할 수 있다. 다음으로, 전자 장치는 길이가 C인 입력 채널에 대응하는 제1차원의 인덱스 2를 선택하고, 나머지 가능한 S, w 및 h의 모든 조합을 포함하는 커널 슬라이스 를 획득할 수 있다. 이처럼, 전자 장치는 제1 차원의 인덱스 1 부터 C까지 상기 과정을 반복하여 커널 슬라이스를 획득할 수 있다.In
동작(205)에서, 전자 장치는 C개의 커널 슬라이스에 대한 놈(norm)을 계산할 수 있다. 전자 장치는 C개의 입력 채널의 커널 슬라이스 놈의 크기를 비교하여 유사한 놈을 가진 커널 슬라이스들을 클래스 별로 분류할 수 있다. 예를 들어, 커널 슬라이스는 T개의 클래스 , , ??, 중의 하나로 분류될 수 있다.In
커널 슬라이스 간의 차이의 놈을 사용할 경우, 두 개의 동일한 크기 텐서 A와 B 사이의 유사도를 비교할 수 있지만, 두 개의 입력 채널의 커널 슬라이스 간의 차이의 놈은 많은 양의 계산을 요구한다. 일 실시예에 따르면, 전자 장치는 먼저 각 입력 채널의 커널 슬라이스의 놈을 계산하고, 커널 슬라이스의 놈의 유사도를 이용하여 임시적인 분류를 수행할 수 있다. 여기서, 동일한 클래스에 속하는 커널 슬라이스는 유사할 수 있지만 다른 클래스에 속하는 커널 슬라이스는 유사할 수 없다. 이후, 전자 장치는 각 클래스 내의 커널 슬라이스의 유사도를 계산함으로써 리소스를 절약하면서도 높은 수준의 정확도를 유지할 수 있다. Norm of difference between kernel slices , it is possible to compare the similarity between two equal-size tensors A and B, but the norm of the difference between the kernel slices of two input channels requires a large amount of computation. According to an embodiment, the electronic device first performs a norm of a kernel slice of each input channel. , and temporal classification can be performed using the similarity of the norm of the kernel slice. Here, kernel slices belonging to the same class may be similar, but kernel slices belonging to different classes may not be similar. Thereafter, the electronic device may maintain a high level of accuracy while saving resources by calculating the similarity of kernel slices within each class.
동작(207)에서, 전자 장치는 동일한 클래스 내의 커널 슬라이스 간의 유사도를 계산할 수 있다. 유사도 는 동일한 내에 있는 서로 다른 입력 채널의 커널 슬라이스 간 차이의 놈으로 정의될 수 있다. 임계 값에 대해 인 경우, 와 는 유사한 것으로 결정될 수 있다.In
동작(207)은 동작(205)과 연계되며, 전자 장치는 동일한 클래스 내의 커널 슬라이스 간의 유사도만을 계산함으로써 리소스를 절약하는 동시에 높은 수준의 정확도를 유지할 수 있다. 동작(205)의 차이의 놈은 예비적인 판단을 위한 것이고 동작(207)의 커널 슬라이스 간의 놈은 정확한 유사도 판단을 위한 것이다. 예를 들어, 벡터 와 벡터 의 놈은 동일하지만, 두 벡터 간의 차이의 놈은 4이다.
동작(209)에서, 전자 장치는 T개의 에 대하여 각 에서 모든 입력 채널의 유사한 커널 슬라이스를 결정하고, 개의 세트를 획득할 수 있다. 세트는 M개일 수 있고, 여기서 일 수 있다. 각 세트에는 입력 채널의 유사한 커널 슬라이스에 해당하는 입력 채널의 인덱스가 저장될 수 있다. 동일한 에 있는 각 두 개의 입력 채널의 인덱스 i 및 j에 해당하는 입력 채널의 커널 슬라이스 및 는 를 만족할 수 있다. 세트 에는 모든 중 유사한 입력 채널에 대응하지 않는 커널 슬라이스 인덱스가 저장될 수 있다.In
각 에 대해, 전자 장치는 입력 채널의 가장 작은 인덱스의 커널 슬라이스를 추출하고, 인덱스 순서로 추출된 커널 슬라이스와 다른 입력 채널의 커널 슬라이스간의 유사도을 계산할 수 있다. 전자 장치는 를 만족하는 입력 채널의 인덱스 i 및 j를 세트에 포함시키고, 에 포함된 입력 채널의 인덱스를 에서 제거할 수 있다. 를 만족하는 입력 채널의 커널 슬라이스를 찾지 못한 경우, 전자 장치는 i를 세트 에 포함시키고, 에서 i를 제거할 수 있다. each For , the electronic device determines the kernel slice of the smallest index of the input channel. , and the kernel slice extracted in index order and the kernel slice of the input channel different from that of the input channel. similarity between can be calculated. the electronic device Set the indices i and j of the input channel that satisfy included in the index of the input channel included in can be removed from Kernel slice of the input channel that satisfies If not found, the electronic device sets i included in i can be removed from
전자 장치 다음 에 대해 입력 채널의 가장 작은 인덱스의 커널 슬라이스를 추출하고, 인덱스 순서로 추출된 커널 슬라이스와 다른 입력 채널의 커널 슬라이스간의 채널 유사도을 계산할 수 있다. 전자 장치는 를 만족하는 입력 채널의 인덱스 x 및 y를 세트에 포함시키고, 에 입력된 입력 채널의 인덱스를 에서 제거할 수 있다. 를 만족하는 입력 채널의 커널 슬라이스 를 찾지 못하는 경우, 전자 장치는 x를 세트 에 포함시키고, 에서 x를 제거할 수 있다. 이처럼 가 빈 세트가 될 때까지 상기 과정이 반복되고, 개의 , , , 세트가 획득될 수 있다.electronic device Kernel slice at the smallest index of the input channel for , and the kernel slice extracted in index order and the kernel slice of the input channel different from that of the input channel. channel similarity between can be calculated. the electronic device Set the indices x and y of the input channel that satisfy included in the index of the input channel input to can be removed from Kernel slice of the input channel that satisfies If not found, the electronic device sets x included in x can be removed from like this The above process is repeated until is an empty set, doggy , , , A set may be obtained.
동작(209)의 결과, M개의 세트가 획득될 수 있다. M개의 세트 각각은 컨벌루션 커널 K에 포함된 커널 슬라이스 중에서 유사한 입력 채널의 인덱스를 포함할 수 있다. 세트 는 어느 것과도 유사하지 않은 입력 채널의 커널 슬라이스의 인덱스를 포함할 수 있다. 이처럼, 동작(209)은 클리핑될 입력 채널의 커널 슬라이스를 최종적으로 결정할 수 있다. As a result of
전자 장치는 및 를 기반으로 클리핑을 수행할 수 있다. 각 에 대해, 입력 채널의 인덱스 값 중 가장 낮은 값부터 시작하여 인덱스의 오름차순으로 비교 과정이 수행될 수 있다. 이를 통해, 가 변경된 후에 생길 수 있는 중복된 비교 과정을 피할 수 있다. 여기서, 또는 를 만족하는 입력 채널의 인덱스를 반복 기록하지 않는다는 것은 세트 또는 의 요소 값이 반복되지 않는다는 것을 의미하며, 그렇지 않으면 어떠한 입력 채널의 커널 슬라이스가 그 자체와 유사하다는 것을 의미한다. 만약 세트 및 M개의 세트의 요소의 수량 및 분포가 미리 설정된 수량 요건 및/또는 분포 요건을 충족하지 못하는 경우, 동작(207)로 돌아가서 유사도의 임계 값 의 크기가 조정될 수 있다.the electronic device and Clipping can be performed based on each , the comparison process may be performed in ascending order of the index starting from the lowest value among the index values of the input channel. because of this, It is possible to avoid the duplicated comparison process that may occur after is changed. here, or Not repeating the index of the input channel that satisfies the set or It means that the element values of are not repeated, otherwise the kernel slice of any input channel is similar to itself. if set and M sets If the quantity and distribution of elements of n do not meet the preset quantity requirement and/or distribution requirement, it returns to
동작(211)에서, 전자 장치는 세트 을 트래버스(traverse)할 수 있다. 전자 장치는 각 에 대해, 만약 그 원소의 개수가 인 경우, 그 중 모든 인덱스에 대응하는 입력 채널의 커널 슬라이스의 평균 커널 슬라이스를 계산할 수 있다. M개의 평균 커널 슬라이스가 획득될 수 있다. 전자 장치는 수학식 1에 따라 평균 커널 슬라이스를 계산할 수 있다. In
동작(211)에서, 평균 커널 슬라이스는 입력 채널의 새로운 커널 슬라이스로서 클리핑된 커널 슬라이스 대신 추가될 수 있다. 여기서 평균 커널 슬라이스는 어떠한 에 있는 모든 입력 커널 슬라이스의 평균 텐서를 의미하며, 그 차원은 원래의 입력 채널의 커널 슬라이스 와 동일할 수 있다. 와 는 모두 M개이며, 의 개수에 따라 같은 수의 평균 커널 슬라이스가 생성될 수 있다.In
동작(211)에서, 전자 장치는 모든 세트를 트래버스할 수 있다. 각 에 대해, 전자 장치는 원래의 컨벌루션 커널 중에서 인덱스가 인 모든 입력 채널의 커널 슬라이스 를 클리핑할 수 있다. 전자 장치는 에 대응하는 평균 커널 슬라이스를 클리핑된 커널 슬라이스 대신 해당 커널에 포함시킬 수 있다. 최종적인 컨벌루션 커널은 일 수 있다.In
컨벌루션 커널은 입력 채널의 커널 슬라이스 로 구성되며, 총 개의 커널 슬라이스를 포함할 수 있다. 컨벌루션 커널은 두 부분으로 구성될 수 있다. 첫 번째 부분은 원래의 컨벌루션 커널 에서 개의 클리핑되지 않은 입력 채널의 커널 슬라이스 이고, 두 번째 부분은 새로 추가된 M개의 평균 커널 슬라이스일 수 있다.convolution kernel is the kernel slice of the input channel is composed of, It can contain multiple kernel slices. convolution kernel can be composed of two parts. The first part is the original convolutional kernel at Kernel slices of unclipped input channels , and the second part is the newly added M average kernel slices. can be
새로 추가된 M개의 평균 채널 커널 슬라이스 에는 에 포함된 원래의 인덱스 중에서 클리핑된 인덱스 p가 오름차순으로 할당될 수 있다. 전자 장치는 같은 순서로 모든 을 세트U의 에 기록할 수 있다. 클리핑 후, 세트에 기록된 원래의 인덱스q는 오름차순으로 배열될 수 있다.M newly added average channel kernel slices in Among the original indices included in , the clipped index p may be allocated in ascending order. All electronic devices in the same order Set U of can be recorded in After clipping, set The original index q written to can be arranged in ascending order.
동작(213)의 완료 후, 뉴럴 네트워크 의 다음 레이어가 컨벌루션 레이어인 경우, 동작(201)로 돌아가서 다음 레이어에 대한 전체 동작이 반복될 수 있다.After completion of
도 3은 일 실시예에 따른 뉴럴 네트워크의 클리핑 방법에서 커널 슬라이스를 추출하는 예시를 도시한 도면이다.3 is a diagram illustrating an example of extracting a kernel slice in a clipping method of a neural network according to an embodiment.
전자 장치는 1에서 C까지의 입력 채널 각각에 대응하는 커널 슬라이스의 정보 를 획득할 수 있다. 여기서, 커널 은 4차원 텐서(tensor)일 수 있고, 커널 슬라이스는 각 입력 채널에 대응하는 일 수 있다.The electronic device provides information on the kernel slice corresponding to each input channel from 1 to C. can be obtained. Here, the kernel may be a 4D tensor, and the kernel slice corresponds to each input channel. can be
도 3을 참조하면, 커널 에서 C=4, S=7이고, 각 행의 S개의 컨벌루션 필터는 하나의 입력 채널의 커널 슬라이스이다. 커널 슬라이스의 크기는 이고, 입력 채널의 커널 슬라이스는 각각 , , , 이다.Referring to Figure 3, the kernel C = 4, S = 7, and S convolutional filters in each row are kernel slices of one input channel. The size of the kernel slice is , and the kernel slice of the input channel is each , , , am.
도 4는 일 실시예에 따른 뉴럴 네트워크의 클리핑 방법에서 커널 슬라이스의 클래스를 분류하는 예시를 도시한 도면이다.4 is a diagram illustrating an example of classifying a class of a kernel slice in a clipping method of a neural network according to an embodiment.
전자 장치는 C개의 커널 슬라이스에 대한 놈(norm)을 계산할 수 있다. 전자 장치는 C개의 입력 채널의 커널 슬라이스 놈의 크기를 비교하여 유사한 놈을 가진 커널 슬라이스들을 클래스 별로 분류할 수 있다. The electronic device has C kernel slices the norm for can be calculated. The electronic device may classify kernel slices having similar norms by class by comparing sizes of kernel slice norms of C input channels.
도 4를 참조하면, 축은 입력 채널의 차원이며, 8개의 입력 채널에 대응하는 커널 슬라이스가 도시된다. a, b, c, d, e, f, g, h는 입력 채널의 커널 슬라이스의 인덱스이다. 커널 슬라이스들은 놈의 유사도에 따라 T=2개의 클래스인 과 로 나뉠 수 있다. 적어도, 에 포함된 커널 슬라이스와 에 포함된 커널 슬라이스는 유사하지 않다는 사실을 알 수 있다.Referring to FIG. 4 , an axis is a dimension of an input channel, and kernel slices corresponding to eight input channels are shown. a, b, c, d, e, f, g, h are the indices of the kernel slice of the input channel. Kernel slices are divided into T = 2 classes according to the similarity of the norm. class can be divided into At least, the kernel slice contained in It can be seen that the kernel slices contained in .
도 5는 일 실시예에 따른 뉴럴 네트워크의 클리핑 방법에서 동일한 클래스에 속한 커널 슬라이스의 유사도를 결정하는 예시를 도시한 도면이다.5 is a diagram illustrating an example of determining a degree of similarity between kernel slices belonging to the same class in a clipping method of a neural network according to an embodiment.
전자 장치는 T개의 에 대하여 각 에서 모든 입력 채널의 유사한 커널 슬라이스를 결정하고, 개의 세트를 획득할 수 있다. 도 5를 참조하면, 는 7개의 입력 채널의 인덱스를 포함하고, 인덱스는 순서대로 a, b, c, d, e, f, g일 수 있다. 전자 장치는 가장 작은 인덱스 a를 선택하여 의 관계를 계산할 수 있다. 이러한 관계는 , , , 가 서로 유사하다는 것을 의미하며, 전자 장치는 a, c, d, f를 세트에 포함시킬 수 있다. 에는 b, e, g가 남게 된다. 전자 장치는 다시 에서 가장 작은 인덱스 b를 선택하고, 및 가 서로 유사하다는 것을 결정할 수 있다. b, e는 세트에 포함되고, 에서 마지막으로 남은 g는 세트에 포함될 수 있다.Electronic devices are T against each determine similar kernel slices of all input channels in You can get a set of dogs. Referring to Figure 5, includes the indices of 7 input channels, and the indices may be a, b, c, d, e, f, g in order. The electronic device selects the smallest index a relationship can be calculated. These relationships are , , , means that are similar to each other, and the electronic device sets a, c, d, f can be included in b, e, and g remain. electronic device again choose the smallest index b from and can be determined to be similar to each other. b, e set included in The last remaining g in is set can be included in
도 6은 일 실시예에 따른 뉴럴 네트워크의 클리핑 방법에서 선택된 커널 슬라이스와 유사한 커널 슬라이스를 클리핑하는 예시를 도시한 도면이다.6 is a diagram illustrating an example of clipping a kernel slice similar to a selected kernel slice in a neural network clipping method according to an embodiment.
입력 채널의 차원에서 원래의 컨벌루션 커널 K에 대응하는 새로운 컨벌루션 커널의 원래의 인덱스는 증가할 수 있다. 첫 번째 부분의 클리핑되지 않은 원래의 커널 슬라이스의 인덱스 순서가 변경되지 않고, 두 번째 부분의 평균 커널 슬라이스에 할당되는 첫 번째 인덱스도 순서대로 증가한다는 점에서 계산은 편리해질 수 있다. A new convolutional kernel corresponding to the original convolutional kernel K in the dimension of the input channel. The original index of may be incremented. The calculation may be convenient in that the index order of the original unclipped kernel slice of the first part is not changed, and the first index allocated to the average kernel slice of the second part is also increased in order.
도 6을 참조하면, 원래의 컨벌루션 커널은 8개의 입력 채널의 커널 슬라이스를 포함할 수 있다. 두 번째 및 네 번째의 입력 채널의 커널 슬라이스는 유사하고, 여섯 번째 및 일곱 번째의 입력 채널의 커널 슬라이스는 유사할 수 있다. 전자 장치는 에 포함된 인덱스에 따라 6번째 및 7번째 입력 채널의 커널 슬라이스를 클리핑하고, 에 포함된 인덱스에 따라 2번째 및 4번째 입력 채널의 커널 슬라이스를 클리핑할 수 있다. 이런 식으로 나머지 원래의 입력 채널의 커널 슬라이스의 배열 순서는 클리핑 후의 새로운 컨벌루션 커널에서 변경되지 않는다. 이후, 전자 장치는 에 해당하는 평균 커널 슬라이스 를 클리핑된 컨벌루션 커널에 포함시키고, 에 해당하는 평균 커널 슬라이스 를 클리핑된 컨벌루션 커널에 포함시킬 수 있다. 이는 의 가장 작은 원래의 인덱스가 2이고, 의 가장 작은 원래의 인덱스가 6이기 때문이다. Referring to FIG. 6 , the original convolutional kernel may include kernel slices of 8 input channels. The kernel slices of the second and fourth input channels may be similar, and the kernel slices of the sixth and seventh input channels may be similar. the electronic device clip the kernel slices of the 6th and 7th input channels according to the index contained in Kernel slices of the second and fourth input channels may be clipped according to the index included in . In this way, the arrangement order of the kernel slices of the remaining original input channels is not changed in the new convolutional kernel after clipping. After that, the electronic device average kernel slice corresponding to in the clipped convolution kernel, average kernel slice corresponding to can be included in the clipped convolution kernel. this is The smallest original index of is 2, This is because the smallest original index of .
후속 단계의 계산을 더욱 용이하게 하기 위해, 새로운 컨벌루션 커널과 관련된 원래의 입력 채널의 커널 슬라이스의 인덱스를 기록하기 위한 추가적인 참조 구조가 필요할 수 있다. 첫 번째 부분의 클리핑되지 않은 원래의 커널 슬라이스의 경우, 원래의 인덱스는 순서대로 세트 에 기록되고, 두 번째 부분의 평균 커널 슬라이스의 경우, 원래의 인덱스를 포함하는 은 가장 작은 원래의 인덱스의 순서대로 세트U에 기록될 수 있다. 도 6을 참조하면, 이고, 이다.To further facilitate the computation of subsequent steps, an additional reference structure may be needed to record the index of the kernel slice of the original input channel associated with the new convolutional kernel. For the original unclipped kernel slice of the first part, the original indices are set in order. is written to, and for the average kernel slice of the second part, containing the original index may be written to the set U in the order of the smallest original index. Referring to Figure 6, ego, am.
도 7은 일 실시예에 따른 뉴럴 네트워크의 계산 방법의 동작을 도시한 흐름도이다.7 is a flowchart illustrating an operation of a method for calculating a neural network according to an embodiment.
일 실시예에 따르면, 동작(701)에서, 전자 장치는 뉴럴 네트워크에 포함된 컨벌루션 레이어의 인덱스 정보를 기초로 각 입력 채널의 커널 슬라이스가 대체 슬라이스인지 판단할 수 있다. 일 실시예에 따르면, 동작(703)에서, 전자 장치는 커널 슬라이스가 대체 슬라이스인 경우 인덱스 정보 중에서 대체 슬라이스의 인덱스를 획득할 수 있다. 일 실시예에 따르면, 동작(705)에서, 전자 장치는 대체 슬라이스의 인덱스를 기초로 컨벌루션을 계산할 수 있다. 여기서, 컨벌루션 레이어의 컨벌루션 매개 변수에 기초하여 선택된 커널 슬라이스와 유사한 커널 슬라이스는 클리핑되고 대체 슬라이스로 대체된 것일 수 있다. According to an embodiment, in
커널 슬라이스가 대체 슬라이스인 경우, 전자 장치는 대체 슬라이스에 할당된 클리핑된 커널 슬라이스의 인덱스를 결정할 수 있다. 전자 장치는 결정된 인덱스에 대응하는 대체 슬라이스에 대해 컨벌루션 연산을 수행할 수 있다. 커널 슬라이스가 대체 슬라이스가 아닌 경우, 전자 장치는 원래의 커널 슬라이스의 인덱스를 이용하여 해당 커널 슬라이스에 대한 컨벌루션 연산을 수행할 수 있다. When the kernel slice is the replacement slice, the electronic device may determine the index of the clipped kernel slice allocated to the replacement slice. The electronic device may perform a convolution operation on the replacement slice corresponding to the determined index. When the kernel slice is not the replacement slice, the electronic device may perform a convolution operation on the corresponding kernel slice by using the index of the original kernel slice.
일 실시예에 따르면, 전자 장치는 일 실시예에 따른 뉴럴 네트워크의 계산 방법을 이용하여 이미지 또는 음성의 인식을 수행할 수 있다. 도 1에 의해 클리핑된 컨벌루션 뉴럴 네트워크는 이미지 또는 음성의 인식을 위해 사용될 수 있다. According to an embodiment, the electronic device may perform image or voice recognition using the neural network calculation method according to the embodiment. The convolutional neural network clipped by FIG. 1 may be used for image or voice recognition.
전자 장치는 사용자 입력을 통해 이미지 또는 음성을 수신할 수 있다. 예를 들어, 이미지의 형식에는 제한이 없으며 이미지는 일 수 있다. 여기서 C, W 및 H는 각각 이미지의 채널 수, 이미지의 너비 및 이미지의 높이를 나타낸다. 는 C개 채널의 WХH 크기의 특징 다이어그램을 포함할 수 있다.The electronic device may receive an image or a voice through a user input. For example, there are no restrictions on the format of an image, can be where C, W, and H represent the number of channels in the image, the width of the image, and the height of the image, respectively. may include a feature diagram of the size of WХH of C channels.
전자 장치는 수신된 이미지 또는 음성을 컨벌루션 뉴럴 네트워크의 제1 컨벌루션 레이어에 입력할 수 있다. 예를 들어, 전자 장치는 수신된 이미지를 클리핑된 뉴럴 네트워크의 제1 컨벌루션 레이어에 입력할 수 있다. 이미지 인식에 사용되는 뉴럴 네트워크는 학습 데이터에 의해 미리 학습되고 클리핑될 수 있다.The electronic device may input the received image or voice to the first convolutional layer of the convolutional neural network. For example, the electronic device may display a received image may be input to the first convolutional layer of the clipped neural network. A neural network used for image recognition may be pre-trained and clipped by training data.
전자 장치는 뉴럴 네트워크의 제1 컨벌루션 레이어부터 시작하여 뉴럴 네트워크의 각 컨벌루션 레이어를 차례대로 트래버스할 수 있다. 전자 장치는 각 입력 채널의 커널 슬라이스에 대해 커널 슬라이스의 인덱스에 따라 입력 채널의 커널 슬라이스가 대체 슬라이스인지 여부를 결정할 수 있다. The electronic device may sequentially traverse each convolutional layer of the neural network, starting with the first convolutional layer of the neural network. For the kernel slice of each input channel, the electronic device may determine whether the kernel slice of the input channel is the replacement slice according to the index of the kernel slice.
입력 채널의 커널 슬라이스가 대체 슬라이스인 경우, 전자 장치는 입력 채널의 커널 슬라이스로 대체된 입력 채널의 클리핑된 커널 슬라이스의 인덱스를 획득하고, 인덱스에 기초하여 컨벌루션 계산을 수행할 수 있다.When the kernel slice of the input channel is the replacement slice, the electronic device may obtain an index of the clipped kernel slice of the input channel replaced with the kernel slice of the input channel, and perform a convolution calculation based on the index.
전자 장치는 대체 슬라이스를 나타내는 인덱스를 기초로 대체 슬라이스를 결정하고, 결정된 커널 슬라이스(즉, 대체 슬라이스)에 대해 합계 계산을 수행하고, 합계 계산의 결과와 커널 슬라이스에 대해 컨벌루션 연산을 수행하여, 클리핑된 뉴럴 네트워크에서 컨벌루션 연산을 수행할 수 있다.The electronic device determines a replacement slice based on an index indicating the replacement slice, performs a sum calculation on the determined kernel slice (ie, a replacement slice), and performs a convolution operation on the result of the sum calculation and the kernel slice, so that clipping Convolutional operation can be performed on a neural network.
입력 채널의 커널 슬라이스가 대체 슬라이스가 아닌 경우, 전자 장치는 컨벌루션 입력 채널의 인덱스에 대응하는 커널 슬라이스를 결정하고, 결정된 커널 슬라이스에 대해 컨벌루션 계산을 수행할 수 있다.When the kernel slice of the input channel is not the replacement slice, the electronic device may determine a kernel slice corresponding to the index of the convolutional input channel and perform a convolution calculation on the determined kernel slice.
전자 장치는 컨벌루션 레이어의 모든 입력 채널의 커널 슬라이스의 컨벌루션 계산 결과의 누적 값을 컨벌루션 레이어의 출력 결과로서 출력할 수 있다. 전자 장치는 뉴럴 네트워크의 마지막 컨벌루션 레이어의 출력 결과를 이미지 또는 음성의 인식 결과로서 출력할 수 있다. The electronic device may output an accumulated value of a convolution calculation result of kernel slices of all input channels of the convolutional layer as an output result of the convolutional layer. The electronic device may output an output result of the last convolutional layer of the neural network as an image or voice recognition result.
전자 장치는 클리핑된 뉴럴 네트워크를 이용하여 컨벌루션 연산을 수행함으로써 이미지 또는 음성 인식에 사용되는 뉴럴 네트워크 및 계산의 복잡도를 완화하고, 뉴럴 네트워크의 저장 공간을 줄이며, 뉴럴 네트워크의 운영 환경에 대한 요건을 완화할 수 있다. The electronic device performs a convolution operation using the clipped neural network, thereby reducing the complexity of neural networks and computations used for image or speech recognition, reducing the storage space of the neural network, and easing the requirements for the operating environment of the neural network. can do.
예를 들어, 전자 장치는 클리핑된 컨벌루션 커널 의 입력 채널의 커널 슬라이스 를 순서대로 트래버스할 수 있다. 일 경우, 해당 입력 채널의 커널 슬라이스가 원래의 컨벌루션 커널 에 해당한다는 것을 의미할 수 있다. 원래의 컨벌루션 커널에서의 인덱스는 , 즉 세트의 s 번째 요소이므로, 전자 장치는 입력 채널의 번째 커널 슬라이스 및 에 대해 일반적인 컨벌루션 연산을 수행하여 해당 회차의 출력을 획득할 수 있다. 일 경우, 해당 입력 채널의 커널 슬라이스는 M개의 평균 커널 슬라이스 에서 번째임을 의미할 수 있다. 전자 장치는 번째 요소 을 읽고, 다시 에서 모든 원래의 커널 슬라이스의 인덱스를 읽을 수 있다. 전자 장치는 입력 채널의 모든 p번째 커널 슬라이스 와 합한 후 와 일반적인 컨벌루션을 수행하여 해당 회차의 출력을 획득할 수 있다. 모든 을 더하여 획득한 출력은 원래의 컨벌루션 출력과 기본적으로 동일하며, 일 수 있다.For example, the electronic device may have a clipped convolutional kernel Kernel slice of the input channel of can be traversed in order. , the kernel slice of the corresponding input channel is the original convolutional kernel. may mean that it corresponds to The index in the original convolutional kernel is , i.e. set Since the s-th element of the electronic device is the input channel's second kernel slice and Perform a general convolution operation on can be obtained. , the kernel slice of the corresponding input channel is M average kernel slices. at It could mean the second. the electronic device second element read it again indices of all original kernel slices in can read The electronic device slices every pth kernel of the input channel. after combining with Perform a general convolution with the output of the round can be obtained. every The output obtained by adding is the original convolutional output is basically the same as can be
도 8은 일반적인 컨벌루션 연산의 예시를 도시한 도면이다.8 is a diagram illustrating an example of a general convolution operation.
일반적인 컨벌루션 연산의 경우, 매번 모든 입력 특징 다이어그램을 연산에 참여시킴으로써 하나의 출력 특징 다이어그램을 얻고 마지막으로 모든 출력 특징 다이어그램을 합치는 과정을 포함할 수 있다. 일 실시예에 따른 컨벌루션 연산의 경우, 매번 하나의 입력 특징 다이어그램만 계산에 참여시킴으로써 모든 출력 특징 다이어그램을 얻지만, 이러한 출력 특징 다이어그램의 정보는 완전하지 않으며, 모든 입력 특징 다이어그램을 트래버스한 후에 각각의 출력 특징 다이어그램을 중첩시키는 과정을 포함할 수 있다. In the case of a general convolution operation, it may include the process of getting one output feature diagram by participating in the operation every time all the input feature diagrams and finally merging all the output feature diagrams. In the case of the convolution operation according to an embodiment, all output feature diagrams are obtained by participating in the calculation of only one input feature diagram each time, but the information of these output feature diagrams is not complete, and after traversing all input feature diagrams, each It may include the process of superimposing the output feature diagram.
일반적인 컨벌루션 연산의 경우, 모든 입력 특징 다이어그램과 이에 대응하는 입력 채널의 커널 슬라이스의 일부에 대해 먼저 컨벌루션 연산이 수행된 후에 그 결과들이 합산되어 출력 특징 다이어그램이 획득될 수 있다. 도8을 참조하면, 컨벌루션을 통해 8 개의 입력 특징 다이어그램은 12개의 출력 특징 다이어그램으로 변환될 수 있다. 도8의 컨벌루션 커널의 빗금친 부분 및 이에 대응하는 입력 채널의 인덱스와 동일한 입력 특징 다이어그램에 대해 각각 일반적인 컨벌루션이 수행되고, 그 결과들은 서로 합산되고, 도8의 빗금친 부분의 제6 출력 특징 다이어그램이 획득될 수 있다. In the case of a general convolution operation, a convolution operation is first performed on all input feature diagrams and a portion of a kernel slice of an input channel corresponding thereto, and then the results are summed to obtain an output feature diagram. Referring to FIG. 8 , 8 input feature diagrams may be converted into 12 output feature diagrams through convolution. A general convolution is respectively performed on the hatched portion of the convolution kernel of FIG. 8 and the input feature diagram that is the same as the index of the corresponding input channel, the results are summed, and the sixth output feature diagram of the hatched portion of FIG. this can be obtained.
한편, 일 실시예에 따르면, 전자 장치는 와 같은 하나의 입력 특징 다이어그램을 차례대로 동일한 입력 채널의 인덱스의 의 12개 부분과 각각 컨벌루션함으로써 12개의 출력 특징 다이어그램을 포함하는 텐서, 즉, 를 획득할 수 있다. 이후에, 전자 장치는 모든 입력 특징 다이어그램을 트래버스 한 후, 12개의 출력 특징 다이어그램을 포함하는 8개의 출력 텐서를 획득할 수 있으며, 출력 텐서는 각각 , , , 이다. 마지막으로, 전자 장치는 8개의 출력 텐서를 합하여, 일반적인 컨벌루션 연산과 동일한 출력, 즉 를 얻을 수 있다. Meanwhile, according to an embodiment, the electronic device One input feature diagram such as A tensor containing 12 output feature diagrams by convolving each with 12 parts of , In other words, can be obtained. Thereafter, after traversing all input feature diagrams, the electronic device may obtain 8 output tensors including 12 output feature diagrams, and the output tensors are each , , , am. Finally, the electronic device sums the eight output tensors, resulting in the same output as a normal convolution operation, i.e. can get
도 9는 일 실시예에 따른 뉴럴 네트워크의 계산 방법에서 컨벌루션 계산의 예시를 도시한 도면이다.9 is a diagram illustrating an example of a convolution calculation in a method of calculating a neural network according to an embodiment.
도9의 컨벌루션 커널의 클리핑 결과는 도8과 동일하며, , , , 이다. 클리핑된 컨벌루션 커널의 입력 채널의 커널 슬라이스는 차례대로 트래버스될 수 있다. 커널 슬라이스 는 원래의 컨벌루션 커널에 속하며 원래의 인덱스는 이므로, 커널 슬라이스와 에 대한 컨벌루션 연산이 수행되면 가 획득될 수 있다. 커널 슬라이스 는 원래의 컨벌루션 커널에 속하며 원래의 인덱스는 이므로, 커널 슬라이스와 에 대한 컨벌루션 연산이 수행되면 가 획득될 수 있다. 커널 슬라이스 는 원래의 컨벌루션 커널에 속하며 원래의 인덱스는 이므로, 커널 슬라이스와 에 대하여 컨벌루션 연산이 수행되면 가 획득될 수 있다. 커널 슬라이스 는 원래의 컨벌루션 커널에 속하며 원래의 인덱스 값은 이므로, 커널 슬라이스와 에 대해 컨벌루션 연산이 수행되면 가 획득될 수 있다. 커널 슬라이스 는 2개의 평균 커널 슬라이스 중 첫 번째에서 유래하고, 전자 장치는 U에서 첫 번째 요소 를 읽은 다음 에서 원래의 인덱스를 획득할 수 있다. 전자 장치는 커널 슬라이스와 및 에 대해 컨벌루션 연산을 수행하여 를 획득할 수 있다. 커널 슬라이스 는 2개의 평균 커널 슬라이스 중 두 번째에서 유래하고, 전자 장치는 U에서 두 번째 요소를 읽은 다음 에서 원래의 인덱스 를 획득할 수 있다. 전자 장치는 커널 슬라이스와 및 에 대해 컨벌루션 연산을 수행하여 를 획득할 수 있다. 전자 장치는 을 획득할 수 있으며, 근사값을 획득하는 이유는 평균 커널 슬라이스가 클리핑된 원래의 입력 채널의 커널 슬라이스를 대체하기 때문이다. 및 은 각각 두 개의 입력 특징 다이어그램과 관련된다. 전자 장치는 입력 특징 다이어그램의 합을 먼저 계산한 다음 컨벌루션을 수행함으로써 컨벌루션 연산의 회수를 줄이고 계산의 효율성을 높일 수 있다.The clipping result of the convolution kernel of FIG. 9 is the same as that of FIG. , , , am. Clipped Convolution Kernel Kernel slices of the input channel of can be traversed in turn. Kernel Slice belongs to the original convolutional kernel, and the original index is So, the kernel slice and When a convolution operation is performed on can be obtained. Kernel Slice belongs to the original convolutional kernel, and the original index is So, the kernel slice and When a convolution operation is performed on can be obtained. Kernel Slice belongs to the original convolutional kernel, and the original index is So, the kernel slice and When a convolution operation is performed on can be obtained. Kernel Slice belongs to the original convolutional kernel, and the original index value is So, the kernel slice and When a convolution operation is performed on can be obtained. Kernel Slice is from the first of the two average kernel slices, and the electronic device is the first element in U. then read original index in can be obtained. The electronics consist of a kernel slice and and By performing a convolution operation on can be obtained. Kernel Slice is from the second of the two average kernel slices, and the electronic device is the second element in U. then read original index in can be obtained. The electronics consist of a kernel slice and and By performing a convolution operation on can be obtained. the electronic device can be obtained, and the reason for obtaining an approximation is that the average kernel slice replaces the kernel slice of the original clipped input channel. and are each associated with two input feature diagrams. The electronic device may reduce the number of convolution operations and increase computational efficiency by first calculating the sum of the input feature diagrams and then performing convolution.
도 10은 일 실시예에 따른 전자 장치의 구성을 도시한 도면이다.10 is a diagram illustrating a configuration of an electronic device according to an exemplary embodiment.
일 실시예에 따르면, 전자 장치(1000)는 적어도 하나의 프로세서(1001)를 포함할 수 있다. 전자 장치(1000)는 메모리(1003)를 더 포함할 수 있다. 메모리(1003)는 뉴럴 네트워크 및 뉴럴 네트워크의 운영에 필요한 데이터를 저장할 수 있다. 메모리(1003)는 뉴럴 네트워크에 입력될 입력 데이터 및 출력되는 출력 데이터를 저장할 수 있다.According to an embodiment, the
프로세서(1001)는 뉴럴 네트워크에 포함된 컨벌루션 레이어의 컨벌루션 매개 변수에 기초하여 컨벌루션 레이어의 입력 채널의 커널 슬라이스(kernel slice)를 선택할 수 있다. 컨벌루션 매개 변수는 컨벌루션 레이어의 입력 채널의 수, 출력 채널의 수, 컨벌루션 커널의 필터의 폭, 컨벌루션 커널의 필터의 높이를 포함할 수 있다.The
프로세서(1001)는 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정할 수 있다. 프로세서(1001)는 하나 이상의 유사한 커널 슬라이스를 기초로 선택된 커널 슬라이스를 대체하는 대체 슬라이스를 결정할 수 있다. 프로세서(1001)는 선택된 커널 슬라이스를 클리핑하고 대체 슬라이스로 클리핑된 커널 슬라이스를 대체할 수 있다.The
일 실시예에 따르면, 전자 장치는 컨벌루션 레이어 트래버스 유닛, 슬라이스 획득 유닛, 유사 슬라이스 결정 유닛, 대체 슬라이스 결정 유닛 및 유사 슬라이스 클리핑 유닛을 포함할 수 있다. 컨벌루션 레이어 트래버스 유닛, 슬라이스 획득 유닛, 유사 슬라이스 결정 유닛, 대체 슬라이스 결정 유닛 및 유사 슬라이스 클리핑 유닛은 하나 이상의 프로세서(1001)로 구현되거나, 소프트웨어로 구현되어 메모리(1003)에 저장될 수 있다.According to an embodiment, the electronic device may include a convolutional layer traverse unit, a slice obtaining unit, a similar slice determining unit, a replacement slice determining unit, and a similar slice clipping unit. The convolutional layer traverse unit, slice obtaining unit, similar slice determining unit, replacement slice determining unit, and similar slice clipping unit may be implemented with one or
컨벌루션 레이어 트래버스 유닛은 뉴럴 네트워크의 각 컨벌루션 레이어를 트래버스하도록 구성될 수 있다. 슬라이스 획득 유닛은 컨벌루션 레이어의 컨벌루션 매개 변수에 기초하여 입력 채널의 커널 슬라이스를 획득하도록 구성될 수 있다.The convolutional layer traverse unit may be configured to traverse each convolutional layer of the neural network. The slice acquiring unit may be configured to acquire the kernel slice of the input channel based on the convolution parameter of the convolutional layer.
슬라이스 획득 유닛은 컨벌루션 커널의 입력 채널의 수에 따라 입력 채널의 커널 슬라이스의 수량을 결정하도록 구성될 수 있다. 슬라이스 획득 유닛은 입력 채널의 결정된 커널 슬라이스의 수에 따라 컨벌루션 매개 변수에 기초하여 컨벌루션을 나타내는 텐서(tensor)에서 입력 채널의 커널 슬라이스를 추출하도록 구성될 수 있다. The slice obtaining unit may be configured to determine the quantity of kernel slices of the input channel according to the number of input channels of the convolutional kernel. The slice obtaining unit may be configured to extract the kernel slice of the input channel from a tensor representing the convolution based on the convolution parameter according to the determined number of kernel slices of the input channel.
유사 슬라이스 결정 유닛은 입력 채널의 커널 슬라이스에서 입력 채널의 선택된 커널 슬라이스와 유사한 커널 슬라이스를 결정하도록 구성될 수 있다.The similar slice determining unit may be configured to determine, in a kernel slice of the input channel, a kernel slice similar to the selected kernel slice of the input channel.
유사 슬라이스 결정 유닛은 각 입력 채널의 커널 슬라이스의 놈을 계산하고, 놈에 따라 입력 채널의 커널 슬라이스 중에서 선택된 커널 슬라이스와 유사한 커널 슬라이스를 결정하도록 구성될 수 있다.The similar slice determining unit may be configured to calculate a norm of a kernel slice of each input channel, and determine a kernel slice similar to the selected kernel slice from among kernel slices of the input channel according to the norm.
대체 슬라이스 결정 유닛은 입력 채널의 유사한 커널 슬라이스에 기초하여 입력 채널의 선택된 커널 슬라이스와 유사한 커널 슬라이스를 대체하는 대체 슬라이스를 결정하도록 구성될 수 있다.The replacement slice determining unit may be configured to determine, based on the similar kernel slice of the input channel, a replacement slice for replacing a kernel slice similar to the selected kernel slice of the input channel.
대체 슬라이스 결정 유닛은 입력 채널의 유사한 커널 슬라이스의 평균 커널 슬라이스를 계산하고, 평균 커널 슬라이스를 대체 슬라이스로 결정하도록 구성될 수 있다. 대체 슬라이스 결정 유닛은 입력 채널의 유사한 커널 슬라이스 중 하나를 대체 슬라이스로 결정하도록 구성될 수 있다.The replacement slice determining unit may be configured to calculate an average kernel slice of a similar kernel slice of the input channel, and determine the average kernel slice as the replacement slice. The replacement slice determining unit may be configured to determine one of the similar kernel slices of the input channel as the replacement slice.
대체 슬라이스 결정 유닛은 놈의 유사도에 따라 입력 채널의 커널 슬라이스를 분류하고, 분류 결과의 각 클래스를 트래버스하고, 각 입력 채널의 커널 슬라이스 간의 유사도를 계산하고, 유사도에 따라 입력 채널의 유사한 커널 슬라이스를 결정하도록 구성될 수 있다.The replacement slice determining unit classifies the kernel slice of the input channel according to the similarity of the norm, traverses each class of the classification result, calculates the similarity between the kernel slices of each input channel, and selects the similar kernel slice of the input channel according to the similarity. can be configured to determine.
대체 슬라이스 결정 유닛은 각 입력 채널의 커널 슬라이스 간의 차이의 놈을 계산하여 각 입력 채널의 커널 슬라이스 간의 유사도를 획득하고, 유사도가 임계값 범위 내에 있는 입력 채널의 커널 슬라이스를 입력 채널의 유사한 커널 슬라이스로 결정하도록 구성될 수 있다.The replacement slice determining unit calculates the norm of the difference between the kernel slices of each input channel to obtain a similarity between the kernel slices of each input channel, and converts the kernel slice of the input channel whose similarity is within a threshold range to the similar kernel slice of the input channel. can be configured to determine.
유사 슬라이스 클리핑 유닛은 대체 슬라이스로 입력 채널의 클리핑된 커널 슬라이스를 대체하기 위해, 입력 채널의 유사한 커널 슬라이스를 클리핑하도록 구성될 수 있다.The similar slice clipping unit may be configured to clip the similar kernel slice of the input channel to replace the clipped kernel slice of the input channel with the replacement slice.
전자 장치는 인덱스 기록 유닛을 더 포함할 수 있다. 인덱스 기록 유닛은 대체 슬라이스가 대체한 입력 채널의 클리핑된 커널 슬라이스의 인덱스를 기록하도록 구성될 수 있다. 이러한 방식으로, 전자 장치는 각 입력 채널의 클리핑된 커널 슬라이스를 인덱스로 기록할 수 있다.The electronic device may further include an index recording unit. The index recording unit may be configured to record the index of the clipped kernel slice of the input channel replaced by the replacement slice. In this way, the electronic device may record the clipped kernel slice of each input channel as an index.
다른 실시예에 따르면, 전자 장치는 컨벌루션 레이어 트래버스 유닛, 대체 슬라이스 판단 유닛 및 컨벌루션 계산 유닛을 포함할 수 있다.According to another embodiment, the electronic device may include a convolutional layer traverse unit, a replacement slice determining unit, and a convolutional calculation unit.
컨벌루션 레이어 트래버스 유닛은 뉴럴 네트워크의 각 컨벌루션 레이어를 트래버스하도록 구성될 수 있다.The convolutional layer traverse unit may be configured to traverse each convolutional layer of the neural network.
대체 슬라이스 판단 유닛은 컨벌루션 레이어의 각 입력 채널의 커널 슬라이스에 대해, 입력 채널의 커널 슬라이스의 인덱스에 따라 입력 채널의 커널 슬라이스가 대체 슬라이스인지 판단할 수 있다.The replacement slice determining unit may determine, for the kernel slice of each input channel of the convolutional layer, whether the kernel slice of the input channel is the replacement slice according to an index of the kernel slice of the input channel.
입력 채널의 커널 슬라이스가 대체 슬라이스인 경우, 컨벌루션 계산 유닛은 입력 채널의 대체 슬라이스로 대체된 입력 채널의 클리핑된 커널 슬라이스의 인덱스를 획득하고, 대체 슬라이스로 대체된 클리핑된 커널 슬라이스의 인덱스에 기초하여 컨벌루션 연산을 수행하도록 구성될 수 있다.When the kernel slice of the input channel is the replacement slice, the convolution calculation unit obtains the index of the clipped kernel slice of the input channel replaced with the replacement slice of the input channel, and based on the index of the clipped kernel slice replaced with the replacement slice It may be configured to perform a convolution operation.
컨벌루션 계산 유닛은 대체 슬라이스로 대체된 컨벌루션 레이어의 입력 채널의 커널 슬라이스의 인덱스에 대응하는 커널 슬라이스를 결정하고, 결정된 커널 슬라이스에 대해 합계 계산을 수행하고, 합계 계산의 결과와 커널 슬라이스에 대해 컨벌루션 계산을 수행하도록 구성될 수 있다.The convolution calculation unit determines a kernel slice corresponding to an index of a kernel slice of the input channel of the convolutional layer replaced by the replacement slice, performs sum calculation on the determined kernel slice, and performs convolution calculation on the result of the sum calculation and the kernel slice may be configured to perform
입력 채널의 커널 슬라이스가 대체 슬라이스가 아닌 경우, 컨벌루션 계산 유닛은 입력 채널의 원래의 커널 슬라이스의 인덱스에 대응하는 커널 슬라이스를 결정하고, 결정된 커널 슬라이스의 인덱스에 대응하는 커널 슬라이스에 대해 컨벌루션 계산을 수행하도록 구성될 수 있다.If the kernel slice of the input channel is not the replacement slice, the convolution calculation unit determines a kernel slice corresponding to the index of the original kernel slice of the input channel, and performs convolution calculation on the kernel slice corresponding to the index of the determined kernel slice can be configured to
다른 실시예에 따르면, 전자 장치는 수신 유닛, 입력 결정 유닛, 컨벌루션 레이어 트래버스 유닛, 컨벌루션 출력 결정 유닛 및 결과 출력 유닛을 포함할 수 있다.According to another embodiment, the electronic device may include a receiving unit, an input determining unit, a convolutional layer traverse unit, a convolutional output determining unit, and a result output unit.
수신 유닛은 사용자 입력의 이미지 및/또는 음성을 수신하도록 구성될 수 있다.The receiving unit may be configured to receive an image and/or voice of a user input.
입력 결정 유닛은 수신된 이미지 또는 음성을 뉴럴 네트워크의 제1 컨벌루션 레이어의 입력으로 사용하도록 구성될 수 있다.The input determining unit may be configured to use the received image or voice as an input of a first convolutional layer of the neural network.
컨벌루션 레이어 트래버스 유닛은 뉴럴 네트워크의 각 컨벌루션 레이어를 트래버스하도록 구성될 수 있다.The convolutional layer traverse unit may be configured to traverse each convolutional layer of the neural network.
컨벌루션 레이어의 각 입력 채널의 커널 슬라이스에 대해, 컨벌루션 출력 결정 유닛은 입력 채널의 커널 슬라이스의 인덱스에 따라 입력 채널의 커널 슬라이스가 대체 슬라이스인지 여부를 결정하도록 구성될 수 있다. For a kernel slice of each input channel of the convolutional layer, the convolutional output determining unit may be configured to determine whether the kernel slice of the input channel is a replacement slice according to an index of the kernel slice of the input channel.
입력 채널의 커널 슬라이스가 대체 슬라이스인 경우, 컨벌루션 출력 결정 유닛은 대체 슬라이스로 대체된 클리핑된 커널 슬라이스의 인덱스를 획득하고, 인덱스를 기반으로 컨벌루션 연산을 수행하고, 모든 입력 채널의 커널 슬라이스의 컨벌루션 연산의 결과의 누적 값을 컨벌루션 레이어의 컨벌루션 연산의 출력 결과로 출력하도록 구성될 수 있다.When the kernel slices of the input channels are replacement slices, the convolutional output determining unit obtains the indexes of the clipped kernel slices replaced with the replacement slices, performs a convolution operation based on the indexes, and performs convolution operation of the kernel slices of all input channels. It may be configured to output an accumulated value of a result of α as an output result of a convolution operation of the convolution layer.
컨벌루션 출력 결정 유닛은 대체 슬라이스로 대체된 입력 채널의 클리핑된 커널 슬라이스의 인덱스에 대응하는 커널 슬라이스를 결정하고, 결정된 커널 슬라이스로 대체된 클리핑된 커널 슬라이스의 인덱스에 대응하는 커널 슬라이스에 대해 합계 계산을 수행하고, 합계 계산의 결과와 커널 슬라이스에 대해 컨벌루션 연산을 수행하여, 컨벌루션 연산이 클리핑된 뉴럴 네트워크에서 구현되도록 구성될 수 있다.The convolutional output determining unit determines a kernel slice corresponding to the index of the clipped kernel slice of the input channel replaced with the replacement slice, and performs sum calculation for the kernel slice corresponding to the index of the clipped kernel slice replaced with the determined kernel slice. and perform a convolution operation on the result of the sum calculation and the kernel slice, so that the convolution operation is implemented in a clipped neural network.
입력 채널의 커널 슬라이스가 대체 슬라이스가 아닌 경우, 컨벌루션 출력 결정 유닛은 입력 채널의 원래의 커널 슬라이스의 인덱스에 대응하는 커널 슬라이스를 결정하고, 결정된 커널 슬라이스의 인덱스에 대응하는 커널 슬라이스 및 입력 채널의 커널 슬라이스에 대해 컨벌루션 계산을 수행하도록 구성될 수 있다.If the kernel slice of the input channel is not the replacement slice, the convolutional output determining unit determines a kernel slice corresponding to the index of the original kernel slice of the input channel, the kernel slice corresponding to the index of the determined kernel slice and the kernel of the input channel It may be configured to perform convolutional computations on slices.
결과 출력 유닛은 뉴럴 네트워크의 마지막 컨벌루션 레이어의 출력을 이미지 인식 결과 또는 음성 인식 결과로 취하도록 구성될 수 있다.The result output unit may be configured to take the output of the last convolutional layer of the neural network as an image recognition result or a speech recognition result.
이상에서 설명된 실시예들은 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치, 방법 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, 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 by a hardware component, a software component, and/or a combination of a hardware component and a software component. For example, the apparatus, methods and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate (FPGA) array), a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions, may be implemented using a general purpose computer or special purpose computer. The processing device may execute an operating system (OS) and a software application 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 convenience of understanding, although one processing device is sometimes described as being used, one of ordinary skill in the art will recognize that the processing device includes a plurality of processing elements and/or a plurality of types of processing elements. It can be seen that can include For example, the processing device may include a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as parallel processors.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.The software may comprise a computer program, code, instructions, or a combination of one or more thereof, which configures a processing device to operate as desired or is independently or collectively processed You can command the device. The software and/or data may be any kind of machine, component, physical device, virtual equipment, computer storage medium or device, to be interpreted by or to provide instructions or data to the processing device. , or may be permanently or temporarily embody in a transmitted signal wave. The software may be distributed over networked computer systems, and stored or executed in a distributed manner. Software and data may be stored in a computer-readable recording medium.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 저장할 수 있으며 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded in a computer-readable medium. The computer readable medium may store program instructions, data files, data structures, etc. alone or in combination, and the program instructions recorded on the medium may be specially designed and configured for the embodiment, or may be known and available to those skilled in the art of computer software. have. Examples of the computer readable recording medium include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floppy disks. - includes magneto-optical media, and hardware devices specially configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes 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 a plurality of software modules to perform the operations of the embodiments, and vice versa.
이상과 같이 실시예들이 비록 한정된 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 이를 기초로 다양한 기술적 수정 및 변형을 적용할 수 있다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with reference to the limited drawings, a person skilled in the art may apply various technical modifications and variations based thereon. For example, the described techniques are performed in a different order than the described method, and/or the described components of the system, structure, apparatus, circuit, etc. are combined or combined in a different form than the described method, or other components Or substituted or substituted by equivalents may achieve an appropriate result.
그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are also within the scope of the following claims.
Claims (10)
상기 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정하는 동작;
하나 이상의 상기 유사한 커널 슬라이스를 기초로 상기 선택된 커널 슬라이스를 대체하는 대체 슬라이스를 결정하는 동작; 및
상기 선택된 커널 슬라이스를 클리핑하고 상기 대체 슬라이스로 상기 클리핑된 커널 슬라이스를 대체하는 동작을 포함하고,
상기 컨벌루션 매개 변수는 상기 컨벌루션 레이어의 상기 입력 채널의 수, 출력 채널의 수, 컨벌루션 커널의 필터의 폭, 컨벌루션 커널의 필터의 높이를 포함하는,
뉴럴 네트워크의 클리핑 방법.selecting a kernel slice of an input channel of the convolutional layer based on a convolution parameter of the convolutional layer included in the neural network;
determining one or more kernel slices similar to the selected kernel slice;
determining a replacement slice to replace the selected kernel slice based on one or more of the similar kernel slices; and
clipping the selected kernel slice and replacing the clipped kernel slice with the replacement slice;
The convolution parameters include the number of input channels of the convolutional layer, the number of output channels, the width of the filter of the convolutional kernel, the height of the filter of the convolutional kernel,
Neural network clipping method.
상기 클리핑된 커널 슬라이스의 인덱스를 저장하는 동작을 더 포함하는,
뉴럴 네트워크의 클리핑 방법.According to claim 1,
Further comprising the operation of storing the index of the clipped kernel slice,
Neural network clipping method.
상기 유사한 하나 이상의 커널 슬라이스를 결정하는 동작은,
상기 컨벌루션 레이어의 각 입력 채널의 커널 슬라이스의 놈(norm)을 계산하는 동작; 및
상기 각 입력 채널의 커널 슬라이스의 놈을 기초로 상기 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정하는 동작을 포함하는,
뉴럴 네트워크의 클리핑 방법.According to claim 1,
The operation of determining the similar one or more kernel slices comprises:
calculating a norm of a kernel slice of each input channel of the convolutional layer; and
determining one or more kernel slices similar to the selected kernel slice based on the norm of the kernel slice of each input channel;
Neural network clipping method.
상기 놈을 기초로 상기 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정하는 동작은,
상기 각 입력 채널의 커널 슬라이스의 놈을 기초로 상기 각 입력 채널의 커널 슬라이스를 하나 이상의 클래스로 분류하는 단계; 및
상기 선택된 커널 슬라이스가 속한 클래스로 분류된 하나 이상의 커널 슬라이스 간의 유사도를 기초로 상기 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정하는 동작을 포함하는,
뉴럴 네트워크의 클리핑 방법.4. The method of claim 3,
The operation of determining one or more kernel slices similar to the selected kernel slice based on the norm comprises:
classifying the kernel slice of each input channel into one or more classes based on the norm of the kernel slice of each input channel; and
determining one or more kernel slices similar to the selected kernel slice based on a similarity between one or more kernel slices classified into a class to which the selected kernel slice belongs,
Neural network clipping method.
상기 유사도를 기초로 상기 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정하는 동작은,
상기 선택된 커널 슬라이스가 속한 클래스로 분류된 각각의 커널 슬라이스와 상기 선택된 커널 슬라이스 간의 차이의 놈을 계산함으로써 유사도를 결정하는 동작; 및
상기 유사도가 임계값 이하인 커널 슬라이스를 상기 선택된 커널 슬라이스와 유사한 커널 슬라이스로 결정하는 동작을 포함하는,
뉴럴 네트워크의 클리핑 방법.5. The method of claim 4,
The operation of determining one or more kernel slices similar to the selected kernel slice based on the similarity includes:
determining similarity by calculating a norm of a difference between each kernel slice classified into a class to which the selected kernel slice belongs and the selected kernel slice; and
and determining a kernel slice having the similarity equal to or less than a threshold value as a kernel slice similar to the selected kernel slice.
Neural network clipping method.
상기 대체 슬라이스를 결정하는 동작은,
상기 선택된 커널 슬라이스 및 상기 하나 이상의 유사한 커널 슬라이스를 평균하여 평균 커널 슬라이스를 계산하는 동작; 및
상기 선택된 커널 슬라이스 및 상기 하나 이상의 유사한 커널 슬라이스 중 적어도 하나의 커널 슬라이스를 상기 평균 커널 슬라이스로 대체하는 동작을 포함하는,
뉴럴 네트워크의 클리핑 방법.According to claim 1,
The operation of determining the replacement slice comprises:
calculating an average kernel slice by averaging the selected kernel slice and the one or more similar kernel slices; and
replacing at least one of the selected kernel slice and the one or more similar kernel slices with the average kernel slice;
Neural network clipping method.
상기 커널 슬라이스를 선택하는 동작은,
상기 입력 채널의 수를 기초로 상기 커널 슬라이스의 수를 결정하는 동작; 및
상기 결정된 커널 슬라이스의 수 및 상기 컨벌루션 매개 변수를 기초로 상기 컨벌루션 레이어의 컨벌루션 커널을 나타내는 텐서(tensor)로부터 상기 입력 채널의 커널 슬라이스를 추출하는 동작을 포함하는,
뉴럴 네트워크의 클리핑 방법.According to claim 1,
The operation of selecting the kernel slice comprises:
determining the number of kernel slices based on the number of input channels; and
extracting the kernel slice of the input channel from a tensor representing the convolutional kernel of the convolutional layer based on the determined number of kernel slices and the convolution parameter,
Neural network clipping method.
상기 커널 슬라이스가 대체 슬라이스인 경우 상기 인덱스 정보 중에서 상기 대체 슬라이스의 인덱스를 획득하는 동작; 및
상기 대체 슬라이스의 인덱스를 기초로 컨벌루션을 계산하는 동작을 포함하고,
상기 컨벌루션 레이어의 컨벌루션 매개 변수에 기초하여 선택된 커널 슬라이스와 유사한 커널 슬라이스는 클리핑되고 상기 대체 슬라이스로 대체된,
뉴럴 네트워크의 컨벌루션 계산 방법.determining whether a kernel slice of each input channel is a replacement slice based on index information of a convolutional layer included in a neural network;
obtaining an index of the replacement slice from among the index information when the kernel slice is a replacement slice; and
calculating a convolution based on the index of the replacement slice,
A kernel slice similar to a kernel slice selected based on a convolution parameter of the convolutional layer is clipped and replaced with the replacement slice,
A method for computing convolutions in neural networks.
상기 프로세서는,
뉴럴 네트워크에 포함된 컨벌루션 레이어의 컨벌루션 매개 변수에 기초하여 상기 컨벌루션 레이어의 입력 채널의 커널 슬라이스(kernel slice)를 선택하는 동작;
상기 선택된 커널 슬라이스와 유사한 하나 이상의 커널 슬라이스를 결정하는 동작;
하나 이상의 상기 유사한 커널 슬라이스를 기초로 상기 선택된 커널 슬라이스를 대체하는 대체 슬라이스를 결정하는 동작; 및
상기 선택된 커널 슬라이스를 클리핑하고 상기 대체 슬라이스로 상기 클리핑된 커널 슬라이스를 대체하는 동작을 수행하고,
상기 컨벌루션 매개 변수는 상기 컨벌루션 레이어의 상기 입력 채널의 수, 출력 채널의 수, 컨벌루션 커널의 필터의 폭, 컨벌루션 커널의 필터의 높이를 포함하는,
전자 장치.
at least one processor;
The processor is
selecting a kernel slice of an input channel of the convolutional layer based on a convolution parameter of the convolutional layer included in the neural network;
determining one or more kernel slices similar to the selected kernel slice;
determining a replacement slice to replace the selected kernel slice based on one or more of the similar kernel slices; and
clip the selected kernel slice and replace the clipped kernel slice with the replacement slice;
The convolution parameters include the number of input channels of the convolutional layer, the number of output channels, the width of the filter of the convolutional kernel, the height of the filter of the convolutional kernel,
electronic device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US17/190,642 US20210279586A1 (en) | 2020-03-03 | 2021-03-03 | Method and apparatus for clipping neural networks and performing convolution |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010140843.7 | 2020-03-03 | ||
CN202010140843.7A CN111414993B (en) | 2020-03-03 | 2020-03-03 | Convolutional neural network clipping and convolutional calculation method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20210111677A true KR20210111677A (en) | 2021-09-13 |
Family
ID=71492777
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020210020655A KR20210111677A (en) | 2020-03-03 | 2021-02-16 | Method for clipping neural networks, method for calculating convolution of neural networks and apparatus for performing the methods |
Country Status (2)
Country | Link |
---|---|
KR (1) | KR20210111677A (en) |
CN (1) | CN111414993B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113487012B (en) * | 2021-06-24 | 2023-08-04 | 北京航空航天大学 | FPGA-oriented deep convolutional neural network accelerator and design method |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018058426A1 (en) * | 2016-09-29 | 2018-04-05 | 清华大学 | Hardware neural network conversion method, computing device, compiling method and neural network software and hardware collaboration system |
US10990648B2 (en) * | 2017-08-07 | 2021-04-27 | Intel Corporation | System and method for an optimized winograd convolution accelerator |
CN108510066B (en) * | 2018-04-08 | 2020-05-12 | 湃方科技(天津)有限责任公司 | Processor applied to convolutional neural network |
CN109583564A (en) * | 2018-10-31 | 2019-04-05 | 东华大学 | Extremely similar animal origin automatic identifying method based on VGG convolutional neural networks |
CN109598340A (en) * | 2018-11-15 | 2019-04-09 | 北京知道创宇信息技术有限公司 | Method of cutting out, device and the storage medium of convolutional neural networks |
CN109359726A (en) * | 2018-11-27 | 2019-02-19 | 华中科技大学 | A kind of convolutional neural networks optimization method based on winograd algorithm |
CN110084281B (en) * | 2019-03-31 | 2023-09-12 | 华为技术有限公司 | Image generation method, neural network compression method, related device and equipment |
CN110348562B (en) * | 2019-06-19 | 2021-10-15 | 北京迈格威科技有限公司 | Neural network quantization strategy determination method, image identification method and device |
CN110781948A (en) * | 2019-10-22 | 2020-02-11 | 北京市商汤科技开发有限公司 | Image processing method, device, equipment and storage medium |
-
2020
- 2020-03-03 CN CN202010140843.7A patent/CN111414993B/en active Active
-
2021
- 2021-02-16 KR KR1020210020655A patent/KR20210111677A/en active Search and Examination
Also Published As
Publication number | Publication date |
---|---|
CN111414993A (en) | 2020-07-14 |
CN111414993B (en) | 2024-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3340129B1 (en) | Artificial neural network class-based pruning | |
US10740865B2 (en) | Image processing apparatus and method using multi-channel feature map | |
Micikevicius et al. | Mixed precision training | |
CN105960647B (en) | Compact face representation | |
US11144823B1 (en) | Method and system for hierarchical weight-sparse convolution processing | |
KR20180050928A (en) | Convolutional neural network processing method and apparatus | |
US9563822B2 (en) | Learning apparatus, density measuring apparatus, learning method, computer program product, and density measuring system | |
CN109086866B (en) | Partial binary convolution method suitable for embedded equipment | |
CN110008853B (en) | Pedestrian detection network and model training method, detection method, medium and equipment | |
KR20210093931A (en) | Automated creation of machine learning models | |
US11113601B1 (en) | Method and system for balanced-weight sparse convolution processing | |
CN113627389A (en) | Target detection optimization method and device | |
WO2022152104A1 (en) | Action recognition model training method and device, and action recognition method and device | |
KR20220045424A (en) | Method and apparatus of compressing artificial neural network | |
US20230130638A1 (en) | Computer-readable recording medium having stored therein machine learning program, method for machine learning, and information processing apparatus | |
US11410016B2 (en) | Selective performance of deterministic computations for neural networks | |
CN114444668A (en) | Network quantization method, network quantization system, network quantization apparatus, network quantization medium, and image processing method | |
KR20210111677A (en) | Method for clipping neural networks, method for calculating convolution of neural networks and apparatus for performing the methods | |
CN112926697B (en) | Abrasive particle image classification method and device based on semantic segmentation | |
CN116702835A (en) | Neural network reasoning acceleration method, target detection method, device and storage medium | |
KR102127855B1 (en) | Feature selection method with maximum repeatability | |
KR101953479B1 (en) | Group search optimization data clustering method and system using the relative ratio of distance | |
KR102600086B1 (en) | A Resource Efficient Integer-Arithmetic-Only FPGA-Based CNN Accelerator for Real-Time Facial Emotion Recognition | |
WO2022198606A1 (en) | Deep learning model acquisition method, system and apparatus, and storage medium | |
CN115994572A (en) | Model searching method and device and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination |