KR102578826B1 - Neural network device and operation method of the same - Google Patents

Neural network device and operation method of the same Download PDF

Info

Publication number
KR102578826B1
KR102578826B1 KR1020180005250A KR20180005250A KR102578826B1 KR 102578826 B1 KR102578826 B1 KR 102578826B1 KR 1020180005250 A KR1020180005250 A KR 1020180005250A KR 20180005250 A KR20180005250 A KR 20180005250A KR 102578826 B1 KR102578826 B1 KR 102578826B1
Authority
KR
South Korea
Prior art keywords
input
result
data
neural network
network device
Prior art date
Application number
KR1020180005250A
Other languages
Korean (ko)
Other versions
KR20190052587A (en
Inventor
김성호
김진석
김율화
김재준
박두식
Original Assignee
삼성전자주식회사
포항공과대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사, 포항공과대학교 산학협력단 filed Critical 삼성전자주식회사
Priority to US16/170,081 priority Critical patent/US11521046B2/en
Publication of KR20190052587A publication Critical patent/KR20190052587A/en
Application granted granted Critical
Publication of KR102578826B1 publication Critical patent/KR102578826B1/en

Links

Images

Classifications

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

Abstract

딜레이 타임을 이용하여 복수개의 입력과 동일한 커널에 대한 연산을 동일한 프로세서로 수행하는 방법 및 이를 위한 뉴럴 네트워크 장치가 개시된다. 뉴럴 네트워크 장치는 뉴로모픽 하드웨어를 포함할 수 있으며, CNN 매핑을 수행할 수 있다.A method of performing operations on a plurality of inputs and the same kernel using delay time with the same processor and a neural network device therefor are disclosed. A neural network device may include neuromorphic hardware and may perform CNN mapping.

Description

뉴럴 네트워크 장치 및 그 동작 방법 {Neural network device and operation method of the same}Neural network device and operation method thereof {Neural network device and operation method of the same}

본 개시는 뉴럴 네트워크 장치 및 그 동작 방법에 관한 것이다.This disclosure relates to a neural network device and a method of operating the same.

뉴럴 네트워크(neural network)는 생물학적 뇌를 모델링한 컴퓨터 과학적 아키텍쳐(computational architecture)를 참조한다. 최근 뉴럴 네트워크(neural network) 기술이 발전함에 따라, 다양한 종류의 전자 시스템에서 뉴럴 네트워크 장치를 사용하여 입력 데이터를 분석하고 유효한 정보를 추출하는 연구가 활발히 진행되고 있다.Neural network refers to a computational architecture that models the biological brain. As neural network technology has recently developed, research is being actively conducted to analyze input data and extract valid information using neural network devices in various types of electronic systems.

특히 저전력 및 저성능으로 구현되는 디바이스에서, 뉴럴 네트워크를 이용하여 대량의 입력 데이터를 실시간으로 분석하여 원하는 정보를 추출하기 위해서는 뉴럴 네트워크에 관한 연산을 효율적으로 처리할 수 있는 기술이 요구된다.In particular, in devices implemented with low power and low performance, technology that can efficiently process neural network operations is required in order to extract desired information by analyzing large amounts of input data in real time using a neural network.

시간 딜레이를 이용한 뉴럴 네트워크 장치, 및 그 동작 방법을 제공하는데 있다. 본 실시 예가 이루고자 하는 기술적 과제는 상기된 바와 같은 기술적 과제들로 한정되지 않으며, 이하의 실시 예들로부터 또 다른 기술적 과제들이 유추될 수 있다.The object is to provide a neural network device using time delay and a method of operating the same. The technical challenges that this embodiment aims to achieve are not limited to the technical challenges described above, and other technical challenges can be inferred from the following embodiments.

제 1 측면에 따른 뉴럴 네트워크 장치는 적어도 하나의 프로그램이 저장된 메모리; 및 상기 적어도 하나의 프로그램을 실행함으로써 뉴럴 네트워크를 구동하여 제 1 입력 및 제 2 입력을 포함하는 입력 데이터에 대한 연산을 수행하는 프로세서를 포함하고, 상기 프로세서는, 상기 제 1 입력과 복수개의 커널 간의 연산을 수행하여 제 1 결과를 획득하고, 상기 제 1 입력이 수신된 시점에서 제 1 인터벌(interval)만큼 딜레이된 시점에 수신된 상기 제 2 입력과 상기 복수개의 커널 간의 연산을 수행하여 제 2 결과를 획득하고, 상기 제 1 결과와 상기 제 2 결과를 이용하여 상기 입력 데이터에 대한 출력 데이터를 획득할 수 있다.A neural network device according to a first aspect includes a memory storing at least one program; and a processor that drives a neural network by executing the at least one program to perform an operation on input data including a first input and a second input, wherein the processor operates between the first input and a plurality of kernels. A first result is obtained by performing an operation, and a second result is obtained by performing an operation between the second input received at a time delayed by a first interval from the time the first input is received and the plurality of kernels. can be obtained, and output data for the input data can be obtained using the first result and the second result.

또한, 상기 뉴럴 네트워크 장치는 뉴로모픽 하드웨어를 포함하고, 상기 뉴로모픽 하드웨어는 상기 제 1 입력과 상기 제 2 입력을 이용하여 CNN(Convolution Neural Network) 매핑을 수행할 수 있다.Additionally, the neural network device includes neuromorphic hardware, and the neuromorphic hardware can perform Convolution Neural Network (CNN) mapping using the first input and the second input.

또한, 상기 입력 데이터는 이미지 데이터를 포함하고, 상기 제 1 입력은 상기 이미지 데이터의 제 1 영역에 대한 데이터를 포함하고, 상기 제 2 입력은 상기 이미지 데이터의 제 2 영역에 대한 데이터를 포함할 수 있다.Additionally, the input data may include image data, the first input may include data for a first region of the image data, and the second input may include data for a second region of the image data. there is.

또한, 상기 제 1 영역과 상기 제 2 영역은 일부 중첩되고 상호 인접할 수 있다.Additionally, the first area and the second area may partially overlap and be adjacent to each other.

또한, 상기 프로세서는 상기 제 2 입력이 유효한 입력인지 여부를 결정하고,Additionally, the processor determines whether the second input is a valid input,

상기 제 2 입력이 유효한 입력인 경우, 상기 제 2 입력과 상기 복수개의 커널 간의 연산을 수행하여 상기 제 2 결과를 획득할 수 있다.If the second input is a valid input, the second result can be obtained by performing an operation between the second input and the plurality of kernels.

또한, 상기 프로세서는 상기 제 2 입력이 상기 제 2 영역을 구성하는 픽셀 데이터인 경우 상기 제 2 입력을 상기 유효한 입력으로 결정할 수 있다.Additionally, the processor may determine the second input as the valid input when the second input is pixel data constituting the second area.

또한, 상기 프로세서는 서로 다른 딜레이 타임을 갖고 상기 이미지 데이터를 나타내는 복수개의 데이터 스트림을 복수개의 입력단으로부터 수신하고, 상기 복수개의 입력단으로부터 수신되는 상기 복수개의 데이터 스트림으로부터 상기 제 1 입력을 수신하고, 상기 제 2 결과를 획득하는 단계는 상기 복수개의 입력단으로부터 수신되는 상기 복수개의 데이터 스트림으로부터 상기 제 2 입력을 수신할 수 있다.In addition, the processor receives a plurality of data streams representing the image data with different delay times from a plurality of input terminals, receives the first input from the plurality of data streams received from the plurality of input terminals, and The step of obtaining a second result may include receiving the second input from the plurality of data streams received from the plurality of input terminals.

또한, 상기 제 1 입력은 제 1 사이클 동안 수신되고, 상기 제 2 입력은 상기 제 1 사이클보다 상기 제 1 인터벌만큼 딜레이된 제 2 사이클 동안 수신될 수 있다.Additionally, the first input may be received during a first cycle, and the second input may be received during a second cycle delayed by the first interval from the first cycle.

또한, 상기 프로세서는 상기 제 1 입력과 상기 복수개의 커널 간의 연산 결과들을 더하여 상기 제 1 결과를 획득하고, 상기 제 2 입력과 상기 복수개의 커널 간의 연산 결과들을 더하여 상기 제 2 결과를 획득할 수 있다.In addition, the processor may obtain the first result by adding the operation results between the first input and the plurality of kernels, and obtain the second result by adding the operation results between the second input and the plurality of kernels. .

또한, 상기 프로세서는 상기 제 2 입력이 수신된 시점에서 제 2 인터벌만큼 딜레이된 시점에 상기 입력 데이터에 포함되는 제 3 입력을 수신하고, 상기 제 3 입력과 상기 복수개의 커널 간의 연산을 수행하여 제 3 결과를 획득하고, 상기 제 1 결과, 상기 제 2 결과 및 상기 제 3 결과를 이용하여 상기 출력 데이터를 획득할 수 있다.In addition, the processor receives a third input included in the input data at a time delayed by a second interval from the time the second input is received, and performs an operation between the third input and the plurality of kernels to obtain a first 3 results may be obtained, and the output data may be obtained using the first result, the second result, and the third result.

또한, 제 2 측면에 따라 뉴럴 네트워크 장치 장치가 제 1 입력 및 제 2 입력을 포함하는 입력 데이터에 대한 연산을 수행하는 방법은 상기 뉴럴 네트워크 장치가 포함하는 프로세서를 이용하여, 상기 제 1 입력과 복수개의 커널 간의 연산을 수행하여 제 1 결과를 획득하는 단계; 상기 프로세서를 이용하여, 상기 제 1 입력이 수신된 시점에서 제 1 인터벌(interval)만큼 딜레이된 시점에 수신된 상기 제 2 입력과 상기 복수개의 커널 간의 연산을 수행하여 제 2 결과를 획득하는 단계; 및 상기 제 1 결과와 상기 제 2 결과를 이용하여 상기 입력 데이터에 대한 출력 데이터를 획득하는 단계를 포함할 수 있다.In addition, according to a second aspect, a method of performing an operation on input data including a first input and a second input by a neural network device uses a processor included in the neural network device, the first input and a plurality of inputs. Obtaining a first result by performing an operation between the kernels; Obtaining a second result by using the processor to perform an operation between the plurality of kernels and the second input received at a time delayed by a first interval from the time the first input is received; And it may include obtaining output data for the input data using the first result and the second result.

또한, 제 2 측면에 따른 방법을 컴퓨터에서 구현하기 위한 프로그램이 기록된 컴퓨터로 판독 가능한 비일시적 기록 매체가 제공될 수 있다.Additionally, a computer-readable non-transitory recording medium on which a program for implementing the method according to the second aspect is recorded on a computer may be provided.

본 개시에 따르면, 뉴럴 네트워크 장치는 딜레이 타임을 이용하여 데이터를 처리함으로써, 동일한 프로세서를 이용하여 수행가능한 데이터 량을 증가시킬 수 있다.According to the present disclosure, a neural network device can increase the amount of data that can be performed using the same processor by processing data using delay time.

도 1은 일 실시 예에 따른 뉴럴 네트워크의 아키텍처를 설명하기 위한 도면이다.
도 2는 일 실시 예에 따른 뉴럴 네트워크에서 입력 피처맵 및 출력 피처맵의 관계를 설명하기 위한 도면이다.
도 3은 일 실시 예에 따른 뉴럴 네트워크 장치의 하드웨어 구성을 도시한 블록도이다.
도 4는 일 실시 예에 따른 뉴럴 네트워크 장치가 입력 데이터에 포함되는 복수개의 입력들을 복수회에 걸쳐 처리하는 일 예를 나타내는 도면이다.
도 5는 일 실시 예에 따른 뉴럴 네트워크 장치가 데이터 스트림을 생성하는 일 예를 나타내는 도면이다.
도 6은 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림의 일 예를 나타내는 도면이다.
도 7은 일 실시 예에 따른 뉴럴 네트워크 장치가 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림에 대해서 커널과의 연산 결과를 획득하는 일 예를 나타내는 도면이다.
도 8은 일 실시 예에 따른 뉴럴 네트워크 장치가 입력과 커널 간의 연산을 수행하는 일 예를 나타내는 도면이다.
도 9는 일 실시 예에 따른 뉴럴 네트워크 장치가 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림을 획득하는 일 예를 나타내는 도면이다.
도 10은 일 실시 예에 따른 뉴럴 네트워크 장치가 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림으로부터 복수개의 영역에 대한 데이터를 획득하는 일 예를 나타내는 도면이다.
도 11은 일 실시 예에 따른 뉴럴 네트워크 장치가 제 1 입력과 제 2 입력으로부터 출력 데이터를 획득하는 방법을 나타내는 흐름도이다.
도 12는 일 실시 예에 따른 뉴럴 네트워크 장치가 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림으로부터 출력 데이터를 획득하는 방법을 나타내는 흐름도이다.
도 13은 일 실시 예에 따른 뉴럴 네트워크 장치가 제 1 입력 내지 제 3 입력을 이용하여 출력 데이터를 획득하는 방법을 나타내는 흐름도이다.
도 14는 일 실시 예에 따른 뉴럴 네트워크 장치가 입력 데이터로부터 출력 데이터를 획득하는 방법을 나타내는 흐름도이다.
도 15a 내지 15b는 일 실시 예에 따른 뉴로모픽(neuromorphic) 장치의 동작 방법을 설명하기 위한 도면이다.
도 16a 내지 도 16b는 일 실시 예에 따른 벡터-행렬 곱셈과 뉴럴 네트워크 장치에서 수행되는 연산을 비교하기 위한 도면이다.
도 17은 일 실시 예에 따른 뉴럴 네트워크 장치에서 컨벌루션 연산이 수행되는 예시를 설명하기 위한 도면이다.
도 18은 일 실시 예에 따른 서브 피처맵과 코어가 매칭되는 예시를 설명하기 위한 도면이다.
도 19는 일 실시 예에 따른 코어에서 벡터 곱셈 연산이 수행되는 예시를 설명하기 위한 도면이다.
도 20은 일 실시 예에 따른 복수의 코어에서 산출된 출력 값들을 합성하는 방법을 설명하기 위한 도면이다.
도 21은 일 실시 예에 따른 뉴럴 네트워크 장치에서 뉴럴 네트워크를 구현하는 방법을 설명하는 흐름도이다.
도 22는 일 실시 예에 따른 뉴럴 네트워크 장치 및 메모리를 도시한 블록도이다.
Figure 1 is a diagram for explaining the architecture of a neural network according to an embodiment.
Figure 2 is a diagram for explaining the relationship between an input feature map and an output feature map in a neural network according to an embodiment.
Figure 3 is a block diagram showing the hardware configuration of a neural network device according to an embodiment.
FIG. 4 is a diagram illustrating an example in which a neural network device processes a plurality of inputs included in input data multiple times, according to an embodiment.
FIG. 5 is a diagram illustrating an example in which a neural network device generates a data stream according to an embodiment.
Figure 6 is a diagram illustrating an example of a plurality of data streams having different delay times.
FIG. 7 is a diagram illustrating an example in which a neural network device obtains results of operations with a kernel for a plurality of data streams having different delay times, according to an embodiment.
FIG. 8 is a diagram illustrating an example in which a neural network device performs an operation between an input and a kernel according to an embodiment.
FIG. 9 is a diagram illustrating an example in which a neural network device acquires a plurality of data streams with different delay times, according to an embodiment.
FIG. 10 is a diagram illustrating an example in which a neural network device acquires data for a plurality of areas from a plurality of data streams having different delay times, according to an embodiment.
FIG. 11 is a flowchart illustrating a method by which a neural network device obtains output data from a first input and a second input, according to an embodiment.
FIG. 12 is a flowchart illustrating a method by which a neural network device obtains output data from a plurality of data streams having different delay times, according to an embodiment.
Figure 13 is a flowchart showing a method by which a neural network device acquires output data using first to third inputs according to an embodiment.
Figure 14 is a flowchart showing a method by which a neural network device obtains output data from input data, according to an embodiment.
15A to 15B are diagrams for explaining a method of operating a neuromorphic device according to an embodiment.
16A to 16B are diagrams for comparing vector-matrix multiplication and operations performed in a neural network device according to an embodiment.
FIG. 17 is a diagram illustrating an example of a convolution operation being performed in a neural network device according to an embodiment.
FIG. 18 is a diagram illustrating an example of matching a sub-feature map and a core according to an embodiment.
Figure 19 is a diagram for explaining an example of a vector multiplication operation performed in a core according to an embodiment.
Figure 20 is a diagram for explaining a method of combining output values calculated from a plurality of cores according to an embodiment.
Figure 21 is a flowchart explaining a method of implementing a neural network in a neural network device according to an embodiment.
Figure 22 is a block diagram illustrating a neural network device and memory according to an embodiment.

본 실시 예들에서 사용되는 용어는 본 실시 예들에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 기술분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 임의로 선정된 용어도 있으며, 이 경우 해당 실시 예의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서, 본 실시 예들에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 실시 예들의 전반에 걸친 내용을 토대로 정의되어야 한다.The terms used in the present embodiments were selected from general terms that are currently widely used as much as possible while considering the functions in the present embodiments, but this may vary depending on the intention or precedent of a technician working in the technical field, the emergence of new technology, etc. . Additionally, in certain cases, there are terms that are arbitrarily selected, and in this case, their meanings will be described in detail in the description of the relevant embodiment. Therefore, the terms used in the present embodiments should not be defined simply as the names of the terms, but should be defined based on the meaning of the term and the overall content of the present embodiments.

실시 예들에 대한 설명들에서, 어떤 부분이 다른 부분과 연결되어 있다고 할 때, 이는 직접적으로 연결되어 있는 경우 뿐 아니라, 그 중간에 다른 구성요소를 사이에 두고 전기적으로 연결되어 있는 경우도 포함한다. 또한 어떤 부분이 어떤 구성요소를 포함한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.In descriptions of embodiments, when a part is connected to another part, this includes not only the case where it is directly connected, but also the case where it is electrically connected with another component in between. Additionally, when it is said that a part includes a certain component, this does not mean that other components are excluded, but that it can further include other components, unless specifically stated to the contrary.

본 실시 예들에서 사용되는 "구성된다" 또는 "포함한다" 등의 용어는 명세서 상에 기재된 여러 구성 요소들, 또는 여러 단계들을 반드시 모두 포함하는 것으로 해석되지 않아야 하며, 그 중 일부 구성 요소들 또는 일부 단계들은 포함되지 않을 수도 있고, 또는 추가적인 구성 요소 또는 단계들을 더 포함할 수 있는 것으로 해석되어야 한다.Terms such as “consists of” or “comprises” used in the present embodiments should not be construed as necessarily including all of the various components or steps described in the specification, and some of the components or parts thereof Steps may not be included, or may further include additional components or steps.

본 실시 예들은 뉴럴 네트워크 기술 분야에 관한 것으로서 이하의 실시 예들이 속하는 기술 분야에서 통상의 지식을 가진 자에게 널리 알려져 있는 사항들에 관해서는 자세한 설명을 생략한다.These embodiments relate to the field of neural network technology, and detailed descriptions of matters widely known to those skilled in the art to which the following embodiments belong will be omitted.

하기 실시 예들에 대한 설명은 권리범위를 제한하는 것으로 해석되지 말아야 하며, 해당 기술분야의 당업자가 용이하게 유추할 수 있는 것은 실시 예들의 권리범위에 속하는 것으로 해석되어야 할 것이다. 이하 첨부된 도면들을 참조하면서 오로지 예시를 위한 실시 예들을 상세히 설명하기로 한다.The description of the following examples should not be construed as limiting the scope of rights, and what a person skilled in the art can easily infer should be interpreted as falling within the scope of rights of the embodiments. Hereinafter, embodiments for illustrative purposes only will be described in detail with reference to the attached drawings.

도 1은 일 실시 예에 따른 뉴럴 네트워크의 아키텍처를 설명하기 위한 도면이다.Figure 1 is a diagram for explaining the architecture of a neural network according to an embodiment.

도 1을 참고하면, 뉴럴 네트워크(1)는 딥 뉴럴 네트워크(Deep Neural Network, DNN) 또는 n-계층 뉴럴 네트워크(n-layers neural networks)의 아키텍처일 수 있다. DNN 또는 n-계층 뉴럴 네트워크는 컨볼루션 뉴럴 네트워크(Convolutional Neural Networks, CNN), 리커런트 뉴럴 네트워크(Recurrent Neural Networks, RNN), Deep Belief Networks, Restricted Boltzman Machines 등에 해당될 수 있다. 예를 들어, 뉴럴 네트워크(1)는 컨볼루션 뉴럴 네트워크(CNN)로 구현될 수 있으나, 이에 제한되지 않는다. 도 1에서는 뉴럴 네트워크(1)의 예시에 해당하는 컨볼루션 뉴럴 네트워크에서 일부의 컨볼루션 레이어가 도시되었지만, 컨볼루션 뉴럴 네트워크는 도시된 컨볼루션 레이어 외에도, 풀링 레이어(pooling layer), 풀리 커넥티드(fully connected) 레이어 등을 더 포함할 수 있다.Referring to FIG. 1, the neural network 1 may be an architecture of a deep neural network (DNN) or an n-layer neural network. DNN or n-layer neural networks may correspond to Convolutional Neural Networks (CNN), Recurrent Neural Networks (RNN), Deep Belief Networks, Restricted Boltzman Machines, etc. For example, the neural network 1 may be implemented as a convolutional neural network (CNN), but is not limited thereto. In Figure 1, some convolutional layers are shown in the convolutional neural network corresponding to the example of neural network 1, but in addition to the convolutional layers shown, the convolutional neural network includes a pooling layer and a fully connected ( may further include fully connected layers, etc.

뉴럴 네트워크(1)는 입력 이미지, 피처맵들(feature maps) 및 출력을 포함하는 복수 레이어들을 갖는 아키텍처로 구현될 수 있다. 뉴럴 네트워크(1)에서 입력 이미지는 커널(kernel)이라 불리는 필터와의 컨볼루션 연산이 수행되고, 그 결과 피처맵들이 출력된다. 이 때 생성된 출력 피처맵들은 입력 피처맵들로서 다시 커널과의 컨볼루션 연산이 수행되고, 새로운 피처맵들이 출력될 수 있다. 이와 같은 컨볼루션 연산이 반복적으로 수행된 결과, 최종적으로는 뉴럴 네트워크(1)를 통한 입력 이미지의 특징들에 대한 인식 결과가 출력될 수 있다.Neural network 1 may be implemented as an architecture with multiple layers including an input image, feature maps, and output. In the neural network (1), a convolution operation is performed on the input image with a filter called a kernel, and as a result, feature maps are output. At this time, the generated output feature maps are input feature maps, and a convolution operation with the kernel is performed again, and new feature maps can be output. As a result of repeatedly performing this convolution operation, a result of recognizing the features of the input image through the neural network 1 can be finally output.

예를 들어, 도 1의 뉴럴 네트워크(1)에 24ⅹ24 픽셀 크기의 이미지가 입력된 경우, 입력 이미지는 커널과의 컨볼루션 연산을 통해 20ⅹ20 크기를 갖는 4채널의 피처맵들로 출력될 수 있다. 이후에도, 20ⅹ20 피처맵들은 커널과의 반복적인 컨볼루션 연산을 통해 크기가 줄어들면서, 최종적으로는 1ⅹ1 크기의 특징들이 출력될 수 있다. 뉴럴 네트워크(1)는 여러 레이어들에서 컨볼루션 연산 및 서브샘플링(또는 풀링) 연산을 반복적으로 수행함으로써 입력 이미지로부터 이미지 전체를 대표할 수 있는 강인한 특징들을 필터링하여 출력하고, 출력된 최종 특징들을 통해 입력 이미지의 인식 결과를 도출할 수 있다.For example, when an image with a size of 24 × 24 pixels is input to the neural network 1 of FIG. 1, the input image can be output as 4-channel feature maps with a size of 20 × 20 through a convolution operation with a kernel. Afterwards, the size of the 20×20 feature maps is reduced through repeated convolution operations with the kernel, and ultimately features of 1×1 size can be output. The neural network (1) filters and outputs strong features that can represent the entire image from the input image by repeatedly performing convolution and subsampling (or pooling) operations in several layers, and outputs them through the output final features. Recognition results of the input image can be derived.

도 2는 일 실시 예에 따른 뉴럴 네트워크에서 입력 피처맵 및 출력 피처맵의 관계를 설명하기 위한 도면이다.Figure 2 is a diagram for explaining the relationship between an input feature map and an output feature map in a neural network according to an embodiment.

도 2를 참고하면, 뉴럴 네트워크의 어느 레이어(2)에서, 제1피처맵(FM1)은 입력 피처맵에 해당될 수 있고, 제2피처맵(FM2)는 출력 피처맵에 해당될 수 있다. 피처맵은 입력 데이터의 다양한 특징들이 표현된 데이터 세트를 의미할 수 있다. 피처맵들(FM1, FM2)은 2차원 매트릭스의 엘리먼트들을 갖거나 또는 3차원 매트릭스의 엘리먼트들을 가질 수 있고, 각각의 엘리먼트에는 픽셀 값이 정의될 수 있다. 피처 맵들(FM1, FM2)은 너비(W)(또는 칼럼이라고 함), 높이(H)(또는 로우라고 함) 및 깊이(C)를 가진다. 이때, 깊이(C)는 채널들의 개수에 해당될 수 있다.Referring to FIG. 2, in a layer 2 of a neural network, the first feature map FM1 may correspond to an input feature map, and the second feature map FM2 may correspond to an output feature map. A feature map may refer to a data set in which various features of input data are expressed. The feature maps FM1 and FM2 may have elements of a two-dimensional matrix or elements of a three-dimensional matrix, and a pixel value may be defined for each element. The feature maps (FM1, FM2) have a width (W) (also called a column), a height (H) (also called a row), and a depth (C). At this time, depth (C) may correspond to the number of channels.

제1피처맵(FM1) 및 커널의 웨이트맵(WM)에 대한 컨볼루션 연산이 수행될 수 있고, 그 결과 제2피처맵(FM2)이 생성될 수 있다. 웨이트맵(WM)은 각 엘리먼트에 정의된 웨이트로 제1피처맵(FM1)과 컨볼루션 연산을 수행함으로써 제1피처맵(FM1)의 특징들을 필터링한다. 웨이트맵(WM)은 제1피처맵(FM1)을 슬라이딩 윈도우 방식으로 시프트하면서 제1피처맵(FM1)의 윈도우들(또는 타일이라고도 함)과 컨볼루션 연산을 수행한다. 각 시프트 동안, 웨이트맵(WM)에 포함된 웨이트들 각각은 제1피처맵(FM1) 내 중첩된 윈도우의 픽셀 값들 각각과 곱해지고 더해질 수 있다. 제1피처맵(FM1)과 웨이트맵(WM)이 컨볼루션됨에 따라, 제2피처맵(FM2)의 하나의 채널이 생성될 수 있다. 도 1에는 하나의 커널에 대한 웨이트맵(WM)이 도시되었으나, 실제로는 복수의 커널들의 웨이트 맵들이 제1피처맵(FM1)과 각각 컨볼루션되어, 복수의 채널들의 제2피처맵(FM2)이 생성될 수 있다.A convolution operation may be performed on the first feature map (FM1) and the weight map (WM) of the kernel, and as a result, the second feature map (FM2) may be generated. The weight map (WM) filters the features of the first feature map (FM1) by performing a convolution operation with the first feature map (FM1) using the weight defined for each element. The weight map WM performs a convolution operation with the windows (or tiles) of the first feature map FM1 while shifting the first feature map FM1 using a sliding window method. During each shift, each of the weights included in the weight map (WM) may be multiplied and added to each of the pixel values of the overlapping windows in the first feature map (FM1). As the first feature map (FM1) and the weight map (WM) are convolved, one channel of the second feature map (FM2) can be created. Figure 1 shows the weight map (WM) for one kernel, but in reality, the weight maps of a plurality of kernels are each convolved with the first feature map (FM1) to produce a second feature map (FM2) of a plurality of channels. This can be created.

한편, 제2피처맵(FM2)은 다음 레이어의 입력 피처맵에 해당될 수 있다. 예를 들어, 제2피처맵(FM2)은 풀링(또는 서브샘플링) 레이어의 입력 피처맵이 될 수 있다.Meanwhile, the second feature map FM2 may correspond to the input feature map of the next layer. For example, the second feature map FM2 may be an input feature map of a pooling (or subsampling) layer.

도 1 및 도 2에서는 설명의 편의를 위하여 뉴럴 네트워크(1)의 개략적인 아키텍처에 대해서만 도시되어 있다. 하지만, 뉴럴 네트워크(1)는 도시된 바와 달리, 보다 많거나 적은 개수의 레이어들, 피처맵들, 커널들 등으로 구현될 수 있고, 그 크기들 또한 다양하게 변형될 수 있음을 당해 기술분야의 통상의 기술자라면 이해할 수 있다.In FIGS. 1 and 2, only the schematic architecture of the neural network 1 is shown for convenience of explanation. However, unlike what is shown, the neural network 1 may be implemented with more or fewer layers, feature maps, kernels, etc., and its sizes may also be varied in various ways. Anyone skilled in the art can understand this.

도 3은 일 실시 예에 따른 뉴럴 네트워크 장치(100)의 하드웨어 구성을 도시한 블록도이다.FIG. 3 is a block diagram showing the hardware configuration of the neural network device 100 according to an embodiment.

뉴럴 네트워크 장치(100)는 PC(personal computer), 서버 디바이스, 모바일 디바이스, 임베디드 디바이스 등의 다양한 종류의 디바이스들로 구현될 수 있고, 구체적인 예로서 뉴럴 네트워크를 이용한 음성 인식, 영상 인식, 영상 분류 등을 수행하는 스마트폰, 태블릿 디바이스, AR(Augmented Reality) 디바이스, IoT(Internet of Things) 디바이스, 자율주행 자동차, 로보틱스, 의료기기 등에 해당될 수 있으나, 이에 제한되지 않는다. 나아가서, 뉴럴 네트워크 장치(100)는 위와 같은 디바이스에 탑재되는 전용 하드웨어 가속기(HW accelerator)에 해당될 수 있고, 뉴럴 네트워크 장치(100)는 뉴럴 네트워크 구동을 위한 전용 모듈인 NPU(neural processing unit), TPU(Tensor Processing Unit), Neural Engine 등과 같은 하드웨어 가속기일 수 있으나, 이에 제한되지 않는다.The neural network device 100 can be implemented with various types of devices such as personal computers (PCs), server devices, mobile devices, and embedded devices, and specific examples include voice recognition, image recognition, image classification, etc. using neural networks. This may apply to smartphones, tablet devices, AR (Augmented Reality) devices, IoT (Internet of Things) devices, self-driving cars, robotics, medical devices, etc., but is not limited thereto. Furthermore, the neural network device 100 may correspond to a dedicated hardware accelerator (HW accelerator) mounted on the above device, and the neural network device 100 includes a neural processing unit (NPU), a dedicated module for running a neural network, It may be a hardware accelerator such as a TPU (Tensor Processing Unit), Neural Engine, etc., but is not limited thereto.

도 3을 참고하면, 뉴럴 네트워크 장치(100)는 프로세서(120) 및 메모리(110)를 포함한다. 도 3에 도시된 뉴럴 네트워크 장치(100)에는 본 실시 예들와 관련된 구성요소들만이 도시되어 있다. 따라서, 뉴럴 네트워크 장치(100)에는 도 3에 도시된 구성요소들 외에 다른 범용적인 구성요소들이 더 포함될 수 있음은 당해 기술분야의 통상의 기술자에게 자명하다.Referring to FIG. 3, the neural network device 100 includes a processor 120 and a memory 110. In the neural network device 100 shown in FIG. 3, only components related to the present embodiments are shown. Accordingly, it is obvious to those skilled in the art that the neural network device 100 may further include other general-purpose components in addition to the components shown in FIG. 3.

프로세서(120)는 뉴럴 네트워크 장치(100)를 실행하기 위한 전반적인 기능들을 제어하는 역할을 한다. 예를 들어, 프로세서(120)는 뉴럴 네트워크 장치(100) 내의 메모리(110)에 저장된 프로그램들을 실행함으로써, 뉴럴 네트워크 장치(100)를 전반적으로 제어한다. 프로세서(120)는 뉴럴 네트워크 장치(100) 내에 구비된 CPU(central processing unit), GPU(graphics processing unit), AP(application processor) 등으로 구현될 수 있으나, 이에 제한되지 않는다.The processor 120 serves to control overall functions for executing the neural network device 100. For example, the processor 120 generally controls the neural network device 100 by executing programs stored in the memory 110 within the neural network device 100. The processor 120 may be implemented as a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), etc. provided in the neural network device 100, but is not limited thereto.

메모리(110)는 뉴럴 네트워크 장치(100) 내에서 처리되는 각종 데이터들을 저장하는 하드웨어로서, 예를 들어, 메모리(110)는 뉴럴 네트워크 장치(100)에서 처리된 데이터들 및 처리될 데이터들을 저장할 수 있다. 또한, 메모리(110)는 뉴럴 네트워크 장치(100)에 의해 구동될 애플리케이션들, 드라이버들 등을 저장할 수 있다. 메모리(110)는 DRAM(dynamic random access memory), SRAM(static random access memory) 등과 같은 RAM(random access memory), ROM(read-only memory), EEPROM(electrically erasable programmable read-only memory), CD-ROM, 블루레이 또는 다른 광학 디스크 스토리지, HDD(hard disk drive), SSD(solid state drive), 또는 플래시 메모리를 포함할 수 있다. The memory 110 is hardware that stores various data processed within the neural network device 100. For example, the memory 110 can store data processed and data to be processed in the neural network device 100. there is. Additionally, the memory 110 may store applications, drivers, etc. to be run by the neural network device 100. The memory 110 includes random access memory (RAM) such as dynamic random access memory (DRAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), CD- It may include ROM, Blu-ray or other optical disk storage, a hard disk drive (HDD), a solid state drive (SSD), or flash memory.

또는 메모리(110)는 온칩 메모리일 수 있다. 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 메모리(110)를 온칩 메모리 형태로만 구비하여, 외부 메모리에 대한 접근 없이 연산을 수행할 수 있다. 예를 들면, 메모리(110)는 온칩 메모리 형태로 구현된 SRAM일 수 있다. 이 경우 상술된 바와 달리 DRAM, ROM, HDD, SSD 등 외부 메모리로 주로 이용되는 종류의 메모리는 메모리(110)로 이용되지 않을 수 있다.Alternatively, the memory 110 may be an on-chip memory. The neural network device 100 according to one embodiment has the memory 110 only in the form of an on-chip memory, and can perform calculations without access to external memory. For example, the memory 110 may be SRAM implemented as an on-chip memory. In this case, unlike what was described above, types of memory that are mainly used as external memories, such as DRAM, ROM, HDD, and SSD, may not be used as the memory 110.

프로세서(120)는 메모리(110)로부터 뉴럴 네트워크 데이터, 예를 들어 이미지 데이터, 피처맵 데이터, 커널 데이터 등을 읽기/쓰기(read/write)하고, 읽기/쓰기된 데이터를 이용하여 뉴럴 네트워크를 실행할 수 있다. 뉴럴 네트워크가 실행될 때, 프로세서(120)는 출력 피처맵에 관한 데이터를 생성하기 위하여, 입력 피처맵과 커널 간의 컨볼루션 연산을 반복적으로 수행할 수 있다. 이때, 입력 피처맵의 채널 수, 커널의 채널 수, 입력 피처맵의 크기, 커널의 크기, 값의 정밀도(precision) 등의 다양한 팩터들에 의존하여 컨볼루션 연산의 연산량이 결정될 수 있다. 도 1에 도시된 뉴럴 네트워크(1)와 달리, 뉴럴 네트워크 장치(100)에서 구동되는 실제 뉴럴 네트워크는 보다 복잡한 아키텍처로 구현될 수 있다. 이에 따라 프로세서(120)는 수억에서 수백억에 다다를 정도로 매우 많은 연산량(operation count)의 컨볼루션 연산들을 수행하게 되고, 프로세서(120)가 컨볼루션 연산을 위해 메모리(110)에 액세스하는 빈도가 함께 비약적으로 증가될 수 있다.The processor 120 reads/writes neural network data, such as image data, feature map data, kernel data, etc., from the memory 110, and executes the neural network using the read/written data. You can. When the neural network is executed, the processor 120 may repeatedly perform a convolution operation between the input feature map and the kernel to generate data related to the output feature map. At this time, the amount of convolution operation may be determined depending on various factors such as the number of channels of the input feature map, the number of channels of the kernel, the size of the input feature map, the size of the kernel, and the precision of the value. Unlike the neural network 1 shown in FIG. 1, an actual neural network running on the neural network device 100 may be implemented with a more complex architecture. Accordingly, the processor 120 performs convolution operations with a very large operation count ranging from hundreds of millions to tens of billions, and the frequency with which the processor 120 accesses the memory 110 for convolution operations also dramatically decreases. can be increased.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 뉴로모픽 하드웨어를 포함할 수 있다. 뉴로모픽 하드웨어는 CNN 매핑 등을 수행할 수 있다. 뉴로모픽 하드웨어는 외부 메모리를 이용하지 않고 온칩 메모리만을 이용하여 연산을 수행할 수 있다. 예를 들면, 뉴로모픽 하드웨어는 외부 메모리(예: 오프칩 메모리 등)를 이용하지 않고 온칩 메모리만을 이용하여 CNN 매핑 등을 수행함으로써, 이미지 처리하는 동안 메모리 업데이트 없이 연산을 수행할 수 있다.The neural network device 100 according to one embodiment may include neuromorphic hardware. Neuromorphic hardware can perform CNN mapping, etc. Neuromorphic hardware can perform calculations using only on-chip memory without using external memory. For example, neuromorphic hardware performs CNN mapping using only on-chip memory without using external memory (e.g., off-chip memory, etc.), allowing calculations to be performed without memory updates during image processing.

일 실시 예에 따른 프로세서(120)는 복수개의 입력에 대한 연산을 수행할 수 있다. 프로세서(120)는 제 1 입력 및 제 2 입력을 포함하는 입력 데이터에 대한 연산을 수행할 수 있다. 제 1 입력 또는 제 2 입력은 입력 피처맵 또는 입력 이미지 데이터의 전부 또는 일부를 나타낼 수 있다. 예를 들면, 제 1 입력은 입력 피처맵 또는 입력 이미지 데이터의 제 1 영역에 대한 데이터를 나타내고, 제 2 입력은 입력 피처맵 또는 입력 이미지 데이터의 제 2 영역에 대한 데이터를 나타낼 수 있다.The processor 120 according to one embodiment may perform operations on a plurality of inputs. The processor 120 may perform an operation on input data including a first input and a second input. The first input or the second input may represent all or part of the input feature map or input image data. For example, the first input may represent data for a first region of the input feature map or input image data, and the second input may represent data for a second region of the input feature map or input image data.

일 실시 예에 따른 프로세서(120)는 CNN 매핑에서 여러 위치에서 재사용 되는 커널 각각을 물리적으로 다른 메모리에 배치하는 것이 아니라, 실제로 한 위치에만 배치하고 시간에 따라 다른 위치의 입력 이미지를 이용하여 여러 시간에 걸쳐 출력 데이터(예: 출력되는 이미지에 대한 데이터)에 대한 연산을 수행할 수 있다. 일 실시 예에 따른 프로세서(120)는 복수회에 걸쳐 출력 이미지의 각 영역에 대한 연산을 수행하여, 출력 데이터를 획득할 수 있다.The processor 120 according to one embodiment does not place each kernel reused in multiple locations in CNN mapping in physically different memories, but actually places them only in one location and uses input images from different locations over time for several times. Operations can be performed on output data (e.g., data about output images). The processor 120 according to one embodiment may obtain output data by performing operations on each area of the output image multiple times.

일 실시 예에 따른 프로세서(120)는 제 1 입력을 수신하고, 제 1 입력과 복수개의 커널 간의 연산을 수행하여 제 1 결과를 획득할 수 있다.The processor 120 according to one embodiment may receive a first input, perform an operation between the first input and a plurality of kernels, and obtain a first result.

일 실시 예에 따라, 제 1 입력은 입력 피처맵의 제 1 영역에 대한 데이터를 포함할 수 있다. According to one embodiment, the first input may include data for the first area of the input feature map.

일 실시 예에 따른 프로세서(120)는 제 1 입력과 복수개의 커널 간의 연산을 수행할 수 있다. 예를 들면, 프로세서(120)는 제 1 입력과 제 1 커널(예: 레드에 대한 커널) 간의 연산을 수행하여 제 1-1 결과를 획득하고, 제 1 입력과 제 2 커널(예: 그린에 대한 커널) 간의 연산을 수행하여 제 1-2 결과를 획득하고, 제 1 입력과 제 3 커널(예: 블루에 대한 커널) 간의 연산을 수행하여 제 1-3 결과를 획득할 수 있다. 프로세서(120)는 제 1-1 결과, 제 1-2 결과 및 제 1-3 결과를 이용하여 제 1 결과를 획득할 수 있다. 예를 들면, 프로세서(120)는 제 1-1 결과, 제 1-2 결과 및 제 1-3 결과를 더하여 제 1 결과를 획득할 수 있다.The processor 120 according to one embodiment may perform an operation between the first input and a plurality of kernels. For example, the processor 120 performs an operation between a first input and a first kernel (e.g., the kernel for red) to obtain a 1-1 result, and performs an operation between the first input and a second kernel (e.g., the kernel for green). The 1-2 result can be obtained by performing an operation between the first input and the third kernel (eg, the blue kernel), and the 1-3 result can be obtained by performing the operation between the first input and the third kernel (eg, the blue kernel). The processor 120 may obtain the first result using the 1-1 result, the 1-2 result, and the 1-3 result. For example, the processor 120 may obtain the first result by adding the 1-1 result, the 1-2 result, and the 1-3 result.

일 실시 예에 따른 프로세서(120)는 제 2 입력을 제 1 입력이 수신된 시점에서 제 1 인터벌만큼 딜레이된 시점에 수신하고, 제 2 입력과 복수개의 커널 간의 연산을 수행하여 제 2 결과를 획득할 수 있다.The processor 120 according to one embodiment receives the second input at a time delayed by a first interval from the time the first input is received, and obtains a second result by performing an operation between the second input and a plurality of kernels. can do.

일 실시 예에 따라, 제 2 입력은 입력 피처맵의 제 2 영역에 대한 데이터를 포함할 수 있다. According to one embodiment, the second input may include data for the second area of the input feature map.

일 실시 예에 따른 프로세서(120)는 제 1 입력이 수신된 시점에서 제 1 인터벌만큼 딜레이된 시점에 제 2 입력을 수신할 수 있다. 프로세서(120)는 수신한 제 2 입력과 복수개의 커널 간의 연산을 수행할 수 있다. 예를 들면, 프로세서(120)는 제 2 입력과 제 1 커널(예: 레드에 대한 커널) 간의 연산을 수행하여 제 2-1 결과를 획득하고, 제 2 입력과 제 2 커널(예: 그린에 대한 커널) 간의 연산을 수행하여 제 2-2 결과를 획득하고, 제 2 입력과 제 3 커널(예: 블루에 대한 커널) 간의 연산을 수행하여 제 2-3 결과를 획득할 수 있다. 프로세서(120)는 제 2-1 결과, 제 2-2 결과 및 제 2-3 결과를 이용하여 제 1 결과를 획득할 수 있다. 예를 들면, 프로세서(120)는 제 2-1 결과, 제 2-2 결과 및 제 2-3 결과를 더하여 제 2 결과를 획득할 수 있다. 또한, 제 1 결과를 획득할 때 이용된 복수개의 커널과 제 2 결과를 획득할 때 이용된 복수개의 커널은 동일할 수 있다.The processor 120 according to one embodiment may receive the second input at a time delayed by the first interval from the time the first input is received. The processor 120 may perform an operation between the received second input and a plurality of kernels. For example, the processor 120 performs an operation between a second input and a first kernel (e.g., the kernel for red) to obtain a 2-1 result, and performs an operation between the second input and the second kernel (e.g., the kernel for green). The 2-2 result may be obtained by performing an operation between the second input and the third kernel (e.g., the blue kernel), and the 2-3 result may be obtained by performing an operation between the second input and the third kernel (e.g., the blue kernel). The processor 120 may obtain the first result using the 2-1 result, the 2-2 result, and the 2-3 result. For example, the processor 120 may obtain the second result by adding the 2-1 result, the 2-2 result, and the 2-3 result. Additionally, the plurality of kernels used when obtaining the first result and the plurality of kernels used when obtaining the second result may be the same.

일 실시 예에 따른 프로세서(120)는 제 1 결과와 제 2 결과를 이용하여 입력 데이터에 대한 출력 데이터를 획득할 수 있다.The processor 120 according to one embodiment may obtain output data for input data using the first result and the second result.

입력 데이터는 피처맵 이미지 데이터를 포함할 수 있다. 예를 들면, 입력 데이터는 2D 이미지 데이터일 수 있다. 다른 예로, 입력 데이터는 3D 이미지 데이터일 수 있다.Input data may include feature map image data. For example, the input data may be 2D image data. As another example, the input data may be 3D image data.

입력 데이터가 이미지 데이터인 경우, 일 실시 예에 따른 프로세서(120)는 제 1 영역에 대한 처리 결과인 제 1 결과와 제 2 영역에 대한 처리 결과인 제 2 결과를 이용하여 입력 데이터에 대한 출력 데이터를 획득할 수 있다. When the input data is image data, the processor 120 according to an embodiment generates output data for the input data using the first result, which is the result of processing for the first area, and the second result, which is the result of processing for the second area. can be obtained.

일 실시 예에 따를 때, 제 1 영역과 제 2 영역은 일부 중첩될 수 있다. 예를 들면 제 1 영역 및 제 2 영역이 2x2의 크기일 때, 1x2 크기의 영역이 제 1 영역과 제 2 영역 간에 중첩될 수 있다.According to one embodiment, the first area and the second area may partially overlap. For example, when the first area and the second area are 2x2 in size, a 1x2 area may overlap between the first area and the second area.

일 실시 예에 따를 때, 제 1 영역과 제 2 영역은 상호 인접할 수 있다. 예를 들면, 제 1 영역의 우측에 제 2 영역이 위치할 수 있다. 다른 예로, 제 1 영역의 아래측에 제 2 영역이 위치할 수 있다.According to one embodiment, the first area and the second area may be adjacent to each other. For example, the second area may be located to the right of the first area. As another example, the second area may be located below the first area.

도 4는 일 실시 예에 따른 뉴럴 네트워크 장치(100)가 입력 데이터에 포함되는 복수개의 입력들을 복수회에 걸쳐 처리하는 일 예를 나타내는 도면이다.FIG. 4 is a diagram illustrating an example in which the neural network device 100 processes a plurality of inputs included in input data multiple times according to an embodiment.

입력 데이터(400)는 제 1 입력(411), 제 2 입력(412) 및 제 3 입력(413)을 포함할 수 있다.Input data 400 may include a first input 411, a second input 412, and a third input 413.

복수개의 커널(421, 422)은 제 1 커널(421) 및 제 2 커널(422)을 포함할 수 있다.The plurality of kernels 421 and 422 may include a first kernel 421 and a second kernel 422.

제 1 결과(431, 432)는 제 1-1 결과(431) 및 제 1-2 결과(432)를 포함할 수 있고, 제 2 결과(441, 442)는 제 2-1 결과(441) 및 제 2-2 결과(442)를 포함할 수 있고, 제 3 결과(451, 452) 제 3-1 결과(451) 및 제 3-2 결과(452)를 포함할 수 있다.The first results 431 and 432 may include the 1-1 result 431 and the 1-2 result 432, and the second results 441 and 442 may include the 2-1 result 441 and It may include the 2-2 result 442, the third result 451, 452, the 3-1 result 451, and the 3-2 result 452.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 1 입력(411)과 복수개의 커널(421, 422) 간의 연산을 수행하여 제 1 결과(431, 432)를 획득하고, 제 2 입력(412)과 복수개의 커널(421, 422) 간의 연산을 수행하여 제 2 결과(441, 442)를 획득하고, 제 3 입력(413)과 복수개의 커널(421, 422) 간의 연산을 수행하여 제 3 결과(451, 452)를 획득할 수 있다.The neural network device 100 according to an embodiment performs an operation between a first input 411 and a plurality of kernels 421 and 422 to obtain first results 431 and 432, and obtains a second input 412. and a plurality of kernels 421, 422 to obtain second results (441, 442), and to perform an operation between the third input 413 and a plurality of kernels (421, 422) to obtain a third result ( 451, 452) can be obtained.

입력 데이터(400)는 3D 이미지 데이터일 수 있다. 또한, 제 1 입력(411), 제 2 입력(412), 제 3 입력(413) 등은 입력 데이터(400)의 일부일 수 있다. 제 1 입력(411)과 제 2 입력(412)은 일부가 중첩될 수 있다. 또는 제 1 입력(411)과 제 2 입력(412)은 상호 인접할 수 있다.Input data 400 may be 3D image data. Additionally, the first input 411, the second input 412, the third input 413, etc. may be part of the input data 400. The first input 411 and the second input 412 may partially overlap. Alternatively, the first input 411 and the second input 412 may be adjacent to each other.

제 1 결과(431, 432)에 포함되는 제 1-1 결과(431) 및 제 1-2 결과(432)는 서로 상이한 레이어에서의 결과 데이터를 나타낼 수 있다. 결과 데이터는 출력 이미지를 나타내는 데이터를 의미할 수 있다.The 1-1 result 431 and the 1-2 result 432 included in the first results 431 and 432 may represent result data from different layers. Result data may refer to data representing an output image.

도 5는 일 실시 예에 따른 뉴럴 네트워크 장치(100)가 데이터 스트림을 생성하는 일 예를 나타내는 도면이다. 도 5를 참조하면, 도 5는 일 실시 예에 따른 뉴럴 네트워크 장치(100)가 입력 데이터(500)로부터 데이터 스트림(510, 520, 530, 540)을 획득하는 일 예를 도식적으로 나타낸다.FIG. 5 is a diagram illustrating an example in which the neural network device 100 generates a data stream according to an embodiment. Referring to FIG. 5, FIG. 5 schematically shows an example in which the neural network device 100 acquires data streams 510, 520, 530, and 540 from input data 500, according to an embodiment.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 1 데이터(510), 제 2 데이터(520), 제 3 데이터(530) 및 제 4 데이터(540)를 포함하는 입력 데이터(500)는 제 1 데이터(510), 제 2 데이터(520), 제 3 데이터(530) 및 제 4 데이터(540)를 차례로 출력함으로써, 제 1 데이터(510), 제 2 데이터(520), 제 3 데이터(530) 및 제 4 데이터(540)로 이루어진 데이터 스트림(510, 520, 530, 540)을 생성할 수 있다. In the neural network device 100 according to an embodiment, input data 500 including first data 510, second data 520, third data 530, and fourth data 540 is first By sequentially outputting data 510, second data 520, third data 530, and fourth data 540, first data 510, second data 520, and third data 530 and data streams 510, 520, 530, and 540 consisting of fourth data 540.

또한, 생성된 데이터 스트림(510, 520, 530, 540)은 뉴럴 네트워크 장치(100)에 포함된 프로세서(120)로 전송되고, 프로세서(120)는 데이터 스트림(510, 520, 530, 540)과 복수개의 커널 간의 연산을 수행할 수 있다.In addition, the generated data streams 510, 520, 530, and 540 are transmitted to the processor 120 included in the neural network device 100, and the processor 120 processes the data streams 510, 520, 530, and 540. Operations can be performed between multiple kernels.

도 6은 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림의 일 예를 나타내는 도면이다. 도 6을 참조하면, 도 6은 일 실시 예에 따른 뉴럴 네트워크 장치(100)가 입력 데이터(500)로부터 생성된 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림(610, 620, 630)을 획득하는 일 예를 도식적으로 나타낸다.Figure 6 is a diagram illustrating an example of a plurality of data streams having different delay times. Referring to FIG. 6, the neural network device 100 according to an embodiment acquires a plurality of data streams 610, 620, and 630 with different delay times generated from input data 500. An example is shown schematically.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 서로 다른 딜레이 타임을 갖는 데이터 스트림을 생성할 수 있다. 예를 들면, 제 1 데이터 스트림(610), 제 2 데이터 스트림(620) 및 제 3 데이터 스트림(630)은 서로 다른 딜레이 타임을 가질 수 있다. 제 1 데이터 스트림(610)의 딜레이 타임이 0 사이클일 때, 제 2 데이터 스트림(620)은 1 사이클의 딜레이 타임을 가지고, 제 3 데이터 스트림(630)은 2 사이클의 딜레이 타임을 가질 수 있다.The neural network device 100 according to an embodiment may generate data streams with different delay times. For example, the first data stream 610, the second data stream 620, and the third data stream 630 may have different delay times. When the delay time of the first data stream 610 is 0 cycle, the second data stream 620 may have a delay time of 1 cycle, and the third data stream 630 may have a delay time of 2 cycles.

일 실시 예에 따른 딜레이 타임은 액손 딜레이 타임(axonal delay time)을 포함할 수 있다. Delay time according to one embodiment may include axonal delay time.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 뉴런별 액손 딜레이 타임과 여러 시넵스를 이용하여 데이터 스트림을 여러 번 복제하여 시간적으로 재정렬 함으로써, 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림을 생성할 수 있다.The neural network device 100 according to an embodiment can generate a plurality of data streams with different delay times by duplicating the data stream multiple times and rearranging it temporally using the axon delay time for each neuron and several synapses. there is.

도 7은 일 실시 예에 따른 뉴럴 네트워크 장치(100)가 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림에 대해서 커널과의 연산 결과를 획득하는 일 예를 나타내는 도면이다. 도 7을 참조하면, 도 7은 일 실시 예에 따른 뉴럴 네트워크 장치(100)가 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림(610, 620, 630)으로부터 복수개의 입력(710, 720, 730, 740)을 획득하고 복수개의 입력(710, 720, 730, 740)과 복수개의 커널 간의 연산을 통해 복수개의 결과(715, 725, 735, 745)를 획득하는 일 예를 도식적으로 나타낸다.FIG. 7 is a diagram illustrating an example in which the neural network device 100 obtains results of operations with a kernel for a plurality of data streams having different delay times, according to an embodiment. Referring to FIG. 7, the neural network device 100 according to an embodiment receives a plurality of inputs 710, 720, 730, and 740 from a plurality of data streams 610, 620, and 630 having different delay times. ) and obtain a plurality of results (715, 725, 735, 745) through operations between a plurality of inputs (710, 720, 730, 740) and a plurality of kernels.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림(610, 620, 630)으로부터 제 1 입력(710), 제 2 입력(720), 제 3 입력(730), 제 4 입력(740) 등을 획득할 수 있다.The neural network device 100 according to an embodiment receives a first input 710, a second input 720, and a third input 730 from a plurality of data streams 610, 620, and 630 having different delay times. , the fourth input 740, etc. can be obtained.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 1 입력(710)과 복수개의 커널 간의 연산을 수행하여 제 1 결과(715)를 획득하고, 제 2 입력(720)과 복수개의 커널 간의 연산을 수행하여 제 2 결과(725)를 획득하고, 제 3 입력(730)과 복수개의 커널 간의 연산을 수행하여 제 3 결과(735)를 획득하고, 제 4 입력(740)과 복수개의 커널 간의 연산을 수행하여 제 4 결과(745)를 획득할 수 있다. 각 결과(715, 725, 735, 745)는 출력되는 이미지에 대한 데이터를 나타낼 수 있다. 예를 들면, 각 결과(715, 725, 735, 745)는 하나 이상의 픽셀에 대한 데이터를 포함할 수 있다. 또한 각 결과(715, 725, 735, 745)는 다음 레이어의 입력으로 이용될 수 있다. 예를 들면, 각 결과(715, 725, 735, 745)는 중첩되어 전송됨으로써 다음 레이어의 입력으로 이용될 수 있다.The neural network device 100 according to one embodiment obtains a first result 715 by performing an operation between the first input 710 and a plurality of kernels, and performs an operation between the second input 720 and a plurality of kernels. A second result 725 is obtained by performing an operation between the third input 730 and a plurality of kernels, and a third result 735 is obtained by performing an operation between the fourth input 740 and a plurality of kernels. The fourth result 745 can be obtained by performing the process. Each result (715, 725, 735, 745) may represent data about the output image. For example, each result 715, 725, 735, 745 may include data for one or more pixels. Additionally, each result (715, 725, 735, 745) can be used as input to the next layer. For example, each result (715, 725, 735, 745) can be used as input for the next layer by being transmitted in an overlapping manner.

도 8은 일 실시 예에 따른 뉴럴 네트워크 장치(100)가 입력과 커널 간의 연산을 수행하는 일 예를 나타내는 도면이다.FIG. 8 is a diagram illustrating an example in which the neural network device 100 performs an operation between an input and a kernel according to an embodiment.

일 실시 예에 따라, 입력 데이터(810)는 4x4x3의 이미지 데이터이고, 수개의 커널(820)은 2x2x3의 커널로 구성되고, 출력 데이터(830)는 3x3x3의 이미지 데이터일 수 있다. 출력 데이터(830)의 첫번째 레이어는 제 1-1 결과(a), 제 2-1 결과(b), 제 3-1 결과(c), 제 4-1 결과(d), 제 5-1 결과(e), 제 6-1 결과(f), 제 7-1 결과(g), 제 8-1 결과(h) 및 제 9-1 결과(i)로 구성될 수 있다. 유사한 방식으로 출력 데이터(830)의 두번째 레이어는 제 1-2 결과 내지 제 9-2 결과로 구성되고, 출력 데이터(830)의 세번째 레이어는 제 1-3 결과 내지 제 9-3 결과로 구성될 수 있다.According to one embodiment, the input data 810 may be 4x4x3 image data, several kernels 820 may be composed of 2x2x3 kernels, and the output data 830 may be 3x3x3 image data. The first layer of output data 830 is the 1-1 result (a), the 2-1 result (b), the 3-1 result (c), the 4-1 result (d), and the 5-1 result. (e), 6-1 result (f), 7-1 result (g), 8-1 result (h), and 9-1 result (i). In a similar manner, the second layer of output data 830 will be composed of results 1-2 to 9-2, and the third layer of output data 830 will be composed of results 1-3 to 9-3. You can.

도 9는 일 실시 예에 따른 뉴럴 네트워크 장치(100)가 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림을 획득하는 일 예를 나타내는 도면이다.FIG. 9 is a diagram illustrating an example in which the neural network device 100 acquires a plurality of data streams with different delay times according to an embodiment.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 입력 데이터로부터 데이터 스트림(900, 901)을 생성할 수 있다. 뉴럴 네트워크 장치(100)는 생성된 데이터 스트림(900, 901)으로부터 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림(910, 920, 930, 940)을 생성할 수 있다. 예를 들면, 뉴럴 네트워크 장치(100)는 딜레이 타임이 0인 제 1 데이터 스트림(940), 딜레이 타임이 1인 제 2 데이터 스트림(930), 딜레이 타임이 4인 제 3 데이터 스트림(920), 딜레이 타임이 5인 제 4 데이터 스트림(910)을 채널 0에 대한 데이터 스트림(900)을 이용하여 생성할 수 있다.The neural network device 100 according to one embodiment may generate data streams 900 and 901 from input data. The neural network device 100 may generate a plurality of data streams 910, 920, 930, and 940 with different delay times from the generated data streams 900 and 901. For example, the neural network device 100 includes a first data stream 940 with a delay time of 0, a second data stream 930 with a delay time of 1, a third data stream 920 with a delay time of 4, A fourth data stream 910 with a delay time of 5 can be created using the data stream 900 for channel 0.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림으로부터 복수개의 입력을 획득할 수 있다. 예를 들면, 뉴럴 네트워크 장치(100)는 제 1 데이터 스트림(940) 내지 제 4 데이터 스트림(910)으로부터 동일한 사이클에 획득되는 데이터를 이용하여, 제 1 입력(950), 제 2 입력(960), 제 3 입력(970), 제 4 입력(990) 등을 획득할 수 있다. 제 1 입력(950) 내지 제 4 입력(990)은 입력 피처맵 또는 입력 이미지의 일부를 나타낼 수 있다. 예를 들면, 제 1 입력(950)은 입력 피처맵의 제 1 영역(픽셀 1, 2, 5, 6)에 대한 데이터를 나타내고, 제 2 입력(960)은 입력 피처맵의 제 2 영역(픽셀 2, 3, 6, 7)에 대한 데이터를 나타내고, 제 3 입력(970)은 입력 피처맵의 제 3 영역(픽셀 3, 4, 7, 8)에 대한 데이터를 나타내고, 제 4 입력(990)은 입력 피처맵의 제 4 영역(픽셀 5, 6, 9, 10)에 대한 데이터를 나타낼 수 있다.The neural network device 100 according to one embodiment may obtain a plurality of inputs from a plurality of data streams having different delay times. For example, the neural network device 100 uses data obtained in the same cycle from the first data stream 940 to the fourth data stream 910 to input the first input 950 and the second input 960. , the third input 970, the fourth input 990, etc. can be obtained. The first to fourth inputs 950 to 990 may represent an input feature map or a portion of an input image. For example, the first input 950 represents data for the first region (pixels 1, 2, 5, and 6) of the input feature map, and the second input 960 represents data for the second region (pixels 1, 2, 5, and 6) of the input feature map. 2, 3, 6, 7), the third input 970 represents data for the third area (pixels 3, 4, 7, and 8) of the input feature map, and the fourth input 990 may represent data for the fourth area (pixels 5, 6, 9, and 10) of the input feature map.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림으로부터 획득되는 입력(950, 960, 970, 980, 990) 중 일부를 이용하여 출력 데이터를 생성할 수 있다. 예를 들면, 뉴럴 네트워크 장치(100)는 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림으로부터 획득되는 입력(950, 960, 970, 980, 990) 중 제 1 입력(950), 제 2 입력(960, 제 3 입력(970) 및 제 4 입력(990)만을 이용하여 출력 데이터를 생성할 수 있다. 이 경우, 제 5 입력(980)은 출력 데이터 생성에 이용되지 않을 수 있다.The neural network device 100 according to an embodiment may generate output data using some of the inputs 950, 960, 970, 980, and 990 obtained from a plurality of data streams having different delay times. For example, the neural network device 100 includes a first input 950, a second input 960, and Output data may be generated using only the third input 970 and the fourth input 990. In this case, the fifth input 980 may not be used to generate output data.

도 10은 일 실시 예에 따른 뉴럴 네트워크 장치(100)가 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림으로부터 복수개의 영역에 대한 데이터를 획득하는 일 예를 나타내는 도면이다.FIG. 10 is a diagram illustrating an example in which the neural network device 100 acquires data for a plurality of areas from a plurality of data streams having different delay times, according to an embodiment.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 입력 데이터(1000)가 4x4의 이미지 데이터 또는 피처맵인 경우, 입력 데이터(1000)로부터 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림(1054, 1053, 1052, 1051)을 생성하고, 생성된 복수개의 데이터 스트림(1054, 1053, 1052, 1051)으로부터 복수개의 입력(1015, 1025, 1035)을 생성할 수 있다. 예를 들면, 뉴럴 네트워크 장치(100)는 딜레이 타임이 0인 제 1 데이터 스트림(1054), 딜레이 타임이 1인 제 2 데이터 스트림(1053), 딜레이 타임이 4인 제 3 데이터 스트림(1052), 딜레이 타임이 5인 제 4 데이터 스트림(1051)을 입력 데이터(1000)로부터 생성하고, 생성된 제 1 데이터 스트림(1054) 내지 제 4 데이터 스트림(1051)로부터 제 1 입력(1015), 제 2 입력(1025), 제 3 입력(1035) 등을 생성할 수 있다.When the input data 1000 is 4x4 image data or a feature map, the neural network device 100 according to an embodiment generates a plurality of data streams 1054, 1053, and 1052 with different delay times from the input data 1000. , 1051), and a plurality of inputs (1015, 1025, 1035) can be generated from the generated plurality of data streams (1054, 1053, 1052, 1051). For example, the neural network device 100 includes a first data stream 1054 with a delay time of 0, a second data stream 1053 with a delay time of 1, a third data stream 1052 with a delay time of 4, A fourth data stream 1051 with a delay time of 5 is generated from the input data 1000, and a first input 1015 and a second input are generated from the generated first data streams 1054 to 4 data streams 1051. (1025), third input (1035), etc. can be generated.

일 실시 예에 따른 복수개의 입력(1015, 1025, 1035)은 입력 데이터(1000)의 일부를 나타낼 수 있다. 예를 들면, 제 1 입력(1015)은 입력 데이터(1000)의 제 1 영역(1010)에 대한 데이터를 나타내고, 제 2 입력(1025)은 입력 데이터(1000)의 제 2 영역(1020)에 대한 데이터를 나타내고, 제 3 입력(1035)은 입력 데이터(1000)의 제 3 영역(1030)에 대한 데이터를 나타낼 수 있다.A plurality of inputs 1015, 1025, and 1035 according to an embodiment may represent part of the input data 1000. For example, the first input 1015 represents data for the first area 1010 of the input data 1000, and the second input 1025 represents data for the second area 1020 of the input data 1000. Represents data, and the third input 1035 may represent data for the third area 1030 of the input data 1000.

도 11은 일 실시 예에 따른 뉴럴 네트워크 장치(100)가 제 1 입력과 제 2 입력으로부터 출력 데이터를 획득하는 방법을 나타내는 흐름도이다.FIG. 11 is a flowchart illustrating a method by which the neural network device 100 obtains output data from a first input and a second input according to an embodiment.

단계 S1110에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 1 입력과 복수개의 커널 간의 연산을 수행하여 제 1 결과를 획득한다. In step S1110, the neural network device 100 according to an embodiment obtains a first result by performing an operation between the first input and a plurality of kernels.

일 실시 예에 따라, 제 1 입력은 입력 피처맵 또는 입력 이미지 데이터의 제 1 영역에 대한 데이터를 포함할 수 있다. According to one embodiment, the first input may include an input feature map or data for a first area of input image data.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 1 입력과 복수개의 커널 간의 연산을 수행할 수 있다. 예를 들면, 뉴럴 네트워크 장치(100)는 제 1 입력과 제 1 커널(예: 레드에 대한 커널) 간의 연산을 수행하여 제 1-1 결과를 획득하고, 제 1 입력과 제 2 커널(예: 그린에 대한 커널) 간의 연산을 수행하여 제 1-2 결과를 획득하고, 제 1 입력과 제 3 커널(예: 블루에 대한 커널) 간의 연산을 수행하여 제 1-3 결과를 획득할 수 있다. 뉴럴 네트워크 장치(100)는 제 1-1 결과, 제 1-2 결과 및 제 1-3 결과를 이용하여 제 1 결과를 획득할 수 있다. 예를 들면, 뉴럴 네트워크 장치(100)는 제 1-1 결과, 제 1-2 결과 및 제 1-3 결과를 더하여 제 1 결과를 획득할 수 있다.The neural network device 100 according to one embodiment may perform an operation between a first input and a plurality of kernels. For example, the neural network device 100 performs an operation between a first input and a first kernel (e.g., a kernel for red) to obtain a 1-1 result, and performs an operation between the first input and a second kernel (e.g., a kernel for red). The 1-2 result may be obtained by performing an operation between the first input and the third kernel (e.g., the kernel for blue), and the 1-3 result may be obtained by performing the operation between the first input and the third kernel (e.g., the kernel for blue). The neural network device 100 may obtain the first result using the 1-1 result, the 1-2 result, and the 1-3 result. For example, the neural network device 100 may obtain the first result by adding the 1-1 result, the 1-2 result, and the 1-3 result.

단계 S1120에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 1 입력이 수신된 시점에서 제 1 인터벌만큼 딜레이된 시점에 수신된 제 2 입력과 복수개의 커널 간의 연산을 수행하여 제 2 결과를 획득한다. 제 2 결과의 획득에 이용되는 복수개의 커널은 단계 S1110에서 이용된 복수개의 커널과 동일할 수 있다.In step S1120, the neural network device 100 according to an embodiment obtains a second result by performing an operation between the second input received and a plurality of kernels at a time when the first input is delayed by the first interval. do. The plurality of kernels used to obtain the second result may be the same as the plurality of kernels used in step S1110.

일 실시 예에 따라, 제 2 입력은 입력 피처맵 또는 입력 이미지 데이터의 제 2 영역에 대한 데이터를 포함할 수 있다. According to one embodiment, the second input may include an input feature map or data for a second area of the input image data.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 1 입력이 수신된 시점에서 제 1 인터벌만큼 딜레이된 시점에 제 2 입력을 수신할 수 있다. 뉴럴 네트워크 장치(100)는 수신한 제 2 입력과 복수개의 커널 간의 연산을 수행할 수 있다. 예를 들면, 뉴럴 네트워크 장치(100)는 제 2 입력과 제 1 커널(예: 레드에 대한 커널) 간의 연산을 수행하여 제 2-1 결과를 획득하고, 제 2 입력과 제 2 커널(예: 그린에 대한 커널) 간의 연산을 수행하여 제 2-2 결과를 획득하고, 제 2 입력과 제 3 커널(예: 블루에 대한 커널) 간의 연산을 수행하여 제 2-3 결과를 획득할 수 있다. 뉴럴 네트워크 장치(100)는 제 2-1 결과, 제 2-2 결과 및 제 2-3 결과를 이용하여 제 1 결과를 획득할 수 있다. 예를 들면, 뉴럴 네트워크 장치(100)는 제 2-1 결과, 제 2-2 결과 및 제 2-3 결과를 더하여 제 2 결과를 획득할 수 있다. The neural network device 100 according to one embodiment may receive the second input at a time delayed by the first interval from the time the first input is received. The neural network device 100 may perform an operation between the received second input and a plurality of kernels. For example, the neural network device 100 obtains a 2-1 result by performing an operation between the second input and the first kernel (e.g., the kernel for red), and performs an operation between the second input and the second kernel (e.g., the kernel for red). The 2-2 result may be obtained by performing an operation between the second input and the third kernel (e.g., the kernel for blue), and the 2-3 result may be obtained by performing the operation between the second input and the third kernel (e.g., the kernel for blue). The neural network device 100 may obtain the first result using the 2-1 result, the 2-2 result, and the 2-3 result. For example, the neural network device 100 may obtain the second result by adding the 2-1 result, the 2-2 result, and the 2-3 result.

단계 S1130에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 1 결과와 제 2 결과를 이용하여 입력 데이터에 대한 출력 데이터를 획득한다. In step S1130, the neural network device 100 according to an embodiment acquires output data for input data using the first result and the second result.

입력 데이터는 피처맵 또는 이미지 데이터를 포함할 수 있다. 예를 들면, 입력 데이터는 2D 이미지 데이터일 수 있다. 다른 예로, 입력 데이터는 3D 이미지 데이터일 수 있다.Input data may include feature maps or image data. For example, the input data may be 2D image data. As another example, the input data may be 3D image data.

입력 데이터가 이미지 데이터인 경우, 일 실시 예에 따른 프로세서(120)는 제 1 영역에 대한 처리 결과인 제 1 결과와 제 2 영역에 대한 처리 결과인 제 2 결과를 이용하여 입력 데이터에 대한 출력 데이터를 획득할 수 있다. When the input data is image data, the processor 120 according to an embodiment generates output data for the input data using the first result, which is the result of processing for the first area, and the second result, which is the result of processing for the second area. can be obtained.

일 실시 예에 따를 때, 제 1 영역과 제 2 영역은 일부 중첩될 수 있다. 예를 들면 제 1 영역 및 제 2 영역이 2x2의 크기일 때, 1x2 크기의 영역이 제 1 영역과 제 2 영역 간에 중첩될 수 있으나 본 실시 예로 한정되지 않으며 다양한 크기에서 제 1 영역과 제 2 영역이 구현될 수 있다.According to one embodiment, the first area and the second area may partially overlap. For example, when the first area and the second area are 2x2 in size, a 1x2 area may overlap between the first area and the second area, but this is not limited to this embodiment and the first area and the second area can be of various sizes. This can be implemented.

일 실시 예에 따를 때, 제 1 영역과 제 2 영역은 상호 인접할 수 있다. 예를 들면, 제 1 영역의 우측에 제 2 영역이 위치할 수 있다. 다른 예로, 제 1 영역의 아래측에 제 2 영역이 위치할 수 있으나 본 실시 예로 한정되지 않으며 다양한 상호 위치에서 제 1 영역과 제 2 영역이 구현될 수 있다.According to one embodiment, the first area and the second area may be adjacent to each other. For example, the second area may be located to the right of the first area. As another example, the second area may be located below the first area, but this is not limited to this embodiment, and the first area and the second area may be implemented in various mutual positions.

도 12는 일 실시 예에 따른 뉴럴 네트워크 장치(100)가 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림으로부터 출력 데이터를 획득하는 방법을 나타내는 흐름도이다. FIG. 12 is a flowchart illustrating a method by which the neural network device 100 obtains output data from a plurality of data streams having different delay times, according to an embodiment.

단계 S1210에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 서로 다른 딜레이 타임을 갖고 이미지 데이터를 나타내는 복수개의 데이터 스트림을 복수개의 입력단으로부터 수신한다.In step S1210, the neural network device 100 according to an embodiment receives a plurality of data streams representing image data with different delay times from a plurality of input terminals.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 서로 다른 딜레이 타임을 갖고 이미지 데이터를 나타내는 복수개의 데이터 스트림을 획득할 수 있다. 뉴럴 네트워크 장치(100)는 이미지 데이터를 나타내는 입력 데이터로부터 데이터 스트림을 획득하고, 획득한 데이터 스트림을 복수회에 걸쳐 전송함으로써, 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림을 획득할 수 있다.The neural network device 100 according to an embodiment may acquire a plurality of data streams representing image data with different delay times. The neural network device 100 may acquire a data stream from input data representing image data and transmit the obtained data stream multiple times, thereby obtaining a plurality of data streams with different delay times.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 생성된 복수개의 데이터 스트림을 복수개의 입력단을 통해 수신함으로써 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림을 획득할 수 있다.The neural network device 100 according to an embodiment may obtain a plurality of data streams with different delay times by receiving the plurality of generated data streams through a plurality of input terminals.

단계 S1220에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 복수개의 입력단으로부터 수신되는 복수개의 데이터 스트림으로부터 제 1 영역을 나타내는 제 1 입력을 수신한다.In step S1220, the neural network device 100 according to an embodiment receives a first input representing a first area from a plurality of data streams received from a plurality of input terminals.

예를 들면, 뉴럴 네트워크 장치(100)는 복수개의 입력단에서 특정 시점에 획득되는 데이터를 제 1 입력으로 획득할 수 있다. 일 예로 뉴럴 네트워크 장치(100)는 제 6 사이클에 복수개의 입력단에서 획득되는 데이터를 제 1 입력으로 획득할 수 있다. (도 9 및 도 10 참조) 제 1 입력은 이미지 데이터의 제 1 영역을 나타낼 수 있다.For example, the neural network device 100 may obtain data obtained at a specific time from a plurality of input terminals as the first input. As an example, the neural network device 100 may acquire data obtained from a plurality of input terminals in the sixth cycle as the first input. (See FIGS. 9 and 10) The first input may represent a first region of image data.

단계 S1230에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 1 입력과 복수개의 커널 간의 연산을 수행하여 제 1 결과를 획득한다. In step S1230, the neural network device 100 according to an embodiment obtains a first result by performing an operation between the first input and a plurality of kernels.

예를 들면, 제 1 입력을 구성하는 제 1-1 입력과 제 1 커널간의 연산 결과인 제 1-1 연산 결과, 제 1 입력을 구성하는 제 1-2 입력과 제 2 커널간의 연산 결과인 제 1-2 연산 결과, 제 1 입력을 구성하는 제 1-3 입력과 제 3 커널간의 연산 결과인 제 1-3 연산 결과를 이용하여 제 1 결과를 획득할 수 있다. 일 예로, 뉴럴 네트워크 장치(100)는 제 1-1 연산 결과, 제 1-2 연산 결과 및 제 1-3 연산 결과를 더하여 제 1 결과를 생성할 수 있다.For example, the 1-1 operation result is the result of the operation between the 1-1 input constituting the first input and the first kernel, and the 1-1 operation result is the operation result between the 1-2 input constituting the first input and the second kernel. The first result can be obtained using the 1-2 operation result, which is the result of the 1-3 operation between the 1-3 input constituting the first input and the third kernel. As an example, the neural network device 100 may generate a first result by adding the 1-1 operation result, the 1-2 operation result, and the 1-3 operation result.

단계 S1240에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 1 입력이 수신된 시점에서 제 1 인터벌만큼 딜레이된 시점에 복수개의 입력단으로부터 수신되는 복수개의 데이터 스트림으로부터 제 2 입력을 수신한다.In step S1240, the neural network device 100 according to an embodiment receives a second input from a plurality of data streams received from a plurality of input terminals at a time delayed by the first interval from the time the first input is received.

예를 들면, 뉴럴 네트워크 장치(100)는 복수개의 입력단에서 특정 시점에 획득되는 데이터를 제 2 입력으로 획득할 수 있다. 일 예로 뉴럴 네트워크 장치(100)는 제 7 사이클에 복수개의 입력단에서 획득되는 데이터를 제 2 입력으로 획득할 수 있다. (도 9 및 도 10 참조) For example, the neural network device 100 may obtain data obtained at a specific time from a plurality of input terminals as a second input. As an example, the neural network device 100 may acquire data obtained from a plurality of input terminals in the seventh cycle as a second input. (See Figures 9 and 10)

단계 S1250에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 2 입력이 제 2 영역을 나타내는 데이터인 경우 제 2 입력을 유효한 입력으로 결정한다.In step S1250, the neural network device 100 according to an embodiment determines the second input as a valid input when the second input is data representing the second area.

제 2 영역은 제 1 영역에 대한 상대적 위치에 기초하여 결정될 수 있다. The second area may be determined based on its relative position with respect to the first area.

예를 들면, 제 1 영역과 제 2 영역은 일부 중첩될 수 있다. 일 예로, 제 1 영역 및 제 2 영역이 2x2의 크기일 때, 1x2 크기의 영역이 제 1 영역과 제 2 영역 간에 중첩될 수 있다.For example, the first area and the second area may partially overlap. For example, when the first area and the second area are 2x2 in size, a 1x2 area may overlap between the first area and the second area.

다른 예로, 제 1 영역과 제 2 영역은 상호 인접할 수 있다. 예를 들면, 제 1 영역의 우측에 제 2 영역이 위치할 수 있다. 다른 예로, 제 1 영역의 아래측에 제 2 영역이 위치할 수 있다.As another example, the first area and the second area may be adjacent to each other. For example, the second area may be located to the right of the first area. As another example, the second area may be located below the first area.

여러가지 방식 중 기설정된 방식에 따라 제 2 영역이 정해질 수 있으며, 제 2 입력이 제 2 영역을 나타내는 데이터인 경우 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 2 입력을 유효한 입력으로 결정할 수 있다.The second area may be determined according to a preset method among various methods, and when the second input is data representing the second area, the neural network device 100 according to one embodiment may determine the second input as a valid input. there is.

또한 단계 S1210 내지 단계 S1250에서 상술된 것과 유사한 방식으로, 도 10에 도시된 바와 같이, 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 7 사이클에 복수개의 입력단에서 획득되는 데이터를 유효한 제 3 입력으로 획득하고, 8 사이클에 복수개의 입력단에서 획득되는 데이터를 유효한 제 4 입력으로 획득하고, 10 사이클에 복수개의 입력단에서 획득되는 데이터를 유효한 제 5 입력으로 획득하고, 11 사이클에 복수개의 입력단에서 획득되는 데이터를 유효한 제 6 입력으로 획득하고, 12 사이클에 복수개의 입력단에서 획득되는 데이터를 유효한 제 7 입력으로 획득하고, 14 사이클에 복수개의 입력단에서 획득되는 데이터를 유효한 제 8 입력으로 획득하고, 15 사이클에 복수개의 입력단에서 획득되는 데이터를 유효한 제 9 입력으로 획득할 수 있다.Additionally, in a manner similar to that described above in steps S1210 to S1250, as shown in FIG. 10, the neural network device 100 according to one embodiment converts data obtained from a plurality of input terminals in 7 cycles into a valid third input. In cycle 8, data obtained from a plurality of input terminals is acquired as a valid fourth input, in cycle 10, data obtained from a plurality of input terminals are acquired as a valid fifth input, and in cycle 11, data obtained from a plurality of input terminals are acquired as a valid fifth input. Data is acquired as a valid sixth input, data acquired from a plurality of input terminals is acquired as a valid seventh input in cycle 12, data acquired from a plurality of input terminals is acquired as a valid eighth input in cycle 14, and data obtained from a plurality of input terminals is acquired as a valid eighth input in cycle 15. Data obtained from a plurality of input terminals can be obtained as a valid ninth input.

단계 S1260에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 2 입력이 유효한 입력인 경우, 제 2 입력과 복수개의 커널 간의 연산을 수행하여 제 2 결과를 획득한다.In step S1260, when the second input is a valid input, the neural network device 100 according to an embodiment performs an operation between the second input and a plurality of kernels to obtain a second result.

예를 들면, 제 2 입력을 구성하는 제 2-1 입력과 제 1 커널간의 연산 결과인 제 2-1 연산 결과, 제 2 입력을 구성하는 제 2-2 입력과 제 2 커널간의 연산 결과인 제 2-2 연산 결과, 제 2 입력을 구성하는 제 2-3 입력과 제 3 커널간의 연산 결과인 제 2-3 연산 결과를 이용하여 제 2 결과를 획득할 수 있다. 일 예로, 뉴럴 네트워크 장치(100)는 제 2-1 연산 결과, 제 2-2 연산 결과 및 제 2-3 연산 결과를 더하여 제 2 결과를 생성할 수 있다.For example, the 2-1 operation result is the result of the operation between the 2-1 input constituting the second input and the first kernel, and the 2-1 operation result is the operation result between the 2-2 input constituting the second input and the second kernel. The second result can be obtained using the 2-2 operation result, which is the result of the operation between the 2-3 input constituting the second input and the third kernel. As an example, the neural network device 100 may generate a second result by adding the 2-1st operation result, the 2-2nd operation result, and the 2-3th operation result.

단계 S1270에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 단계 S1230에서 획득된 제 1 결과와 단계 S1260에서 획득된 제 2 결과를 이용하여 입력 데이터에 대한 출력 데이터를 획득한다.In step S1270, the neural network device 100 according to an embodiment acquires output data for input data using the first result obtained in step S1230 and the second result obtained in step S1260.

출력 데이터는 입력 데이터와 복수개의 커널과의 연산 결과를 포함할 수 있으며, 이미지 데이터에 대한 연산 결과인 출력 데이터가 한번에(예: 한 사이클에) 출력될 수도 있고, 순차적으로 출력될 수도 있다.Output data may include input data and results of operations with a plurality of kernels, and output data that is the result of operations on image data may be output at once (e.g., in one cycle) or sequentially.

도 13은 일 실시 예에 따른 뉴럴 네트워크 장치(100)가 제 1 입력 내지 제 3 입력을 이용하여 출력 데이터를 획득하는 방법을 나타내는 흐름도이다.FIG. 13 is a flowchart illustrating a method by which the neural network device 100 acquires output data using first to third inputs according to an embodiment.

단계 S1310 및 단계 S1320은 각각 단계 S1110 및 단계 S1120에 대응되므로 전체적인 설명을 간단히 하기 위해 상세한 설명을 생략한다. 단계 S1310 및 단계 S1320에 대해서는 상술된 단계 S1110 및 단계 S1120에 대한 설명을 참조할 수 있다.Since step S1310 and step S1320 correspond to step S1110 and step S1120, respectively, detailed description is omitted to simplify the overall description. For step S1310 and step S1320, refer to the description of step S1110 and step S1120 described above.

단계 S1330에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 2 입력이 수신된 시점에서 제 2 인터벌만큼 딜레이된 시점에 입력 데이터에 포함되는 제 3 입력을 수신한다.In step S1330, the neural network device 100 according to an embodiment receives the third input included in the input data at a time delayed by the second interval from the time the second input is received.

제 2 인터벌은 제 1 인터벌과는 상이할 수 있다. 예를 들면 제 1 인터벌은 제 1 사이클에 해당할 수 있고 제 2 인터벌은 제 2 사이클에 해당할 수 있다.The second interval may be different from the first interval. For example, the first interval may correspond to the first cycle and the second interval may correspond to the second cycle.

단계 S1340에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 3 입력과 복수개의 커널 간의 연산을 수행하여 제 3 결과를 획득한다.In step S1340, the neural network device 100 according to an embodiment obtains a third result by performing an operation between the third input and a plurality of kernels.

제 3 결과의 획득에 이용되는 복수개의 커널은 단계 S1310에서 이용된 복수개의 커널과 동일할 수 있다.The plurality of kernels used to obtain the third result may be the same as the plurality of kernels used in step S1310.

일 실시 예에 따라, 제 3 입력은 입력 피처맵 또는 입력 이미지 데이터의 제 3 영역에 대한 데이터를 포함할 수 있다. According to one embodiment, the third input may include an input feature map or data for a third area of input image data.

일 실시 예에 따른 뉴럴 네트워크 장치(100)는 수신한 제 3 입력과 복수개의 커널 간의 연산을 수행할 수 있다. 예를 들면, 뉴럴 네트워크 장치(100)는 제 3 입력과 제 1 커널(예: 레드에 대한 커널) 간의 연산을 수행하여 제 3-1 결과를 획득하고, 제 3 입력과 제 2 커널(예: 그린에 대한 커널) 간의 연산을 수행하여 제 3-2 결과를 획득하고, 제 3 입력과 제 3 커널(예: 블루에 대한 커널) 간의 연산을 수행하여 제 3-3 결과를 획득할 수 있다. 뉴럴 네트워크 장치(100)는 제 3-1 결과, 제 3-2 결과 및 제 3-3 결과를 이용하여 제 3 결과를 획득할 수 있다. 예를 들면, 뉴럴 네트워크 장치(100)는 제 3-1 결과, 제 3-2 결과 및 제 3-3 결과를 더하여 제 3 결과를 획득할 수 있다. The neural network device 100 according to one embodiment may perform an operation between the received third input and a plurality of kernels. For example, the neural network device 100 performs an operation between a third input and a first kernel (e.g., a kernel for red) to obtain a 3-1 result, and performs an operation between the third input and a second kernel (e.g., a kernel for red). The 3-2 result may be obtained by performing an operation between the third input and the third kernel (e.g., the kernel for blue), and the 3-3 result may be obtained by performing the operation between the third input and the third kernel (e.g., the kernel for blue). The neural network device 100 may obtain the third result using the 3-1st result, the 3-2nd result, and the 3-3rd result. For example, the neural network device 100 may obtain the third result by adding the 3-1 result, the 3-2 result, and the 3-3 result.

단계 S1350에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 제 1 결과, 제 2 결과 및 제 3 결과를 이용하여 출력 데이터를 획득한다.In step S1350, the neural network device 100 according to an embodiment acquires output data using the first result, the second result, and the third result.

출력 데이터는 입력 데이터와 복수개의 커널과의 연산 결과를 포함할 수 있으며, 이미지 데이터에 대한 연산 결과인 출력 데이터가 한번에(예: 한 사이클에) 출력될 수도 있고, 순차적으로 출력될 수도 있다. 예를 들면, 제 1 결과, 제 2 결과 및 제 3 결과가 순차적으로 출력될 수 있다. Output data may include input data and results of operations with a plurality of kernels, and output data that is the result of operations on image data may be output at once (e.g., in one cycle) or sequentially. For example, the first result, the second result, and the third result may be output sequentially.

도 14는 일 실시 예에 따른 뉴럴 네트워크 장치(100)가 입력 데이터로부터 출력 데이터를 획득하는 방법을 나타내는 흐름도이다.FIG. 14 is a flowchart illustrating a method by which the neural network device 100 obtains output data from input data according to an embodiment.

단계 S1410에서 일 실시 예에 따른 뉴럴 네트워크 장치(100) 는 입력 데이터로부터 데이터 스트림을 생성한다. 단계 S1410은 첫번째 레이어에서 수행될 수 있다.In step S1410, the neural network device 100 according to an embodiment generates a data stream from input data. Step S1410 may be performed on the first layer.

단계 S1420에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 단계 S1410에서 생성된 데이터 스트림을 복제하고 시간적으로 재정렬 함으로써 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림을 획득한다.In step S1420, the neural network device 100 according to an embodiment acquires a plurality of data streams with different delay times by duplicating and temporally rearranging the data stream generated in step S1410.

단계 S1430에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 서로 다른 딜레이 타임을 갖는 복수개의 데이터 스트림을 특정 커널에 존재하는 메모리 어레이에 입력으로 이용하여 출력 스트림에 대한 연산을 수행한다. 단계 S1420, S1430은 중간 레이어서 수행될 수 있으며, 복수회에 걸쳐 반복적으로 수행될 수 있다.In step S1430, the neural network device 100 according to an embodiment uses a plurality of data streams with different delay times as input to a memory array existing in a specific kernel to perform an operation on the output stream. Steps S1420 and S1430 may be performed in the middle layer and may be performed repeatedly multiple times.

단계 S1440에서 일 실시 예에 따른 뉴럴 네트워크 장치(100)는 여러 사이클에 걸쳐 발생되는 출력 스트림으로부터 출력 데이터를 획득한다. 또한 획득된 출력 데이터를 통해 출력되는 이미지를 생성할 수 있다. 예를 들면 뉴럴 네트워크 장치(100)는 3D 이미지를 생성할 수 있다. 또한, 단계 S1440은 마지막 레이어에서 수행될 수 있다.In step S1440, the neural network device 100 according to an embodiment acquires output data from an output stream generated over several cycles. Additionally, an image to be output can be created using the acquired output data. For example, the neural network device 100 can generate a 3D image. Additionally, step S1440 may be performed in the last layer.

도 15a 내지 15b는 일 실시 예에 따른 뉴로모픽(neuromorphic) 장치의 동작 방법을 설명하기 위한 도면이다.15A to 15B are diagrams for explaining a method of operating a neuromorphic device according to an embodiment.

도 15a를 참조하면, 뉴럴 네트워크 장치는 복수의 코어들을 포함할 수 있으며, 각각의 코어들은 RCA(Resistive Crossbar Memory Arrays)로 구현될 수 있다. 구체적으로, 각각의 코어는 복수의 프리 시냅틱 뉴런(presynaptic neuron, 1510), 복수의 포스트 시냅틱 뉴런(postsynaptic neuron, 1520), 및 복수의 프리 시냅틱 뉴런(1510)과 복수의 포스트 시냅틱 뉴런(1520) 사이의 각각의 연결을 제공하는 시냅스(1530)를 포함할 수 있다. Referring to FIG. 15A, a neural network device may include a plurality of cores, and each core may be implemented as RCA (Resistive Crossbar Memory Arrays). Specifically, each core includes a plurality of presynaptic neurons (1510), a plurality of postsynaptic neurons (1520), and a plurality of presynaptic neurons (1510) and a plurality of post synaptic neurons (1520). It may include a synapse 1530 that provides each connection.

일 실시 예에서 뉴럴 네트워크 장치의 코어는, 4개의 프리 시냅틱 뉴런(1510), 4개의 포스트 시냅틱 뉴런(1520) 및 16개의 시냅스(1530)를 포함하고 있으나, 이들 개수는 다양하게 변형될 수 있다. 프리 시냅틱 뉴런(1510)의 개수가 N개(여기서, N은 2 이상의 자연수임)이고, 포스트 시냅틱 뉴런(1520)의 개수가 M개(여기서, M은 2 이상의 자연수이고, N과 같거나 다를 수 있음)인 경우, N*M개의 시냅스(1530)가 매트릭스 형태로 배열될 수 있다. In one embodiment, the core of the neural network device includes 4 pre-synaptic neurons 1510, 4 post-synaptic neurons 1520, and 16 synapses 1530, but these numbers may vary. The number of pre-synaptic neurons 1510 is N (where N is a natural number of 2 or more), and the number of post-synaptic neurons 1520 is M (where M is a natural number of 2 or more and may be equal to or different from N). In this case, N*M synapses 1530 may be arranged in a matrix form.

구체적으로, 복수의 프리 시냅틱 뉴런(1510) 각각과 연결되고 제1 방향(예를 들어, 가로 방향)으로 연장하는 배선(1512)과, 복수의 포스트 시냅틱 뉴런(1520) 각각과 연결되고 제1 방향과 교차하는 제2 방향(예를 들어, 세로 방향)으로 연장하는 배선(1522)이 제공될 수 있다. 이하, 설명의 편의를 위하여, 제1 방향으로 연장하는 배선(1512)을 로우 배선(row line)이라 하고, 제2 방향으로 연장하는 배선(1522)을 컬럼 배선(column line)이라 하기로 한다. 복수의 시냅스(1530)는 로우 배선(1512)과 컬럼 배선(1522)의 교차점마다 배치되어 대응하는 로우 배선(1512)과 대응하는 컬럼 배선(1522)을 서로 연결시킬 수 있다.Specifically, a wiring 1512 connected to each of a plurality of pre-synaptic neurons 1510 and extending in a first direction (e.g., horizontal direction), and a wiring 1512 connected to each of a plurality of post-synaptic neurons 1520 and extending in the first direction. A wiring 1522 extending in a second direction (eg, vertical direction) that intersects may be provided. Hereinafter, for convenience of explanation, the wiring 1512 extending in the first direction will be referred to as a row line, and the wiring 1522 extending in the second direction will be referred to as a column line. A plurality of synapses 1530 may be disposed at each intersection of the row wiring 1512 and the column wiring 1522 to connect the corresponding row wiring 1512 and the corresponding column wiring 1522 to each other.

프리 시냅틱 뉴런(1510)은 신호 예컨대, 특정 데이터에 해당하는 신호를 생성하여 로우 배선(1512)으로 보내는 역할을 수행하고, 포스트 시냅틱 뉴런(1520)은 시냅스 소자(1530)를 거친 시냅틱 신호를 컬럼 배선(1522)을 통하여 수신하고 처리하는 역할을 수행할 수 있다. 프리 시냅틱 뉴런(1510)은 액손(axon)에 대응하고, 포스트 시냅틱 뉴런(1520)은 뉴런(neuron)에 대응할 수 있다. 그러나, 프리 시냅틱 뉴런인지 포스트 시냅틱 뉴런인지 여부는 다른 뉴런과의 상대적인 관계에 의해 결정될 수 있다. 예컨대, 프리 시냅틱 뉴런(1510)이 다른 뉴런과의 관계에서 시냅틱 신호를 수신하는 경우 포스트 시냅틱 뉴런으로 기능할 수 있다. 유사하게, 포스트 시냅틱 뉴런(1520)이 다른 뉴런과의 관계에서 신호를 보내는 경우 프리 시냅틱 뉴런으로 기능할 수 있다. 프리 시냅틱 뉴런(1510) 및 포스트 시냅틱 뉴런(1520)은 CMOS 등 다양한 회로로 구현될 수 있다.The pre-synaptic neuron 1510 generates a signal, for example, a signal corresponding to specific data and sends it to the row wiring 1512, and the post-synaptic neuron 1520 transmits the synaptic signal that has passed through the synaptic element 1530 to the column wiring. It can perform the role of receiving and processing through (1522). The pre-synaptic neuron 1510 may correspond to an axon, and the post-synaptic neuron 1520 may correspond to a neuron. However, whether a neuron is pre-synaptic or postsynaptic can be determined by its relative relationship to other neurons. For example, when the pre-synaptic neuron 1510 receives synaptic signals in a relationship with another neuron, it may function as a post-synaptic neuron. Similarly, a post-synaptic neuron 1520 may function as a pre-synaptic neuron when it sends signals in relationship to other neurons. The pre-synaptic neuron 1510 and the post-synaptic neuron 1520 may be implemented with various circuits such as CMOS.

프리 시냅틱 뉴런(1510)과 포스트 시냅틱 뉴런(1520) 사이의 연결은 시냅스(1530)를 통하여 이루어질 수 있다. 여기서, 시냅스(1530)는 양단에 인가되는 전기적 펄스 예컨대, 전압 또는 전류에 따라 전기적 전도도(electrical conductance) 혹은 웨이트(weight)가 변하는 소자이다.The connection between the pre-synaptic neuron 1510 and the post-synaptic neuron 1520 may be made through the synapse 1530. Here, the synapse 1530 is an element whose electrical conductance or weight changes depending on electrical pulses, such as voltage or current, applied to both ends.

시냅스(1530)는 예컨대, 가변 저항 소자를 포함할 수 있다. 가변 저항 소자는 양단에 인가되는 전압 또는 전류에 따라 서로 다른 저항 상태 사이에서 스위칭할 수 있는 소자로서, 복수의 저항 상태를 가질 수 있는 다양한 물질 예컨대, 전이 금속 산화물, 페로브스카이트(perovskite)계 물질 등과 같은 금속 산화물, 칼코게나이드(chalcogenide)계 물질 등과 같은 상변화 물질, 강유전 물질, 강자성 물질 등을 포함하는 단일막 구조 또는 다중막 구조를 가질 수 있다. 가변 저항 소자 및/또는 시냅스(1530)가 고저항 상태에서 저저항 상태로 변하는 동작을 셋(set) 동작이라 하고, 저저항 상태에서 고저항 상태로 변하는 동작을 리셋(reset) 동작이라 할 수 있다.The synapse 1530 may include, for example, a variable resistance element. A variable resistance element is an element that can switch between different resistance states depending on the voltage or current applied to both ends, and is made of various materials that can have multiple resistance states, such as transition metal oxides and perovskite systems. It may have a single-layer structure or a multi-layer structure including metal oxides such as metal oxides, phase change materials such as chalcogenide-based materials, ferroelectric materials, and ferromagnetic materials. The operation in which the variable resistance element and/or synapse 1530 changes from a high resistance state to a low resistance state is called a set operation, and the operation in which it changes from a low resistance state to a high resistance state can be called a reset operation. .

단, 코어의 시냅스(1530)는, RRAM, PRAM, FRAM, MRAM 등의 메모리 장치에 이용되는 가변 저항 소자와 달리, 셋 동작과 리셋 동작에서 급격한(abrupt) 저항 변화가 없고, 입력되는 전기적 펄스의 개수에 따라 전도도가 점진적으로 변화하는 아날로그 거동(analog behavior)을 보이는 등, 메모리에서의 가변 저항 소자와 구별되는 여러가지 특성을 갖도록 구현될 수 있다. 이는 메모리에서 가변 저항 소자에 요구되는 특성과 뉴럴 네트워크 장치의 코어에서 시냅스(1530)에 요구되는 특성이 서로 상이하기 때문이다. However, unlike the variable resistance elements used in memory devices such as RRAM, PRAM, FRAM, and MRAM, the synapse 1530 of the core does not have an abrupt change in resistance during set and reset operations and does not change the resistance of the input electrical pulse. It can be implemented to have various characteristics that are distinct from variable resistance elements in memory, such as showing analog behavior in which conductivity gradually changes depending on the number. This is because the characteristics required for the variable resistance element in the memory and the characteristics required for the synapse 1530 in the core of the neural network device are different from each other.

위와 같은 뉴럴 네트워크 장치의 동작을 도 15b를 참조하여 설명하면 아래와 같다. 설명의 편의를 위하여 로우 배선(1512)을 위쪽에서부터 순서대로 제1 로우 배선(1512A), 제2 로우 배선(1512B), 제3 로우 배선(1512C) 및 제4 로우 배선(1512D)이라 칭할 수 있고, 컬럼 배선(1522)을 좌측에서부터 순서대로 제1 컬럼 배선(1522A), 제2 컬럼 배선(1522B), 제3 컬럼 배선(1522C) 및 제4 컬럼 배선(1522D)이라 칭할 수 있다.The operation of the above neural network device is explained with reference to FIG. 15B as follows. For convenience of explanation, the row wiring 1512 may be referred to as a first row wiring 1512A, a second row wiring 1512B, a third row wiring 1512C, and a fourth row wiring 1512D in order from the top. , the column wiring 1522 may be referred to as a first column wiring 1522A, a second column wiring 1522B, a third column wiring 1522C, and a fourth column wiring 1522D in that order from the left.

도 15b를 참조하면, 최초 상태에서, 시냅스(1530) 전부는 전도도가 상대적으로 낮은 상태 즉, 고저항 상태에 있을 수 있다. 복수의 시냅스(1530)의 적어도 일부가 저저항 상태인 경우, 이들을 고저항 상태로 만드는 초기화 동작이 추가로 필요할 수 있다. 복수의 시냅스(1530) 각각은 저항 및/또는 전도도 변화에 요구되는 소정의 임계값을 가질 수 있다. 보다 구체적으로, 각 시냅스(1530)의 양단에 소정 임계값보다 작은 크기의 전압 또는 전류가 인가되면 시냅스(1530)의 전도도는 변하지 않고, 시냅스(1530)에 소정 임계값보다 큰 전압 또는 전류가 인가되면 시냅스(1530)의 전도도는 변화할 수 있다.Referring to FIG. 15B, in the initial state, all of the synapses 1530 may be in a state of relatively low conductivity, that is, a high resistance state. If at least some of the plurality of synapses 1530 are in a low-resistance state, an additional initialization operation may be required to bring them into a high-resistance state. Each of the plurality of synapses 1530 may have a predetermined threshold required for change in resistance and/or conductance. More specifically, when a voltage or current smaller than a predetermined threshold is applied to both ends of each synapse 1530, the conductivity of the synapse 1530 does not change, and a voltage or current larger than the predetermined threshold is applied to the synapse 1530. When this happens, the conductivity of the synapse 1530 may change.

이 상태에서, 특정 데이터를 특정 컬럼 배선(1522)의 결과로 출력하는 동작을 수행하기 위하여, 프리 시냅틱 회로(1510)의 출력에 대응하여 특정 데이터에 해당하는 입력 신호가 로우 배선(1512)으로 들어올 수 있다. 이때, 입력 신호는 로우 배선(1512) 각각에 대한 전기적 펄스의 인가로 나타날 수 있다. 예컨대, 로우 배선(1512)으로 '0011'의 데이터에 해당하는 입력 신호가 들어오는 경우, '0'에 대응하는 로우 배선(1512) 예컨대, 제1 및 제2 로우 배선(1512A, 1512B)에는 전기적 펄스가 인가되지 않고, '1'에 대응하는 로우 배선(1512) 예컨대, 제3 및 제4 로우 배선(1512C, 1512D)에만 전기적 펄스가 인가될 수 있다. 이때, 컬럼 배선(1522)은 출력을 위하여 적절한 전압 또는 전류로 구동될 수 있다.In this state, in order to perform an operation of outputting specific data as a result of the specific column wiring 1522, an input signal corresponding to specific data is input to the row wiring 1512 in response to the output of the pre-synaptic circuit 1510. You can. At this time, the input signal may appear as an electrical pulse applied to each row wiring 1512. For example, when an input signal corresponding to data of '0011' is input to the row wiring 1512, an electrical pulse is generated in the row wiring 1512 corresponding to '0', for example, the first and second row wirings 1512A and 1512B. is not applied, and an electrical pulse may be applied only to the row wiring 1512 corresponding to '1', for example, the third and fourth row wirings 1512C and 1512D. At this time, the column wire 1522 may be driven with an appropriate voltage or current for output.

일례로서, 특정 데이터를 출력할 컬럼 배선(1522)이 이미 정하여진 경우, 이 컬럼 배선(1522)은 '1'에 대응하는 로우 배선(1512)과의 교차점에 위치하는 시냅스(1530)가 셋 동작시 요구되는 전압(이하, 셋 전압) 이상의 크기를 갖는 전압을 인가받도록 구동되고, 나머지 컬럼 배선(1522)은 나머지 시냅스(1530)가 셋 전압보다 작은 크기의 전압을 인가받도록 구동될 수 있다. 예컨대, 셋 전압의 크기가 Vset이고, '0011'의 데이터를 출력할 컬럼 배선(1522)이 제3 컬럼 배선(1522C)으로 정하여진 경우, 제3 컬럼 배선(1522C)과 제3 및 제4 로우 배선(1512C, 1512D)과의 교차점에 위치하는 제1 및 제2 시냅스(1530A, 1530B)가 Vset 이상의 전압을 인가받도록, 제3 및 제4 로우 배선(1512C, 1512D)에 인가되는 전기적 펄스의 크기는 Vset 이상일 수 있고 제3 컬럼 배선(1522C)에 인가되는 전압은 0V일 수 있다. 그에 따라 제1 및 제2 시냅스(1530A, 1530B)는 저저항 상태가 될 수 있다. 저저항 상태의 제1 및 제2 시냅스(1530A, 1530B)의 전도도는 전기적 펄스의 개수가 증가할수록 점진적으로 증가할 수 있다. 인가되는 전기적 펄스의 크기 및 폭은 실질적으로 일정할 수 있다. 제1 및 제2 시냅스(1530A, 1530B)를 제외한 나머지 시냅스(1530)는 Vset 보다 작은 전압을 인가받도록, 나머지 컬럼 배선 즉, 제1, 제2 및 제4 컬럼 배선(1522A, 1522B, 1522D)에 인가되는 전압은 0V와 Vset 사이의 값 예컨대, 1/2Vset의 값을 가질 수 있다. 그에 따라, 제1 및 제2 시냅스(1530A, 1530B)를 제외한 나머지 시냅스(1530)의 저항 상태는 변화하지 않을 수 있다. 이러한 경우의 전류 또는 전자의 흐름은 점선 화살표로 나타내었다.As an example, when the column wire 1522 to output specific data has already been determined, the synapse 1530 located at the intersection of this column wire 1522 with the row wire 1512 corresponding to '1' performs the set operation. It may be driven to receive a voltage greater than the required voltage (hereinafter referred to as set voltage), and the remaining column wiring 1522 may be driven to allow the remaining synapses 1530 to receive a voltage smaller than the set voltage. For example, if the size of the set voltage is Vset and the column wire 1522 to output data of '0011' is set to the third column wire 1522C, the third column wire 1522C and the third and fourth rows The size of the electrical pulse applied to the third and fourth row wires 1512C and 1512D so that the first and second synapses 1530A and 1530B located at the intersection with the wires 1512C and 1512D receive a voltage equal to or higher than Vset. may be greater than Vset and the voltage applied to the third column wiring 1522C may be 0V. Accordingly, the first and second synapses 1530A and 1530B may be in a low resistance state. The conductivity of the first and second synapses 1530A and 1530B in a low-resistance state may gradually increase as the number of electrical pulses increases. The size and width of the applied electrical pulse may be substantially constant. Except for the first and second synapses 1530A and 1530B, the remaining synapses 1530 are connected to the remaining column wirings, that is, the first, second and fourth column wirings 1522A, 1522B and 1522D, so that a voltage smaller than Vset is applied. The applied voltage may have a value between 0V and Vset, for example, 1/2Vset. Accordingly, the resistance state of the remaining synapses 1530 except for the first and second synapses 1530A and 1530B may not change. The current or electron flow in this case is indicated by a dotted arrow.

다른 일례로서, 특정 데이터를 출력할 컬럼 배선(1522)이 정하여져 있지 않을 수도 있다. 이러한 경우, 특정 데이터에 해당하는 전기적 펄스를 로우 배선(1512)으로 인가하면서 컬럼 배선(1522) 각각에 흐르는 전류를 측정하여 가장 먼저 소정 임계 전류에 도달하는 컬럼 배선(1522) 예컨대, 제3 컬럼 배선(1522C)이 이 특정 데이터를 출력한 컬럼 배선(1522)이 될 수 있다.As another example, the column wiring 1522 to output specific data may not be determined. In this case, while applying an electrical pulse corresponding to specific data to the row wiring 1512, the current flowing through each of the column wirings 1522 is measured to determine the column wiring 1522 that reaches a predetermined threshold current first, for example, the third column wiring. (1522C) may be the column wiring 1522 that outputs this specific data.

이상으로 설명한 방식에 의하여, 서로 다른 데이터가 서로 다른 컬럼 배선(1522)에 각각 출력될 수 있다.Using the method described above, different data can be output to different column wires 1522, respectively.

도 16a 내지 도 16b는 일 실시 예에 따른 벡터-행렬 곱셈과 뉴럴 네트워크 장치에서 수행되는 연산을 비교하기 위한 도면이다.16A to 16B are diagrams for comparing vector-matrix multiplication and operations performed in a neural network device according to an embodiment.

도 16a 내지 도 16b는 일 실시 예에 따른 벡터-행렬 곱셈과 뉴럴 네트워크 장치에서 수행되는 연산을 비교하기 위한 도면이다.16A to 16B are diagrams for comparing vector-matrix multiplication and operations performed in a neural network device according to an embodiment.

먼저 도 16a를 참조하면, 입력 피처맵과 커널 간의 컨벌루션 연산은 벡터-행렬 곱셈(vector-matrix multiplication)을 이용하여 수행될 수 있다. 예를 들어, 입력 피처맵의 픽셀 데이터는 행렬 X(1610)로 표현될 수 있고, 커널 값들은 행렬 W(1611)로 표현될 수 있다. 출력 피처맵의 픽셀 데이터는, 행렬 X(1610)와 행렬 W(1611) 간의 곱셈 연산 결과 값인 행렬 Y(1612)로 표현될 수 있다. First, referring to FIG. 16A, the convolution operation between the input feature map and the kernel can be performed using vector-matrix multiplication. For example, pixel data of the input feature map can be expressed as a matrix X (1610), and kernel values can be expressed as a matrix W (1611). Pixel data of the output feature map can be expressed as matrix Y (1612), which is the result of a multiplication operation between matrix X (1610) and matrix W (1611).

도 16b를 참조하면, 뉴럴 네트워크 장치의 코어를 이용하여 벡터 곱셈 연산이 수행될 수 있다. 도 16a와 비교하여 설명하면, 입력 피처맵의 픽셀 데이터는 코어의 입력 값으로 수신될 수 있으며, 입력 값은 전압(1620)일 수 있다. 또한, 커널 값들은 코어의 시냅스 즉, 메모리 셀에 저장될 수 있으며, 메모리 셀에 저장된 커널 값들은 컨덕턴스(1621)일 수 있다. 따라서, 코어의 출력 값은, 전압(1620) 및 컨덕턴스(1621) 간의 곱셈 연산 결과 값인 전류(1622)로 표현될 수 있다.Referring to FIG. 16b, a vector multiplication operation can be performed using the core of a neural network device. In comparison with FIG. 16A, pixel data of the input feature map may be received as an input value of the core, and the input value may be a voltage 1620. Additionally, kernel values may be stored in the synapse of the core, that is, a memory cell, and the kernel values stored in the memory cell may be conductance 1621. Accordingly, the output value of the core can be expressed as a current 1622, which is the result of a multiplication operation between the voltage 1620 and the conductance 1621.

도 17은 일 실시 예에 따른 뉴럴 네트워크 장치에서 컨벌루션 연산이 수행되는 예시를 설명하기 위한 도면이다.FIG. 17 is a diagram for explaining an example of a convolution operation being performed in a neural network device according to an embodiment.

뉴럴 네트워크 장치는 입력 피처맵(1710)의 픽셀 데이터를 수신할 수 있고, 뉴럴 네트워크 장치의 코어(1700)는 RCA(Resistive Crossbar Memory Arrays)로 구현될 수 있다.The neural network device can receive pixel data of the input feature map 1710, and the core 1700 of the neural network device can be implemented with RCA (Resistive Crossbar Memory Arrays).

일 실시 예에서 코어(1700)가 NxM 크기의 행렬인 경우(N 및 M은 2 이상의 자연수임), 입력 피처맵(1710)의 픽셀 데이터 개수는 코어(1700)의 열(M)의 개수보다 작거나 같을 수 있다. 입력 피처맵(1710)의 픽셀 데이터는 부동 소수점 포맷 또는 고정 소수점 포맷의 파라미터일 수 있다. 한편, 다른 실시 예에서 입력 피처맵(1710)의 픽셀 데이터 개수는 코어(1700)의 열(M) 수보다 클 수 있으며, 이에 대해서는 도 18에서 상세히 설명하기로 한다. In one embodiment, when the core 1700 is a matrix of size NxM (N and M are natural numbers of 2 or more), the number of pixel data of the input feature map 1710 is less than the number of columns (M) of the core 1700. It may be the same. Pixel data of the input feature map 1710 may be parameters in floating point format or fixed point format. Meanwhile, in another embodiment, the number of pixel data of the input feature map 1710 may be larger than the number of columns (M) of the core 1700, which will be described in detail in FIG. 18.

뉴럴 네트워크 장치는 디지털 신호 형태의 픽셀 데이터를 수신할 수 있으며, DAC(Digital Analog Converter, 1720)를 이용하여, 수신된 픽셀 데이터를 아날로그 신호 형태의 전압으로 변환할 수 있다. 입력 피처맵(1710)의 픽셀 데이터는 1비트, 4비트 및 8비트 해상도(resolution) 등 다양한 비트 해상도 값을 가질 수 있다. 일 실시 예에서, 뉴럴 네트워크 장치는 DAC(1720)를 이용하여 픽셀 데이터를 전압으로 변환한 후, 전압을 코어(1700)의 입력 값(1701)으로 수신할 수 있다.A neural network device can receive pixel data in the form of a digital signal and, using a DAC (Digital Analog Converter, 1720), convert the received pixel data into a voltage in the form of an analog signal. Pixel data of the input feature map 1710 may have various bit resolution values, such as 1-bit, 4-bit, and 8-bit resolution. In one embodiment, the neural network device may convert pixel data into voltage using the DAC 1720 and then receive the voltage as the input value 1701 of the core 1700.

또한, 뉴럴 네트워크 장치의 코어(1700)에는 학습된 커널 값들이 저장될 수 있다. 커널 값들은 코어의 메모리 셀에 저장될 수 있으며 메모리 셀에 저장된 커널 값들은 컨덕턴스(1702)일 수 있다. 이 때, 뉴럴 네트워크 장치는 전압(1701)과 컨덕턴스(1702) 간의 벡터 곱셈 연산을 수행함으로써 출력 값을 산출할 수 있으며, 출력 값은 전류(1703)로 표현될 수 있다. 즉, 뉴럴 네트워크 장치는 코어(1700)를 이용하여 입력 피처맵과 커널 간의 컨벌루션 연산 결과와 동일한 결과 값을 출력할 수 있다.Additionally, learned kernel values may be stored in the core 1700 of the neural network device. Kernel values may be stored in a memory cell of the core, and the kernel values stored in the memory cell may be conductance 1702. At this time, the neural network device can calculate the output value by performing a vector multiplication operation between the voltage 1701 and the conductance 1702, and the output value can be expressed as a current 1703. That is, the neural network device can use the core 1700 to output the same result as the result of the convolution operation between the input feature map and the kernel.

코어(1700)에서 출력된 전류(1703)는 아날로그 신호이므로, 전류(1703)를 다른 코어의 입력 데이터로 사용하기 위해 뉴럴 네트워크 장치는 ADC(Analog Digital Converter, 1730)를 이용할 수 있다. 뉴럴 네트워크 장치는 ADC(1730)를 이용하여, 아날로그 신호인 전류(1703)를 디지털 신호로 변환할 수 있다. 일 실시 예에서 뉴럴 네트워크 장치는 ADC(1730)를 이용하여, 입력 피처맵(1710)의 픽셀 데이터와 동일한 비트 해상도를 갖도록 전류(1703)를 디지털 신호로 변환할 수 있다. 예를 들어, 입력 피처맵(1710)의 픽셀 데이터가 1비트 해상도인 경우, 뉴럴 네트워크 장치는 ADC(1730)를 이용하여 전류(1703)를 1비트 해상도의 디지털 신호로 변환할 수 있다.Since the current 1703 output from the core 1700 is an analog signal, the neural network device can use an analog digital converter (ADC) 1730 to use the current 1703 as input data for another core. The neural network device can convert the current 1703, which is an analog signal, into a digital signal using the ADC 1730. In one embodiment, the neural network device may use the ADC 1730 to convert the current 1703 into a digital signal to have the same bit resolution as the pixel data of the input feature map 1710. For example, if the pixel data of the input feature map 1710 has 1-bit resolution, the neural network device can convert the current 1703 into a digital signal with 1-bit resolution using the ADC 1730.

뉴럴 네트워크 장치는 활성화 유닛(1740)을 이용하여, ADC(1730)에서 변환된 디지털 신호에 활성화 함수를 적용할 수 있다. 활성화 함수로는 Sigmoid 함수, Tanh 함수 및 ReLU(Rectified Linear Unit) 함수를 이용할 수 있으나, 디지털 신호에 적용할 수 있는 활성화 함수는 이에 제한되지 않는다.The neural network device can apply an activation function to the digital signal converted by the ADC 1730 using the activation unit 1740. The Sigmoid function, Tanh function, and ReLU (Rectified Linear Unit) function can be used as activation functions, but the activation function applicable to digital signals is not limited to these.

활성화 함수가 적용된 디지털 신호는 다른 코어(1750)의 입력 값으로 이용될 수 있다. 활성화 함수가 적용된 디지털 신호가 다른 코어(1750)의 입력 값으로 이용되는 경우, 다른 코어(1750)에서 상술한 과정이 동일하게 적용될 수 있다.The digital signal to which the activation function is applied can be used as an input value for another core 1750. When a digital signal to which an activation function is applied is used as an input value for another core 1750, the above-described process can be applied equally to the other core 1750.

도 18은 일 실시 예에 따른 서브 피처맵과 코어가 매칭되는 예시를 설명하기 위한 도면이다.Figure 18 is a diagram for explaining an example of matching a sub-feature map and a core according to an embodiment.

학습 및 추론에 이용되는 입력 피처맵(1810)은 다양한 크기를 가질 수 있는데, 뉴럴 네트워크 장치의 코어(1800)의 크기는 제한적이므로 단일 입력 피처맵(1810)의 픽셀 데이터 개수가 코어(1800)에서 수신할 수 있는 입력 값의 개수보다 많을 수 있다.The input feature map 1810 used for learning and inference may have various sizes, but since the size of the core 1800 of the neural network device is limited, the number of pixel data of the single input feature map 1810 is limited to the core 1800. There may be more than the number of input values that can be received.

도 18을 참조하면, 입력 피처맵(1810)의 크기는 8x8이고, 코어(1800)의 크기는 16x16이다. 이 경우, 8x8 입력 피처맵(1810)의 픽셀 데이터 개수는 64개(=8x8)이므로 코어(1800)에서 수신할 수 있는 입력 값의 개수 16보다 더 큰 값을 갖는다.Referring to FIG. 18, the size of the input feature map 1810 is 8x8, and the size of the core 1800 is 16x16. In this case, the number of pixel data of the 8x8 input feature map 1810 is 64 (=8x8), so it has a value greater than 16, the number of input values that can be received from the core 1800.

뉴럴 네트워크 장치는 입력 피처맵(1810)의 픽셀 데이터 개수가 코어(1800)의 입력 값의 개수 즉, 열(M)의 개수보다 큰 경우, 입력 피처맵(1810)을 서브 피처맵(1811)으로 분할할 수 있다. 뉴럴 네트워크 장치는 코어(1800)의 크기 정보에 기초하여 입력 피처맵(1810)을 서브 피처맵(1811)으로 분할할 수 있다.If the number of pixel data of the input feature map 1810 is greater than the number of input values of the core 1800, that is, the number of columns (M), the neural network device converts the input feature map 1810 into a sub-feature map 1811. It can be divided. The neural network device may divide the input feature map 1810 into a sub-feature map 1811 based on size information of the core 1800.

구체적으로, 입력 피처맵(1810)의 크기가 8x8이고 코어(1800)의 크기가 16x16인 경우, 뉴럴 네트워크 장치는 서브 피처맵들 각각의 픽셀 데이터 개수가 16개가 되도록 입력 피처맵(1810)을 4개의 서브 피처맵들로 분할할 수 있다. 뉴럴 네트워크 장치는 분할된 서브 피처맵들 각각을 별개의 코어들에 매칭시킬 수 있다. 예를 들어, 뉴럴 네트워크 장치는 서브 피처맵(1810)의 'aa'를 코어(1800)의 첫 번째 입력 값 'V1'으로 수신할 수 있고, 서브 피처맵(1810)의 'ab'를 코어(1800)의 두 번째 입력 값 'V2'으로 수신할 수 있으며, 서브 피처맵(1810)의 'dd'를 코어(1800)의 열여섯 번째 입력 값 'V16'으로 수신할 수 있다.Specifically, when the size of the input feature map 1810 is 8x8 and the size of the core 1800 is 16x16, the neural network device divides the input feature map 1810 into 4 so that the number of pixel data in each of the sub-feature maps is 16. It can be divided into sub-feature maps. The neural network device can match each of the divided sub-feature maps to separate cores. For example, the neural network device may receive 'aa' of the sub-feature map 1810 as the first input value 'V1' of the core 1800, and receive 'ab' of the sub-feature map 1810 as the core ( It can be received as the second input value 'V2' of the sub-feature map 1810, and 'dd' of the sub-feature map 1810 can be received as the sixteenth input value 'V16' of the core 1800.

한편, 도 17에서 상술한 바와 같이, 서브 피처맵(1810)의 픽셀 데이터들은 디지털 신호(예를 들어, 1비트, 4비트 등)일 수 있으며, 뉴럴 네트워크 장치는 DAC(Digital Analog Converter)를 이용하여 픽셀 데이터들을 아날로그 신호로 변환한 후 변환된 값(전압 V)을 코어(1800)의 입력 값으로 수신할 수 있다.Meanwhile, as described above in FIG. 17, the pixel data of the sub-feature map 1810 may be digital signals (e.g., 1 bit, 4 bits, etc.), and the neural network device uses a DAC (Digital Analog Converter). After converting the pixel data into an analog signal, the converted value (voltage V) can be received as an input value of the core 1800.

도 19는 일 실시 예에 따른 코어에서 벡터 곱셈 연산이 수행되는 예시를 설명하기 위한 도면이다.Figure 19 is a diagram for explaining an example of a vector multiplication operation performed in a core according to an embodiment.

도 19은 일 실시 예에 따른 코어에서 벡터 곱셈 연산이 수행되는 예시를 설명하기 위한 도면이다. 도 19에 도시된 입력 피처맵(1910), 커널(1920), 서브 피처맵(1930) 및 코어(1900)의 크기는 예시적인 것이며, 도 19에 도시된 크기로 제한되지 않는다.Figure 19 is a diagram for explaining an example of a vector multiplication operation performed in a core according to an embodiment. The sizes of the input feature map 1910, kernel 1920, sub-feature map 1930, and core 1900 shown in FIG. 19 are exemplary and are not limited to the sizes shown in FIG. 19.

도 19을 참조하면, 도 18에서와 마찬가지로 입력 피처맵(1910)의 크기는 8x8이고, 코어(1900)의 크기는 16x16이다. 8x8 입력 피처맵(1910)의 픽셀 데이터 개수는 64개(=8x8)이므로 코어(1900)에서 수신할 수 있는 입력 값의 개수 16보다 더 큰 값을 갖는다. 뉴럴 네트워크 장치는 서브 피처맵들 각각의 픽셀 데이터 개수가 16개가 되도록 입력 피처맵(1910)을 4개의 서브 피처맵들로 분할할 수 있다.Referring to FIG. 19, as in FIG. 18, the size of the input feature map 1910 is 8x8, and the size of the core 1900 is 16x16. Since the number of pixel data of the 8x8 input feature map 1910 is 64 (=8x8), it has a value greater than 16, the number of input values that can be received from the core 1900. The neural network device may divide the input feature map 1910 into four sub-feature maps so that the number of pixel data in each of the sub-feature maps is 16.

2x2 크기를 갖는 커널(1920)은 입력 피처맵(1910)에서 2x2 픽셀 크기의 윈도우(또는 타일) 단위로 슬라이딩하면서 커널(1920)과 입력 피처맵(1910) 간의 컨벌루션 연산이 수행된다. 컨벌루션 연산은 입력 피처맵(1910)의 어느 윈도우의 각 픽셀 데이터, 및 원본 커널(1920)에서 대응 위치의 각 엘리먼트의 웨이트 간의 곱셈을 하여 획득된 값들을 모두 합산하여, 출력 피처맵의 각 픽셀 데이터를 구하는 연산을 의미한다. The kernel 1920 having a size of 2x2 slides on the input feature map 1910 in units of windows (or tiles) having a size of 2x2 pixels, and a convolution operation is performed between the kernel 1920 and the input feature map 1910. The convolution operation adds up all the values obtained by multiplying each pixel data of a window of the input feature map 1910 and the weight of each element at the corresponding position in the original kernel 1920, and calculates each pixel data of the output feature map. This refers to the operation to find .

도 19에서와 같이 입력 피처맵(1910)이 서브 피처맵들로 분할된 경우에도, 서브 피처맵(1930)과 커널(1920) 간의 컨벌루션 연산이 수행된다. 구체적으로, 커널(1920)은 먼저 서브 피처맵(1930)의 제1윈도우(1911a)와 컨벌루션 연산을 수행한다. 즉, 제1윈도우(1911a)의 각 픽셀 데이터(aa, ab, ba 및 bb)는 각각 커널(1920)의 엘리먼트 웨이트(W1, W2, W3 및 W4)와 곱해지고, 곱해진 결과 값들이 모두 합산됨으로써 출력 피처맵의 픽셀 데이터가 산출된다. 마찬가지 방식으로, 커널(1920)은 서브 피처맵(1930)의 제2윈도우(1911b) 내지 제9윈도우(1911c)와 컨벌루션 연산을 수행할 수 있다. 이하에서는 커널의 엘리먼트 웨이트를 커널 값으로 지칭하기로 한다.Even when the input feature map 1910 is divided into sub-feature maps as shown in FIG. 19, a convolution operation is performed between the sub-feature map 1930 and the kernel 1920. Specifically, the kernel 1920 first performs a convolution operation with the first window 1911a of the sub-feature map 1930. That is, each pixel data (aa, ab, ba, and bb) of the first window 1911a is multiplied by the element weights (W1, W2, W3, and W4) of the kernel 1920, and the multiplied result values are all added up. As a result, pixel data of the output feature map is calculated. In the same way, the kernel 1920 may perform a convolution operation with the second window 1911b to the ninth window 1911c of the sub-feature map 1930. Hereinafter, the element weight of the kernel will be referred to as the kernel value.

상술한 컨벌루션 연산 과정은 코어(1900)에서 아래와 같이 수행될 수 있다.The above-described convolution operation process can be performed in the core 1900 as follows.

뉴럴 네트워크 장치에서 서브 피처맵(1930)에 포함된 16개의 픽셀 데이터들(aa, ab, ac, ... dd)을 16x16 크기를 갖는 코어(1900)의 입력으로 수신할 수 있다. 또한, 뉴럴 네트워크 장치는 DAC(Digital Analog Converter)를 이용하여 디지털 신호 형태의 픽셀 데이터들을 아날로그 신호 형태의 전압(V1 내지 V16)으로 변환한 후, 전압(V1 내지 V16)을 코어(1900)의 입력으로 수신할 수 있다. 일 실시 예에서, 코어(1900)가 4비트 해상도의 픽셀 데이터를 입력으로 수신하는 경우 DAC 전력 소모 측면에서 바람직할 수 있다.The neural network device may receive 16 pixel data (aa, ab, ac, ... dd) included in the sub-feature map 1930 as an input to the core 1900 having a size of 16x16. In addition, the neural network device converts pixel data in the form of a digital signal into voltages (V1 to V16) in the form of an analog signal using a DAC (Digital Analog Converter), and then converts the voltages (V1 to V16) into the input of the core 1900. It can be received by . In one embodiment, when the core 1900 receives pixel data with 4-bit resolution as input, it may be desirable in terms of DAC power consumption.

또한, 뉴럴 네트워크 장치의 코어(1900)에는 커널 값들(W1, W2, W3 및 W4)이 저장될 수 있다. 여기서, 커널 값들(W1, W2, W3 및 W4)은 뉴럴 네트워크에서 학습이 완료된 값들일 수 있다. 구체적으로, 커널 값들(W1, W2, W3 및 W4)은 코어(1900)의 시냅스 즉, 메모리 셀에 저장될 수 있다. 커널 값들(W1, W2, W3 및 W4)은 메모리 셀에 컨덕턴스 값(G1, G2, G3 및 G4)으로 저장될 수 있으며, 커널 값들 W1 내지 W4 각각은 메모리 셀에 저장된 컨덕턴스 값 G1 내지 G4에 대응된다. 한편, 코어(1900)의 메모리 셀들 중에서 컨덕턴스 값(G1, G2, G3 및 G4)이 저장되지 않은 메모리 셀들의 컨덕턴스 값은 '0'일 수 있다.Additionally, kernel values (W1, W2, W3, and W4) may be stored in the core 1900 of the neural network device. Here, the kernel values (W1, W2, W3, and W4) may be values that have been learned in the neural network. Specifically, the kernel values W1, W2, W3, and W4 may be stored in a synapse of the core 1900, that is, a memory cell. The kernel values (W1, W2, W3 and W4) may be stored in the memory cell as conductance values (G1, G2, G3 and G4), with each of the kernel values W1 to W4 corresponding to the conductance values G1 to G4 stored in the memory cell. do. Meanwhile, among the memory cells of the core 1900, the conductance values of memory cells in which conductance values (G1, G2, G3, and G4) are not stored may be '0'.

일 실시 예에서 뉴럴 네트워크 장치는 커널 값들을 초기화(initialization)할 수 있다. 초기화된 커널 값들은 코어(1900)의 메모리 셀에 컨덕턴스 값으로 저장될 수 있다. 초기화 방법으로는 가우시안 표준 정규 분포 방식, Xavier 초기화 방식 및 He 초기화 방식 등이 있으나, 이에 제한되지 않는다.In one embodiment, the neural network device may initialize kernel values. The initialized kernel values may be stored as conductance values in the memory cell of the core 1900. Initialization methods include, but are not limited to, the Gaussian standard normal distribution method, Xavier initialization method, and He initialization method.

또한, 뉴럴 네트워크 장치는 초기화된 커널 값들을 분할된 서브 피처맵의 개수의 제곱근으로 나눌 수 있다. 일 실시 예에서 입력 피처맵(1910)이 4개의 서브 피처맵으로 분할된 경우, 뉴럴 네트워크 장치는 초기화된 커널 값들을 로 나눌 수 있다. 뉴럴 네트워크 장치는 나눗셈 연산이 수행된 커널 값들을 코어(1900)의 메모리 셀에 컨덕턴스 값으로 저장할 수 있다. He 초기화 방법을 이용하여 커널 값들을 초기화한 후, 이를 서브 피처맵의 개수의 제곱근으로 나눈 결과 값을 메모리 셀의 컨덕턴스 값으로 이용하는 경우 예측 정확도를 향상시킬 수 있다.Additionally, the neural network device can divide the initialized kernel values by the square root of the number of divided sub-feature maps. In one embodiment, when the input feature map 1910 is divided into four sub-feature maps, the neural network device uses the initialized kernel values. It can be divided into The neural network device may store the kernel values on which the division operation was performed as conductance values in the memory cell of the core 1900. Prediction accuracy can be improved if the kernel values are initialized using the He initialization method, divided by the square root of the number of sub-feature maps, and the resulting value is used as the conductance value of the memory cell.

이하에서는 설명의 편의를 위하여 가로 방향의 로우 배선을 위쪽에서부터 순서대로 제1 로우 배선(1901a) 내지 제16 로우 배선(1901p)라 칭하고, 컬럼 배선을 좌측에서부터 순서대로 제1 컬럼 배선(1902a) 내지 제16 컬럼 배선(1902p)라고 칭하기로 한다.Hereinafter, for convenience of explanation, the horizontal row wires will be referred to as first row wires 1901a to 16th row wires 1901p in order from the top, and the column wires will be referred to as first column wires 1902a to 16th row wires in order from the left. It will be referred to as the 16th column wiring 1902p.

제1 컬럼 배선(1902a) 부분을 살펴보면, 제1 로우 배선(1901a), 제2 로우 배선(1901b), 제5 로우 배선(1901e) 및 제6 로우 배선(1901f)과 교차하는 메모리 셀에는 컨덕턴스 값 G1, G2, G3 및 G4가 각각 저장된다. 또한, 제1 로우 배선(1901a), 제2 로우 배선(1901b), 제5 로우 배선(1901e) 및 제6 로우 배선(1901f) 각각에 대응되는 코어(1900)의 입력 값은 V1, V2, V5 및 V6이다. 전압과 컨덕턴스 간에는 옴의 법칙이 적용되므로, 메모리 셀에 저장된 컨덕턴스 값과 코어의 입력 전압 값 간의 벡터 곱셈 연산 결과, 코어(1900)의 제1 출력 값 I1은 아래의 수학식 1과 같이 산출될 수 있다.Looking at the first column wiring 1902a, the memory cells that intersect the first row wiring 1901a, the second row wiring 1901b, the fifth row wiring 1901e, and the sixth row wiring 1901f have a conductance value. G1, G2, G3 and G4 are stored respectively. In addition, the input values of the core 1900 corresponding to each of the first row wiring 1901a, the second row wiring 1901b, the fifth row wiring 1901e, and the sixth row wiring 1901f are V1, V2, and V5. and V6. Since Ohm's law is applied between voltage and conductance, as a result of the vector multiplication operation between the conductance value stored in the memory cell and the input voltage value of the core, the first output value I1 of the core 1900 can be calculated as Equation 1 below: there is.

커널 값들 W1 내지 W4 각각은 메모리 셀에 저장된 컨덕턴스 값 G1 내지 G4에 대응되며, 코어(1900)의 입력 값 V1, V2, V5 및 V6 각각은 픽셀 데이터 aa, ab, ba 및 bb에 대응된다. 즉, 코어(1900)의 제1 출력 값 I1은 커널(1920) 및 제1윈도우(1911a) 간의 컨벌루션 연산 결과에 대응된다.Each of the kernel values W1 to W4 corresponds to conductance values G1 to G4 stored in the memory cell, and each of the input values V1, V2, V5, and V6 of the core 1900 corresponds to pixel data aa, ab, ba, and bb. That is, the first output value I1 of the core 1900 corresponds to the result of the convolution operation between the kernel 1920 and the first window 1911a.

또한, 제2 컬럼 배선(1902b) 부분을 살펴보면, 제2 로우 배선(1901b), 제3 로우 배선(1901c), 제6 로우 배선(1901f) 및 제7 로우 배선(1901e)과 교차하는 메모리 셀에는 컨덕턴스 값 G1, G2, G3 및 G4가 각각 저장된다. 코어(1900)의 제1 출력 값 I1을 산출했을 때와 마찬가지 방식으로, 코어(1900)의 제2 출력 값 I2는 아래의 수학식 2와 같이 산출될 수 있다. 코어(1900)의 제2 출력 값 I2는 커널(1920) 및 제2윈도우(1911b) 간의 컨벌루션 연산 결과에 대응된다.Additionally, looking at the second column wiring 1902b, memory cells that intersect the second row wiring 1901b, the third row wiring 1901c, the sixth row wiring 1901f, and the seventh row wiring 1901e have Conductance values G1, G2, G3 and G4 are stored respectively. In the same manner as when calculating the first output value I1 of the core 1900, the second output value I2 of the core 1900 can be calculated as shown in Equation 2 below. The second output value I2 of the core 1900 corresponds to the result of the convolution operation between the kernel 1920 and the second window 1911b.

상술한 과정에 따라, 뉴럴 네트워크 장치는 코어(1900)의 입력 값 및 메모리 셀에 저장된 컨덕턴스 값 간의 벡터 곱셈 연산을 수행함으로써, 제1 출력 값(I1) 내지 제16 출력 값(I16)을 산출할 수 있다.According to the above-described process, the neural network device calculates the first output value I1 to the sixteenth output value I16 by performing a vector multiplication operation between the input value of the core 1900 and the conductance value stored in the memory cell. You can.

한편, 도 19에서는 커널(1920)과 벡터 곱셈 연산이 수행되는 윈도우(1911a, 1911b, 1911c)가 9개이므로, 제1 컬럼 배선(1902a) 내지 제9 컬럼 배선(1902i) 상의 메모리 셀에만 컨덕턴스 값 G1, G2, G3 및 G4가 저장될 수 있다. 즉, 제10 컬럼 배선(1902j) 내지 제16 컬럼 배선(1902p) 상의 메모리 셀에 저장된 컨덕턴스 값은 전부 '0'일 수 있으며, 이 때 코어(1900)의 제10 출력 값 I10 내지 제16 출력 값 I16은 0이 된다.Meanwhile, in FIG. 19, since there are 9 windows 1911a, 1911b, and 1911c where the kernel 1920 and the vector multiplication operation are performed, the conductance value is only displayed on the memory cells on the first to ninth column wires 1902a to 1902i. G1, G2, G3 and G4 can be stored. That is, the conductance values stored in the memory cells on the 10th column wiring 1902j to 16th column wiring 1902p may all be '0', and in this case, the 10th output value I10 to the 16th output value of the core 1900 I16 becomes 0.

코어(1900)에서 산출된 출력 값(I1 내지 I16)은 아날로그 신호이므로, 뉴럴 네트워크 장치는 ADC(Analog Digital Converter)를 이용하여 출력 값(I1 내지 I16)을 디지털 신호로 변환할 수 있다. 또한, 뉴럴 네트워크 장치는 ADC에서 변환된 디지털 신호에 활성화 함수를 적용한 후 이를 이용하여 다른 코어의 입력 값을 산출할 수 있다.Since the output values (I1 to I16) calculated by the core 1900 are analog signals, the neural network device can convert the output values (I1 to I16) into digital signals using an analog digital converter (ADC). Additionally, the neural network device can apply an activation function to the digital signal converted from the ADC and then use it to calculate the input value of another core.

도 20은 일 실시 예에 따른 복수의 코어에서 산출된 출력 값들을 합성하는 방법을 설명하기 위한 도면이다. Figure 20 is a diagram for explaining a method of combining output values calculated from a plurality of cores according to an embodiment.

도 20을 참조하면, 입력 피처맵(2010)의 크기는 4x4이고, 제1 내지 제5 코어(2001 내지 2005)의 크기는 4x4이다. 4x4 입력 피처맵(2010)의 픽셀 데이터 개수는 16개(=4x4)이므로, 제1 내지 제5 코어(2001 내지 2005)에서 수신할 수 있는 입력 값의 개수 4보다 더 큰 값을 갖는다. 뉴럴 네트워크 장치는 제1 내제 제4 서브 피처맵들(2011 내지 2014) 각각의 픽셀 데이터 개수가 4개가 되도록 입력 피처맵(2010)을 4개의 서브 피처맵들로 분할할 수 있다.Referring to FIG. 20, the size of the input feature map 2010 is 4x4, and the size of the first to fifth cores 2001 to 2005 is 4x4. Since the number of pixel data of the 4x4 input feature map 2010 is 16 (=4x4), it has a value greater than 4, the number of input values that can be received from the first to fifth cores 2001 to 2005. The neural network device may divide the input feature map 2010 into four sub-feature maps so that the number of pixel data in each of the first internal fourth sub-feature maps 2011 to 2014 is four.

제1 서브 피처맵(2011)의 픽셀 데이터 'aa, ab, ba, bb'는 제1 코어(2001)의 입력으로 수신될 수 있다. 뉴럴 네트워크 장치는 DAC(Digital Analog Converter)를 이용하여 디지털 신호 형태의 픽셀 데이터들 'aa, ab, ba, bb'를 아날로그 신호 형태의 전압으로 변환한 후, 전압을 제1 코어(2001)의 입력으로 수신할 수 있다. 마찬가지 방식으로, 뉴럴 네트워크 장치는 제2 내지 제4 서브 피처맵(2012 내지 2014) 각각의 픽셀 데이터들을 아날로그 신호로 변환한 후 제2 내지 제4 코어(2002 내지 2004)의 입력으로 수신할 수 있다.Pixel data 'aa, ab, ba, bb' of the first sub-feature map 2011 may be received as an input to the first core 2001. The neural network device converts the pixel data 'aa, ab, ba, bb' in the form of a digital signal into a voltage in the form of an analog signal using a DAC (Digital Analog Converter), and then converts the voltage to the input of the first core (2001). It can be received by . In the same way, the neural network device can convert the pixel data of each of the second to fourth sub-feature maps (2012 to 2014) into an analog signal and receive it as an input of the second to fourth cores (2002 to 2004). .

한편, 도 19에서 상술한 바와 같이, 제1 내지 제5 코어(2001 내지 2005)의 메모리 셀에는 초기화된 커널 값들이 컨덕턴스 값으로 저장될 수 있다. 일 실시 예에서 커널 값들의 초기화 방법으로는 He 초기화 방법이 이용될 수 있다. 뉴럴 네트워크 장치는 He 초기화 방법을 이용하여 커널 값들을 초기화한 후, 이를 서브 피처맵의 개수의 제곱근으로 나눈 결과 값을 메모리 셀의 컨덕턴스 값으로 저장할 수 있다.Meanwhile, as described above with reference to FIG. 19 , initialized kernel values may be stored as conductance values in the memory cells of the first to fifth cores 2001 to 2005. In one embodiment, the He initialization method may be used as an initialization method for kernel values. The neural network device can initialize kernel values using the He initialization method, divide them by the square root of the number of sub-feature maps, and store the resulting value as the conductance value of the memory cell.

뉴럴 네트워크 장치는 제1 내지 제4 코어(2001 내지 2004)의 메모리 셀에 저장된 컨덕턴스 값과 입력 전압 값 간의 벡터 곱셈 연산을 수행한다. 벡터 곱셈 연산이 수행된 결과, 제1 내지 제4 코어(2001 내지 2004)의 출력 값이 산출된다. 이 때, 제1 내지 제4 코어(2001 내지 2004) 각각은, 제1 내지 제4 서브 피처맵(2011 내지 2014)의 픽셀 데이터를 입력으로 수신하고 있으므로, 뉴럴 네트워크 장치는 제1 내지 제4 코어(2001 내지 2004) 각각에서 산출된 출력 값들을 합성(merge)할 수 있다. 뉴럴 네트워크 장치는 합성된 출력 값들을 새로운 코어의 입력 값으로 전송할 수 있다.The neural network device performs a vector multiplication operation between the conductance value stored in the memory cells of the first to fourth cores 2001 to 2004 and the input voltage value. As a result of performing the vector multiplication operation, output values of the first to fourth cores 2001 to 2004 are calculated. At this time, since each of the first to fourth cores (2001 to 2004) receives pixel data of the first to fourth sub-feature maps (2011 to 2014) as input, the neural network device receives the pixel data of the first to fourth cores (2001 to 2004) as input. (2001 to 2004) The output values calculated from each can be merged. A neural network device can transmit synthesized output values as input values of a new core.

일 실시 예에서 뉴럴 네트워크 장치는 제1 내지 제4 코어(2001 내지 2004) 각각에서 산출된 출력 값들 중에서, 각 코어에서 동일한 순서를 갖는 컬럼 배선의 출력 값들을 합성할 수 있다. 예를 들어, 뉴럴 네트워크 장치는, 제1 코어(2001)의 첫 번째 컬럼 배선의 출력 값 I1, 제2 코어(2002)의 첫 번째 컬럼 배선의 출력 값 I2, 제3 코어(2003)의 첫 번째 컬럼 배선의 출력 값 I3 및 제4 코어(2004)의 첫 번째 컬럼 배선의 출력 값 I4를 합성할 수 있다. 뉴럴 네트워크 장치는 출력 값 I1 내지 I4를 합성한 후, 합성된 출력 값들을 제5 코어(2005)의 입력 값 V1으로 전송할 수 있다.In one embodiment, the neural network device may synthesize output values of column wiring having the same order in each core among output values calculated from each of the first to fourth cores 2001 to 2004. For example, the neural network device includes the output value I1 of the first column wiring of the first core (2001), the output value I2 of the first column wiring of the second core (2002), and the output value I2 of the first column wiring of the third core (2003). The output value I3 of the column wiring and the output value I4 of the first column wiring of the fourth core (2004) can be combined. The neural network device may synthesize output values I1 to I4 and then transmit the synthesized output values as the input value V1 of the fifth core (2005).

또한, 뉴럴 네트워크 장치는 제1 내지 제4 코어(2001 내지 2004)에서 산출된 출력 값 I1 내지 I4 각각에 웨이트 값 W1 내지 W4를 곱한 후, 웨이트 값이 곱해진 출력 값들을 합성할 수 있다. 즉, 제5 코어(2005)의 입력 값 V1은 아래의 수학식 3과 같이 산출될 수 있다.Additionally, the neural network device may multiply each of the output values I1 to I4 calculated from the first to fourth cores 2001 to 2004 by the weight values W1 to W4, and then synthesize the output values multiplied by the weight values. That is, the input value V1 of the fifth core (2005) can be calculated as in Equation 3 below.

여기서 웨이트 값 W1 내지 W4는 커널 값과 다른 값일 수 있으며, 뉴럴 네트워크에서 학습을 통해 결정된 값일 수 있다. 일 실시 예에서 웨이트 값 W1 내지 W4는 '1'일 수 있으나, 이에 제한되지 않는다.Here, the weight values W1 to W4 may be different from the kernel value and may be values determined through learning in a neural network. In one embodiment, the weight values W1 to W4 may be '1', but are not limited thereto.

마찬가지 방식으로, 뉴럴 네트워크 장치는 제1 내지 제4 코어(2001 내지 2004)에서 산출된 나머지 출력 값들을 합성한 후, 합성된 출력 값들을 제5 코어(2005)의 입력 값으로 전송할 수 있다.In the same manner, the neural network device may synthesize the remaining output values calculated from the first to fourth cores 2001 to 2004 and then transmit the synthesized output values as input values of the fifth core 2005.

한편, 제1 내지 제4 코어(2001 내지 2004)에서 산출된 출력 값들(또는 산출된 출력 값에 웨이트 값이 곱해진 결과 값들)은 아날로그 신호 형태(전류 값)이므로, 뉴럴 네트워크 장치는 ADC(Analog Digital Converter)를 이용하여 출력 값들을 디지털 신호로 변환할 수 있다. 또한, 뉴럴 네트워크 장치는 ADC에서 디지털 신호로 변환된 출력 값들에 ReLU 함수를 적용할 수 있다. 뉴럴 네트워크 장치는 활성화 함수가 적용된 출력 값들을 합성한 후, 합성된 출력 값들을 제5 코어(2005)의 입력 값으로 전송할 수 있다.Meanwhile, since the output values calculated from the first to fourth cores (2001 to 2004) (or the result values of the calculated output values multiplied by the weight value) are in the form of analog signals (current values), the neural network device uses an ADC (Analog The output values can be converted into digital signals using a digital converter. Additionally, the neural network device can apply the ReLU function to the output values converted to digital signals from the ADC. The neural network device may synthesize output values to which an activation function is applied and then transmit the synthesized output values as input values of the fifth core (2005).

상술한 바와 같이, 입력 피처맵의 픽셀 데이터 개수가 코어의 입력 값의 개수보다 많은 경우, 입력 피처맵을 서브 피처맵으로 분할한 후 분할된 서브 피처맵들 각각을 별개의 코어들에 매칭시킬 수 있다. 뉴럴 네트워크 장치는 입력 피처맵을 상기와 같이 분할함으로써, DAC(Digital Analog Converter) 전력, ADC(Analog Digital Converter) 전력 및 칩 전력(Chip Power)의 소모량을 줄일 수 있으며, 나아가, 칩 면적을 줄일 수 있다.As described above, if the number of pixel data of the input feature map is greater than the number of input values of the core, the input feature map can be divided into sub-feature maps and each of the divided sub-feature maps can be matched to separate cores. there is. By dividing the input feature map as described above, the neural network device can reduce the consumption of DAC (Digital Analog Converter) power, ADC (Analog Digital Converter) power, and chip power, and further reduce chip area. there is.

도 21은 일 실시 예에 따른 뉴럴 네트워크 장치에서 뉴럴 네트워크를 구현하는 방법을 설명하는 흐름도이다.Figure 21 is a flowchart explaining a method of implementing a neural network in a neural network device according to an embodiment.

도 21는 일 실시 예에 따른 뉴럴 네트워크 장치에서 뉴럴 네트워크를 구현하는 방법을 설명하는 흐름도이다. 도 21에 도시된, 뉴럴 네트워크 장치에서 뉴럴 네트워크를 구현하는 방법은, 앞서 설명된 도면들에서 설명된 실시 예들에 관련되므로, 이하 생략된 내용이라 할지라도, 앞서 도면들에서 설명된 내용들은 도 21의 방법에도 적용될 수 있다.Figure 21 is a flowchart explaining a method of implementing a neural network in a neural network device according to an embodiment. The method of implementing a neural network in a neural network device shown in FIG. 21 is related to the embodiments described in the previously described drawings, so even if the contents are omitted below, the contents described in the previous drawings are included in FIG. 21 It can also be applied to the method of .

도 21를 참조하면, 단계 s2110에서 뉴럴 네트워크 장치는, 뉴럴 네트워크 장치를 구성하는 코어의 크기 정보에 기초하여 입력 피처맵을 서브 피처맵으로 분할할 수 있다. 입력 피처맵 및 코어의 크기는 행렬로 표현될 수 있는데, 입력 피처맵을 구성하는 픽셀 데이터 개수가 코어의 입력 값의 개수(열의 개수)보다 클 수 있다. 이 경우, 뉴럴 네트워크 장치는 분할된 서브 피처맵의 픽셀 데이터 개수가 코어의 입력 값의 개수와 갖거나 작아지도록 입력 피처맵을 복수의 서브 피처맵들로 분할할 수 있다.Referring to FIG. 21, in step s2110, the neural network device may divide the input feature map into sub-feature maps based on size information of the core constituting the neural network device. The size of the input feature map and core can be expressed as a matrix, and the number of pixel data constituting the input feature map may be larger than the number of input values (number of columns) of the core. In this case, the neural network device may divide the input feature map into a plurality of sub-feature maps so that the number of pixel data of the divided sub-feature map is equal to or smaller than the number of input values of the core.

단계 s2120에서 뉴럴 네트워크 장치는 서브 피처맵의 픽셀 데이터를 코어의 입력 값으로 수신할 수 있다.In step s2120, the neural network device may receive pixel data of the sub-feature map as an input value of the core.

서브 피처맵의 픽셀 데이터는 디지털 신호이므로, 픽셀 데이터를 코어의 입력 값으로 수신하기 위해 뉴럴 네트워크 장치는 DAC(Digital Analog Converter)를 이용하여 픽셀 데이터를 아날로그 신호(전압)로 변환할 수 있다. 한편, 일 실시 예에서 서브 피처맵의 픽셀 데이터는 4비트 해상도(resolution)의 디지털 신호일 수 있다.Since the pixel data of the sub-feature map is a digital signal, in order to receive the pixel data as the input value of the core, the neural network device can convert the pixel data into an analog signal (voltage) using a DAC (Digital Analog Converter). Meanwhile, in one embodiment, the pixel data of the sub-feature map may be a digital signal with 4-bit resolution.

단계 s2130에서 뉴럴 네트워크 장치는 서브 피처맵에 적용될 커널 값들을, 코어를 구성하는 메모리 셀들에 저장할 수 있다.In step s2130, the neural network device may store kernel values to be applied to the sub-feature map in memory cells constituting the core.

커널 값들은 코어의 메모리 셀에 저장될 수 있으며, 메모리 셀에 저장된 커널 값들은 컨덕턴스일 수 있다. 커널 값들은 별도의 뉴럴 네트워크에서 학습된 값들일 수 있으며, 별도의 뉴럴 네트워크 학습 시에 입력 피처맵 대신 분할된 서브 피처맵이 입력 데이터로 이용될 수 있다.Kernel values may be stored in a memory cell of the core, and the kernel values stored in the memory cell may be conductance. Kernel values may be values learned in a separate neural network, and when learning a separate neural network, a segmented sub-feature map may be used as input data instead of an input feature map.

한편, 뉴럴 네트워크 장치는 He 초기화 방법을 이용하여 학습된 커널 값들을 초기화한 후, 이를 서브 피처맵의 개수의 제곱근으로 나눈 결과 값을 메모리 셀의 컨덕턴스 값으로 저장할 수 있다.Meanwhile, the neural network device can initialize the learned kernel values using the He initialization method, divide them by the square root of the number of sub-feature maps, and store the resulting value as the conductance value of the memory cell.

단계 s2140에서 뉴럴 네트워크 장치는 입력 값과, 메모리 셀들에 저장된 커널 값들 간의 벡터 곱셈 연산을 수행함으로써 코어의 출력 값을 산출할 수 있다.In step s2140, the neural network device may calculate the output value of the core by performing a vector multiplication operation between the input value and the kernel values stored in the memory cells.

전압과 컨덕턴스 간에는 옴의 법칙이 적용되므로, 뉴럴 네트워크 장치는 메모리 셀에 저장된 커널 값(컨덕턴스)과 코어의 입력 값(전압) 간의 벡터 곱셈 연산을 수행함으로써, 코어의 출력 값(전류)를 산출할 수 있다.Since Ohm's law applies between voltage and conductance, the neural network device calculates the output value (current) of the core by performing a vector multiplication operation between the kernel value (conductance) stored in the memory cell and the input value (voltage) of the core. You can.

단계 s2150에서 뉴럴 네트워크 장치는 분할된 서브 피처맵 각각에 대응하는 코어에서 산출된 출력 값들을 합성(merge)할 수 있다.In step s2150, the neural network device may merge output values calculated from the core corresponding to each divided sub-feature map.

뉴럴 네트워크 장치는 복수의 코어들 각각에서 산출된 출력 값들 중에서, 각 코어에서 동일한 순서를 갖는 컬럼 배선의 출력 값들을 합성할 수 있다. 또한, 뉴럴 네트워크 장치는 복수의 코어들 각각에서 산출된 출력 값들 각각에 웨이터 값을 곱한 후, 웨이트 값이 곱해진 출력 값들을 합성할 수 있다. 여기서 웨이트 값 W1 내지 W4는 커널 값과 다른 값일 수 있다.The neural network device may synthesize the output values of the column wiring having the same order in each core among the output values calculated from each of the plurality of cores. Additionally, the neural network device may multiply each output value calculated from each of the plurality of cores by a waiter value and then synthesize the output values multiplied by the weight value. Here, the weight values W1 to W4 may be different from the kernel value.

단계 s2160에서 뉴럴 네트워크 장치는 합성된 출력 값들을 새로운 코어의 입력 값으로 전송할 수 있다. In step s2160, the neural network device may transmit the synthesized output values as input values of a new core.

코어에서 산출된 출력 값들(또는 산출된 출력 값에 웨이트 값이 곱해진 결과 값들)은 아날로그 신호 형태(전류)이므로, 뉴럴 네트워크 장치는 ADC(Analog Digital Converter)를 이용하여 출력 값들을 디지털 신호로 변환할 수 있다. 또한, 뉴럴 네트워크 장치는 ADC에서 디지털 신호로 변환된 출력 값들에 ReLU 함수를 적용할 수 있다. 뉴럴 네트워크 장치는 활성화 함수가 적용된 출력 값들을 합성한 후, 합성된 출력 값들을 새로운 코어의 입력 값으로 전송할 수 있다.Since the output values calculated from the core (or the results obtained by multiplying the calculated output value by the weight value) are in the form of an analog signal (current), the neural network device converts the output values into digital signals using an ADC (Analog Digital Converter). can do. Additionally, the neural network device can apply the ReLU function to the output values converted to digital signals from the ADC. The neural network device can synthesize output values to which an activation function is applied and then transmit the synthesized output values as input values of a new core.

뉴럴 네트워크 장치는 합성된 출력 값들을 새로운 코어의 입력 값으로 전송한 후, 단계 s2120 내지 단계 s2150을 수행할 수 있다.The neural network device may transmit the synthesized output values as input values of a new core and then perform steps s2120 to s2150.

도 22는 일 실시 예에 따른 뉴럴 네트워크 장치 및 메모리를 도시한 블록도이다.Figure 22 is a block diagram illustrating a neural network device and memory according to an embodiment.

도 22을 참조하면, 뉴럴 네트워크 장치(100)는 프로세서(120) 및 온-칩 메모리(on-chip memory, 2210)를 포함할 수 있다. 도 22에 도시된 뉴럴 네트워크 장치(100)에는 본 실시 예들과 관련된 구성요소들만이 도시되어 있다. 따라서, 뉴럴 네트워크 장치(100)에는 도 22에 도시된 구성요소들 외에 다른 범용적인 구성요소들이 더 포함될 수 있음은 당해 기술분야의 통상의 기술자에게 자명하다.Referring to FIG. 22, the neural network device 100 may include a processor 120 and an on-chip memory (on-chip memory, 2210). In the neural network device 100 shown in FIG. 22, only components related to the present embodiments are shown. Accordingly, it is obvious to those skilled in the art that the neural network device 100 may further include other general-purpose components in addition to the components shown in FIG. 22.

뉴럴 네트워크 장치(100)는 스마트폰, 드론, 태블릿 디바이스, AR(Augmented Reality) 디바이스, IoT(Internet of Things) 디바이스, 자율주행 자동차, 로보틱스, 의료기기 등 저전력 뉴럴네트워크 구동이 필요한 디지털 시스템에 탑재될 수 있으나, 이에 제한되지 않는다.The neural network device 100 will be installed in digital systems that require low-power neural network operation, such as smartphones, drones, tablet devices, AR (Augmented Reality) devices, IoT (Internet of Things) devices, self-driving cars, robotics, and medical devices. may, but is not limited to this.

뉴럴 네트워크 장치(100)는 복수의 온-칩 메모리(2210)를 포함할 수 있으며, 온-칩 메모리(2210) 각각은 복수의 코어들로 구성될 수 있다. 코어는 복수의 프리 시냅틱 뉴런(presynaptic neuron), 복수의 포스트 시냅틱 뉴런(postsynaptic neuron), 및 복수의 프리 시냅틱 뉴런과 복수의 포스트 시냅틱 뉴런 사이의 각각의 연결을 제공하는 시냅스 즉, 메모리 셀을 포함할 수 있다. 일 실시 예에서 코어는 RCA(Resistive Crossbar Memory Arrays)로 구현될 수 있다.The neural network device 100 may include a plurality of on-chip memories 2210, and each on-chip memory 2210 may be comprised of a plurality of cores. The core may include a plurality of presynaptic neurons, a plurality of postsynaptic neurons, and synapses that provide respective connections between the plurality of presynaptic neurons and the plurality of postsynaptic neurons, that is, memory cells. You can. In one embodiment, the core may be implemented with Resistive Crossbar Memory Arrays (RCA).

외부 메모리(2220)는 뉴럴 네트워크 장치(100)에서 처리되는 각종 데이터들을 저장하는 하드웨어로서, 외부 메모리(2220)는 뉴럴 네트워크 장치(100)에서 처리된 데이터들 및 처리될 데이터들을 저장할 수 있다. 또한, 외부 메모리(2220)는 뉴럴 네트워크 장치(100)에 의해 구동될 애플리케이션들, 드라이버들 등을 저장할 수 있다. 외부 메모리(2220)는 DRAM(dynamic random access memory), SRAM(static random access memory) 등과 같은 RAM(random access memory), ROM(read-only memory), EEPROM(electrically erasable programmable read-only memory), CD-ROM, 블루레이 또는 다른 광학 디스크 스토리지, HDD(hard disk drive), SSD(solid state drive), 또는 플래시 메모리를 포함할 수 있다.The external memory 2220 is hardware that stores various data processed by the neural network device 100. The external memory 2220 can store data processed by the neural network device 100 and data to be processed. Additionally, the external memory 2220 can store applications, drivers, etc. to be run by the neural network device 100. The external memory 2220 includes random access memory (RAM) such as dynamic random access memory (DRAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and CD. -Can include ROM, Blu-ray or other optical disk storage, hard disk drive (HDD), solid state drive (SSD), or flash memory.

프로세서(120)는 뉴럴 네트워크 장치(100)를 구동하기 위한 전반적인 기능들을 제어하는 역할을 한다. 예를 들어, 프로세서(120)는 뉴럴 네트워크 장치(100) 내의 온-칩 메모리(2210)에 저장된 프로그램들을 실행함으로써, 뉴럴 네트워크 장치(100)를 전반적으로 제어한다. 프로세서(120)는 뉴럴 네트워크 장치(100) 내에 구비된 CPU(central processing unit), GPU(graphics processing unit), AP(application processor) 등으로 구현될 수 있으나, 이에 제한되지 않는다. 프로세서(120)는 외부 메모리(2220)로부터 각종 데이터들을 리드/라이트(read/write)하고, 리드/라이트된 데이터를 이용하여 뉴럴 네트워크 장치(100)를 실행한다.The processor 120 serves to control overall functions for driving the neural network device 100. For example, the processor 120 generally controls the neural network device 100 by executing programs stored in the on-chip memory 2210 within the neural network device 100. The processor 120 may be implemented as a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), etc. provided in the neural network device 100, but is not limited thereto. The processor 120 reads/writes various data from the external memory 2220 and executes the neural network device 100 using the read/written data.

프로세서(120)는 코어의 크기 정보에 기초하여 입력 피처맵을 서브 피처맵으로 분할할 수 있고, 분할된 서브 피처맵의 픽셀 데이터를 코어의 입력 값으로 수신할 수 있다. 프로세서(120)는 DAC(Digital Analog Converter)를 이용하여 픽셀 데이터를 아날로그 신호(전압)로 변환할 수 있다. The processor 120 may divide the input feature map into sub-feature maps based on the size information of the core, and receive pixel data of the divided sub-feature map as an input value of the core. The processor 120 can convert pixel data into an analog signal (voltage) using a digital analog converter (DAC).

프로세서(120)는 서브 피처맵에 적용될 커널 값들을, 코어를 구성하는 메모리 셀들에 저장할 수 있다. 커널 값들은 코어의 메모리 셀에 저장될 수 있으며, 메모리 셀에 저장된 커널 값들은 컨덕턴스일 수 있다. 또한, 프로세서(120)는 입력 값과, 메모리 셀들에 저장된 커널 값들 간의 벡터 곱셈 연산을 수행함으로써 코어의 출력 값을 산출할 수 있다. The processor 120 may store kernel values to be applied to the sub-feature map in memory cells constituting the core. Kernel values may be stored in a memory cell of the core, and the kernel values stored in the memory cell may be conductance. Additionally, the processor 120 may calculate the output value of the core by performing a vector multiplication operation between the input value and kernel values stored in memory cells.

프로세서(120)는 분할된 서브 피처맵 각각에 대응하는 코어에서 산출된 출력 값들을 합성(merge)할 수 있다. 구체적으로, 뉴럴 네트워크 장치는 복수의 코어들 각각에서 산출된 출력 값들 각각에 웨이터 값을 곱한 후, 웨이트 값이 곱해진 출력 값들을 합성할 수 있다. 한편, 코어에서 산출된 출력 값들(또는 산출된 출력 값에 웨이트 값이 곱해진 결과 값들)은 아날로그 신호 형태(전류)이므로, 프로세서(120)는 ADC(Analog Digital Converter)를 이용하여 출력 값들을 디지털 신호로 변환할 수 있다. 또한, 프로세서(120)는 ADC에서 디지털 신호로 변환된 출력 값들에 ReLU 함수를 적용할 수 있다. The processor 120 may merge output values calculated from cores corresponding to each divided sub-feature map. Specifically, the neural network device may multiply each output value calculated from each of the plurality of cores by a waiter value and then synthesize the output values multiplied by the weight value. Meanwhile, since the output values calculated from the core (or the resulting values obtained by multiplying the calculated output value by the weight value) are in the form of an analog signal (current), the processor 120 converts the output values into digital using an ADC (Analog Digital Converter). It can be converted into a signal. Additionally, the processor 120 may apply the ReLU function to output values converted into digital signals from the ADC.

프로세서(120)는 활성화 함수가 적용된 출력 값들을 합성한 후, 합성된 출력 값들을 새로운 코어의 입력 값으로 전송할 수 있다.The processor 120 may synthesize output values to which an activation function is applied and then transmit the synthesized output values as input values of a new core.

본 실시 예들에 따른 장치는 프로세서, 프로그램 데이터를 저장하고 실행하는 메모리, 디스크 드라이브와 같은 영구 저장부(permanent storage), 외부 장치와 통신하는 통신 포트, 터치 패널, 키(key), 버튼 등과 같은 사용자 인터페이스 장치 등을 포함할 수 있다. 소프트웨어 모듈 또는 알고리즘으로 구현되는 방법들은 상기 프로세서상에서 실행 가능한 컴퓨터가 읽을 수 있는 코드들 또는 프로그램 명령들로서 컴퓨터가 읽을 수 있는 기록 매체 상에 저장될 수 있다. 여기서 컴퓨터가 읽을 수 있는 기록 매체로 마그네틱 저장 매체(예컨대, ROM(read-only memory), RAM(random-access memory), 플로피 디스크, 하드 디스크 등) 및 광학적 판독 매체(예컨대, 시디롬(CD-ROM), 디브이디(DVD: Digital Versatile Disc)) 등이 있다. 컴퓨터가 읽을 수 있는 기록 매체는 네트워크로 연결된 컴퓨터 시스템들에 분산되어, 분산 방식으로 컴퓨터가 판독 가능한 코드가 저장되고 실행될 수 있다. 매체는 컴퓨터에 의해 판독가능하며, 메모리에 저장되고, 프로세서에서 실행될 수 있다. Devices according to the present embodiments include a processor, memory for storing and executing program data, permanent storage such as a disk drive, a communication port for communicating with an external device, and a user such as a touch panel, keys, buttons, etc. It may include an interface device, etc. Methods implemented as software modules or algorithms may be stored on a computer-readable recording medium as computer-readable codes or program instructions executable on the processor. Here, computer-readable recording media include magnetic storage media (e.g., ROM (read-only memory), RAM (random-access memory), floppy disk, hard disk, etc.) and optical read media (e.g., CD-ROM). ), DVD (Digital Versatile Disc), etc. The computer-readable recording medium is distributed among computer systems connected to a network, so that computer-readable code can be stored and executed in a distributed manner. The media may be readable by a computer, stored in memory, and executed by a processor.

본 실시 예에서 설명하는 특정 실행들은 예시들로서, 어떠한 방법으로도 기술적 범위를 한정하는 것은 아니다. 명세서의 간결함을 위하여, 종래 전자적인 구성들, 제어 시스템들, 소프트웨어, 상기 시스템들의 다른 기능적인 측면들의 기재는 생략될 수 있다. 또한, 도면에 도시된 구성 요소들 간의 선들의 연결 또는 연결 부재들은 기능적인 연결 및/또는 물리적 또는 회로적 연결들을 예시적으로 나타낸 것으로서, 실제 장치에서는 대체 가능하거나 추가의 다양한 기능적인 연결, 물리적인 연결, 또는 회로 연결들로서 나타내어질 수 있다.The specific implementations described in this embodiment are examples and do not limit the technical scope in any way. For the sake of brevity of the specification, descriptions of conventional electronic components, control systems, software, and other functional aspects of the systems may be omitted. In addition, the connections or connection members of lines between components shown in the drawings exemplify functional connections and/or physical or circuit connections, and in actual devices, various functional connections or physical connections may be replaced or added. Can be represented as connections, or circuit connections.

Claims (21)

뉴럴 네트워크 장치에 있어서,
적어도 하나의 프로그램이 저장된 메모리; 및
상기 적어도 하나의 프로그램을 실행함으로써 뉴럴 네트워크를 구동하여 제 1 입력 및 제 2 입력을 포함하는 입력 데이터에 대한 연산을 수행하는 프로세서를 포함하고,
상기 프로세서는,
서로 다른 딜레이 타임을 갖고 이미지 데이터를 나타내는 복수개의 데이터 스트림을 복수개의 입력단으로부터 수신하고,
상기 복수개의 데이터 스트림으로부터 상기 제 1 입력 및 상기 제 2 입력을 수신하고,
상기 제 1 입력과 복수개의 커널 간의 연산을 수행하여 제 1 결과를 획득하고, 상기 제 1 입력이 수신된 시점에서 제 1 인터벌(interval)만큼 딜레이된 시점에 수신된 상기 제 2 입력과 상기 복수개의 커널 간의 연산을 수행하여 제 2 결과를 획득하고, 상기 제 1 결과와 상기 제 2 결과를 이용하여 상기 입력 데이터에 대한 출력 데이터를 획득하는 장치.
In a neural network device,
a memory in which at least one program is stored; and
A processor configured to drive a neural network by executing the at least one program to perform an operation on input data including a first input and a second input,
The processor,
Receiving a plurality of data streams representing image data with different delay times from a plurality of input terminals,
Receiving the first input and the second input from the plurality of data streams,
A first result is obtained by performing an operation between the first input and a plurality of kernels, and the second input and the plurality of kernels are received at a time delayed by a first interval from the time the first input is received. A device that obtains a second result by performing an inter-kernel operation and obtains output data for the input data using the first result and the second result.
제 1 항에 있어서,
상기 뉴럴 네트워크 장치는 뉴로모픽 하드웨어를 포함하고,
상기 뉴로모픽 하드웨어는 상기 제 1 입력과 상기 제 2 입력을 이용하여 CNN(Convolution Neural Network) 매핑을 수행하는 장치.
According to claim 1,
The neural network device includes neuromorphic hardware,
The neuromorphic hardware is a device that performs CNN (Convolution Neural Network) mapping using the first input and the second input.
제 1 항에 있어서,
상기 입력 데이터는 이미지 데이터를 포함하고,
상기 제 1 입력은 상기 이미지 데이터의 제 1 영역에 대한 데이터를 포함하고, 상기 제 2 입력은 상기 이미지 데이터의 제 2 영역에 대한 데이터를 포함하는 장치.
According to claim 1,
The input data includes image data,
The first input includes data for a first region of the image data, and the second input includes data for a second region of the image data.
제 3 항에 있어서,
상기 제 1 영역과 상기 제 2 영역은 일부 중첩되고 상호 인접한 장치.
According to claim 3,
The device wherein the first area and the second area partially overlap and are adjacent to each other.
제 4 항에 있어서,
상기 프로세서는
상기 제 2 입력이 유효한 입력인지 여부를 결정하고,
상기 제 2 입력이 유효한 입력인 경우, 상기 제 2 입력과 상기 복수개의 커널 간의 연산을 수행하여 상기 제 2 결과를 획득하는 장치.
According to claim 4,
The processor is
determine whether the second input is a valid input;
When the second input is a valid input, a device that obtains the second result by performing an operation between the second input and the plurality of kernels.
제 5 항에 있어서,
상기 프로세서는
상기 제 2 입력이 상기 제 2 영역을 구성하는 픽셀 데이터인 경우 상기 제 2 입력을 상기 유효한 입력으로 결정하는 장치.
According to claim 5,
The processor is
A device for determining the second input as the valid input when the second input is pixel data constituting the second area.
삭제delete 제 1 항에 있어서,
상기 제 1 입력은 제 1 사이클 동안 수신되고,
상기 제 2 입력은 상기 제 1 사이클보다 상기 제 1 인터벌만큼 딜레이된 제 2 사이클 동안 수신되는 장치.
According to claim 1,
the first input is received during a first cycle,
The device wherein the second input is received during a second cycle delayed from the first cycle by the first interval.
제 1 항에 있어서,
상기 프로세서는
상기 제 1 입력과 상기 복수개의 커널 간의 연산 결과들을 더하여 상기 제 1 결과를 획득하고, 상기 제 2 입력과 상기 복수개의 커널 간의 연산 결과들을 더하여 상기 제 2 결과를 획득하는 장치.
According to claim 1,
The processor is
A device for obtaining the first result by adding the operation results between the first input and the plurality of kernels, and obtaining the second result by adding the operation results between the second input and the plurality of kernels.
제 1 항에 있어서,
상기 프로세서는 상기 제 2 입력이 수신된 시점에서 제 2 인터벌만큼 딜레이된 시점에 상기 입력 데이터에 포함되는 제 3 입력을 수신하고,
상기 제 3 입력과 상기 복수개의 커널 간의 연산을 수행하여 제 3 결과를 획득하고,
상기 제 1 결과, 상기 제 2 결과 및 상기 제 3 결과를 이용하여 상기 출력 데이터를 획득하는 장치.
According to claim 1,
The processor receives a third input included in the input data at a time delayed by a second interval from the time the second input is received,
Obtaining a third result by performing an operation between the third input and the plurality of kernels,
An apparatus for obtaining the output data using the first result, the second result, and the third result.
뉴럴 네트워크 장치가 제 1 입력 및 제 2 입력을 포함하는 입력 데이터에 대한 연산을 수행하는 방법에 있어서,
상기 뉴럴 네트워크 장치가 포함하는 프로세서를 이용하여, 서로 다른 딜레이 타임을 갖고 이미지 데이터를 나타내는 복수개의 데이터 스트림을 복수개의 입력단으로부터 수신하는 단계;
상기 복수개의 데이터 스트림으로부터 상기 제 1 입력 및 상기 제 2 입력을 수신하는 단계;
상기 제 1 입력과 복수개의 커널 간의 연산을 수행하여 제 1 결과를 획득하는 단계;
상기 제 1 입력이 수신된 시점에서 제 1 인터벌(interval)만큼 딜레이된 시점에 수신된 상기 제 2 입력과 상기 복수개의 커널 간의 연산을 수행하여 제 2 결과를 획득하는 단계; 및
상기 제 1 결과와 상기 제 2 결과를 이용하여 상기 입력 데이터에 대한 출력 데이터를 획득하는 단계를 포함하는 방법.
In a method for a neural network device to perform an operation on input data including a first input and a second input,
Receiving a plurality of data streams representing image data with different delay times from a plurality of input terminals using a processor included in the neural network device;
receiving the first input and the second input from the plurality of data streams;
Obtaining a first result by performing an operation between the first input and a plurality of kernels;
Obtaining a second result by performing an operation between the second input received at a time delayed by a first interval from the time the first input is received and the plurality of kernels; and
A method comprising obtaining output data for the input data using the first result and the second result.
제 11 항에 있어서,
상기 뉴럴 네트워크 장치는 뉴로모픽 하드웨어를 포함하고,
상기 뉴로모픽 하드웨어는 상기 제 1 입력과 상기 제 2 입력을 이용하여 CNN(Convolution Neural Network) 매핑을 수행하는 방법.
According to claim 11,
The neural network device includes neuromorphic hardware,
A method in which the neuromorphic hardware performs CNN (Convolution Neural Network) mapping using the first input and the second input.
제 11 항에 있어서,
상기 입력 데이터는 이미지 데이터를 포함하고,
상기 제 1 입력은 상기 이미지 데이터의 제 1 영역에 대한 데이터를 포함하고, 상기 제 2 입력은 상기 이미지 데이터의 제 2 영역에 대한 데이터를 포함하는 방법.
According to claim 11,
The input data includes image data,
The method of claim 1, wherein the first input includes data for a first region of the image data, and the second input includes data for a second region of the image data.
제 13 항에 있어서,
상기 제 1 영역과 상기 제 2 영역은 일부 중첩되고 상호 인접한 방법.
According to claim 13,
The first area and the second area partially overlap and are adjacent to each other.
제 14 항에 있어서,
상기 제 2 결과를 획득하는 단계는
상기 제 2 입력이 유효한 입력인지 여부를 결정하는 단계; 및
상기 제 2 입력이 유효한 입력인 경우, 상기 제 2 입력과 상기 복수개의 커널 간의 연산을 수행하여 상기 제 2 결과를 획득하는 단계를 포함하는 방법.
According to claim 14,
The step of obtaining the second result is
determining whether the second input is a valid input; and
When the second input is a valid input, performing an operation between the second input and the plurality of kernels to obtain the second result.
제 15 항에 있어서,
상기 제 2 입력이 상기 유효한 입력인지 여부를 결정하는 단계는
상기 제 2 입력이 상기 제 2 영역을 구성하는 픽셀 데이터인 경우 상기 제 2 입력을 상기 유효한 입력으로 결정하는 단계를 포함하는 방법.
According to claim 15,
The step of determining whether the second input is the valid input is
A method comprising determining the second input as the valid input when the second input is pixel data constituting the second area.
삭제delete 제 11 항에 있어서,
상기 제 1 입력은 제 1 사이클 동안 수신되고,
상기 제 2 입력은 상기 제 1 사이클보다 상기 제 1 인터벌만큼 딜레이된 제 2 사이클 동안 수신되는 방법.
According to claim 11,
the first input is received during a first cycle,
The method wherein the second input is received during a second cycle delayed from the first cycle by the first interval.
제 11 항에 있어서,
상기 제 1 결과를 획득하는 단계는 상기 제 1 입력과 상기 복수개의 커널 간의 연산 결과들을 더하여 상기 제 1 결과를 획득하고,
상기 제 2 결과를 획득하는 단계는 상기 제 2 입력과 상기 복수개의 커널 간의 연산 결과들을 더하여 상기 제 2 결과를 획득하는 방법.
According to claim 11,
The step of obtaining the first result includes obtaining the first result by adding operation results between the first input and the plurality of kernels,
In the step of obtaining the second result, the second result is obtained by adding operation results between the second input and the plurality of kernels.
제 11 항에 있어서,
상기 프로세서를 이용하여, 상기 제 2 입력이 수신된 시점에서 제 2 인터벌만큼 딜레이된 시점에 상기 입력 데이터에 포함되는 제 3 입력을 수신하는 단계;
상기 제 3 입력과 상기 복수개의 커널 간의 연산을 수행하여 제 3 결과를 획득하는 단계; 및
상기 제 1 결과, 상기 제 2 결과 및 상기 제 3 결과를 이용하여 상기 출력 데이터를 획득하는 단계를 더 포함하는 방법.
According to claim 11,
Using the processor, receiving a third input included in the input data at a time delayed by a second interval from the time the second input is received;
Obtaining a third result by performing an operation between the third input and the plurality of kernels; and
The method further includes obtaining the output data using the first result, the second result, and the third result.
제 11 항 내지 제 16 항 및 제 18 항 내지 제 20 항 중 어느 한 항의 방법을 구현하기 위하여 기록매체에 저장된 컴퓨터 프로그램.A computer program stored in a recording medium for implementing the method of any one of claims 11 to 16 and 18 to 20.
KR1020180005250A 2017-11-08 2018-01-15 Neural network device and operation method of the same KR102578826B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/170,081 US11521046B2 (en) 2017-11-08 2018-10-25 Time-delayed convolutions for neural network device and method

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US201762583171P 2017-11-08 2017-11-08
US201762583116P 2017-11-08 2017-11-08
US62/583,116 2017-11-08
US62/583,171 2017-11-08

Publications (2)

Publication Number Publication Date
KR20190052587A KR20190052587A (en) 2019-05-16
KR102578826B1 true KR102578826B1 (en) 2023-09-15

Family

ID=66672087

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180005250A KR102578826B1 (en) 2017-11-08 2018-01-15 Neural network device and operation method of the same

Country Status (1)

Country Link
KR (1) KR102578826B1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210014902A (en) * 2019-07-31 2021-02-10 삼성전자주식회사 Processor and control method thereof
CN112418389A (en) * 2019-08-23 2021-02-26 北京希姆计算科技有限公司 Data processing method and device, electronic equipment and computer readable storage medium
KR102374525B1 (en) * 2019-09-06 2022-03-16 주식회사 하이퍼커넥트 Keyword Spotting Apparatus, Method and Computer Readable Recording Medium Thereof
KR102503403B1 (en) * 2020-01-09 2023-02-23 포항공과대학교 산학협력단 Pseudo vector matrix multiplication neural network by controlling weights with conductance and puse width
CN116530996B (en) * 2023-06-26 2023-08-29 广东技术师范大学 Low-measurement-load-oriented electrocardiographic data abnormality early warning method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101709085B1 (en) * 2015-12-16 2017-02-23 서강대학교산학협력단 Shot Boundary Detection method and apparatus using Convolutional Neural Networks
US20180373981A1 (en) 2017-06-21 2018-12-27 TuSimple Method and device for optimizing neural network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160133924A (en) * 2015-05-14 2016-11-23 한국전자통신연구원 Apparatus and method for convolution operation
KR102325602B1 (en) * 2015-07-06 2021-11-12 삼성전자주식회사 Device and method to process data in parallel
KR101803471B1 (en) * 2016-02-15 2017-12-01 성균관대학교 산학협력단 Deep learning system and learning method using of convolutional neural network based image patterning
KR20170117861A (en) * 2016-04-14 2017-10-24 에스케이하이닉스 주식회사 Neural Network Systems
KR20170118520A (en) * 2016-04-15 2017-10-25 삼성전자주식회사 Interface neural network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101709085B1 (en) * 2015-12-16 2017-02-23 서강대학교산학협력단 Shot Boundary Detection method and apparatus using Convolutional Neural Networks
US20180373981A1 (en) 2017-06-21 2018-12-27 TuSimple Method and device for optimizing neural network

Also Published As

Publication number Publication date
KR20190052587A (en) 2019-05-16

Similar Documents

Publication Publication Date Title
KR102578826B1 (en) Neural network device and operation method of the same
US11521046B2 (en) Time-delayed convolutions for neural network device and method
KR102662349B1 (en) Superpixel methods for convolutional neural networks
US11055608B2 (en) Convolutional neural network
Cheng et al. TIME: A training-in-memory architecture for RRAM-based deep neural networks
JP7399517B2 (en) Memristor-based neural network parallel acceleration method, processor, and device
CN112825153A (en) Data processing method in neural network system and neural network system
US20200117986A1 (en) Efficient processing of convolutional neural network layers using analog-memory-based hardware
KR20200069901A (en) A method for slicing a neural network and a neuromorphic apparatus
US20210319293A1 (en) Neuromorphic device and operating method of the same
KR102618546B1 (en) 2-dimensional array based neuromorphic processor and operating method for the same
KR20220010362A (en) Neural network apparatus and operating method of the same
US20210383203A1 (en) Apparatus and method with neural network
US20210365765A1 (en) Neuromorphic device and method
JP2021197176A (en) Neural network apparatus performing floating-point operations and operating method of the same
CN112668381A (en) Method and apparatus for recognizing image
CN114241245A (en) Image classification system based on residual error capsule neural network
US11054997B2 (en) Artificial neural networks in memory
Sun et al. Quaternary synapses network for memristor-based spiking convolutional neural networks
JP2021082818A (en) Nonvolatile memory element and operation method for the same
KR102650660B1 (en) Neuromorphic apparatus and method for processing multi-bits neuromorphic operation thereof
KR20230090849A (en) Neural network apparatus and electronic system including the same
Liu et al. ReRAM-based Circuit and System Design for Future Storage and Computing
Zhang et al. 1S-1R array: Pure-memristor circuit for binary neural networks
KR102311659B1 (en) Apparatus for computing based on convolutional neural network model and method for operating the same

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