WO2022080634A1 - 인공 신경망 학습 방법 및 이를 지원하는 전자 장치 - Google Patents

인공 신경망 학습 방법 및 이를 지원하는 전자 장치 Download PDF

Info

Publication number
WO2022080634A1
WO2022080634A1 PCT/KR2021/009491 KR2021009491W WO2022080634A1 WO 2022080634 A1 WO2022080634 A1 WO 2022080634A1 KR 2021009491 W KR2021009491 W KR 2021009491W WO 2022080634 A1 WO2022080634 A1 WO 2022080634A1
Authority
WO
WIPO (PCT)
Prior art keywords
neural network
artificial neural
processor
electronic device
learning
Prior art date
Application number
PCT/KR2021/009491
Other languages
English (en)
French (fr)
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 US17/429,185 priority Critical patent/US20220309352A1/en
Publication of WO2022080634A1 publication Critical patent/WO2022080634A1/ko

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/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections

Definitions

  • Embodiments disclosed in this document relate to an artificial neural network learning method and an electronic device supporting the same.
  • An artificial intelligence system is a computer system that implements human-level intelligence. It is a system in which a machine learns and judges on its own, and the recognition rate improves the more it is used.
  • Artificial intelligence technology is a machine learning (e.g., deep learning) technology that uses an algorithm that classifies and/or learns the characteristics of input data by itself, and element technologies that use machine learning algorithms to simulate functions such as cognition and judgment of the human brain.
  • Artificial intelligence technology can provide services such as object recognition and voice recognition by using a neural network included in an artificial intelligence system.
  • the element technology may include, for example, a linguistic understanding technology for recognizing human language or characters.
  • Linguistic understanding is a technology for recognizing, applying, and processing human language or characters, and may include natural language processing, machine translation, dialogue systems, question and answer, speech recognition and/or synthesis, and the like.
  • An electronic device may require a high degree of computational power and a significant amount of data for training of an artificial neural network. Therefore, it may be limited to perform artificial neural network learning using a portable electronic device (eg, a smart phone). Therefore, the portable electronic device transmits data required for learning of the artificial neural network to the high-performance electronic device, and the high-performance electronic device synchronizes the artificial neural network learned based on the data with the artificial neural network in the portable electronic device.
  • a portable electronic device eg, a smart phone
  • an artificial neural network when an artificial neural network is trained in a portable electronic device, additional or repetitive functions (eg fingerprint recognition and/or face recognition) for a specified function (eg fingerprint recognition and/or face recognition) are used using the user's personal information (eg, user's fingerprint information and/or face information). Training (eg fine-tuning) may be required.
  • personal information requiring security must be transmitted to the outside (eg, a high-performance electronic device).
  • An electronic device stores at least one artificial neural network including a first processor, a second processor, and an input layer and an output layer, and is configured in the first processor and the second processor. It may include a memory that is operatively coupled.
  • the first processor receives an artificial neural network training request, inputs input data to an input layer of the first artificial neural network, performs a forward propagation operation, and based on the forward propagation operation to store the generated first result data in the memory.
  • the second processor inputs the first result data to an output layer of a second artificial neural network to perform a backward propagation operation, and based on the backward propagation operation, a weight included in the second artificial neural network ) can be set to update.
  • a method for an electronic device to perform an artificial neural network training operation includes an operation of receiving an artificial neural network training request, and an operation of receiving input data through a first processor. Input to the input layer of the neural network to perform a forward propagation operation, storing first result data generated based on the forward propagation operation in the memory, and converting the first result data to a second artificial neural network and performing a backward propagation operation by inputting it to the output layer of , and updating weights included in the second artificial neural network based on the backward propagation operation.
  • the electronic device may provide an efficient learning function by performing computational processing using hardware components and/or software components optimized for each step required for artificial neural network learning.
  • the electronic device transmits personal information (eg, user's fingerprint information and/or face information) that requires relatively high security among data required for artificial neural network learning to the outside (eg, high performance).
  • the fine-tuning operation may be performed by using it itself without transmitting it to an electronic device).
  • FIG. 1 is a block diagram of an electronic device in a network environment, according to an embodiment.
  • FIG. 2 is a block diagram illustrating components included in an electronic device, according to an embodiment.
  • FIG. 3 is a conceptual diagram illustrating an operation in which an electronic device performs a training operation on an artificial neural network, according to an embodiment.
  • FIG. 4 is a block diagram illustrating components of an electronic device including a learning distribution unit, according to an embodiment.
  • FIG. 5 is a block diagram illustrating components of an electronic device including a learning distribution unit, according to an embodiment.
  • FIG. 6 is a block diagram illustrating components of an electronic device including a learning distribution unit, according to an embodiment.
  • FIG. 7 is a flowchart illustrating an operation of an electronic device, according to an embodiment.
  • FIG. 8 is a flowchart illustrating an operation of an electronic device, according to an embodiment.
  • FIG. 9 is a flowchart illustrating an operation of an electronic device, according to an embodiment.
  • FIG. 10 is a flowchart illustrating an operation of an electronic device, according to an embodiment.
  • FIG. 1 is a block diagram of an electronic device 101 in a network environment 100 according to an embodiment.
  • an electronic device 101 communicates with an electronic device 102 through a first network 198 (eg, a short-range wireless communication network) or a second network 199 . It may communicate with the electronic device 104 or the server 108 through (eg, a long-distance wireless communication network). According to an embodiment, the electronic device 101 may communicate with the electronic device 104 through the server 108 .
  • the electronic device 101 includes a processor 120 , a memory 130 , an input module 150 , a sound output module 155 , a display module 160 , an audio module 170 , and a sensor module ( 176), interface 177, connection terminal 178, haptic module 179, camera module 180, power management module 188, battery 189, communication module 190, subscriber identification module 196 , or an antenna module 197 may be included.
  • at least one of these components eg, the connection terminal 178
  • may be omitted or one or more other components may be added to the electronic device 101 .
  • some of these components are integrated into one component (eg, display module 160 ). can be
  • the processor 120 for example, executes software (eg, a program 140) to execute at least one other component (eg, a hardware or software component) of the electronic device 101 connected to the processor 120 . It can control and perform various data processing or operations. According to one embodiment, as at least part of data processing or operation, the processor 120 converts commands or data received from other components (eg, the sensor module 176 or the communication module 190 ) to the volatile memory 132 . may be stored in the volatile memory 132 , and may process commands or data stored in the volatile memory 132 , and store the result data in the non-volatile memory 134 .
  • software eg, a program 140
  • the processor 120 converts commands or data received from other components (eg, the sensor module 176 or the communication module 190 ) to the volatile memory 132 .
  • the volatile memory 132 may be stored in the volatile memory 132 , and may process commands or data stored in the volatile memory 132 , and store the result data in the non-volatile memory 134 .
  • the processor 120 is the main processor 121 (eg, a central processing unit or an application processor) or a secondary processor 123 (eg, a graphic processing unit, a neural network processing unit) a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor).
  • the main processor 121 e.g, a central processing unit or an application processor
  • a secondary processor 123 eg, a graphic processing unit, a neural network processing unit
  • NPU neural processing unit
  • an image signal processor e.g., a sensor hub processor, or a communication processor.
  • the main processor 121 e.g, a central processing unit or an application processor
  • a secondary processor 123 eg, a graphic processing unit, a neural network processing unit
  • NPU neural processing unit
  • an image signal processor e.g., a sensor hub processor, or a communication processor.
  • the main processor 121 e.g, a central processing unit or an application processor
  • a secondary processor 123
  • the auxiliary processor 123 is, for example, on behalf of the main processor 121 while the main processor 121 is in an inactive (eg, sleep) state, or the main processor 121 is active (eg, executing an application). ), together with the main processor 121, at least one of the components of the electronic device 101 (eg, the display module 160, the sensor module 176, or the communication module 190) It is possible to control at least some of the related functions or states.
  • the co-processor 123 eg, an image signal processor or a communication processor
  • may be implemented as part of another functionally related component eg, the camera module 180 or the communication module 190. there is.
  • the auxiliary processor 123 may include a hardware structure specialized for processing an artificial intelligence model.
  • Artificial intelligence models can be created through machine learning. Such learning may be performed, for example, in the electronic device 101 itself on which artificial intelligence is performed, or may be performed through a separate server (eg, the server 108).
  • the learning algorithm may include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but in the above example not limited
  • the artificial intelligence model may include a plurality of artificial neural network layers.
  • Artificial neural networks include deep neural networks (DNNs), convolutional neural networks (CNNs), recurrent neural networks (RNNs), restricted boltzmann machines (RBMs), deep belief networks (DBNs), bidirectional recurrent deep neural networks (BRDNNs), It may be one of deep Q-networks or a combination of two or more of the above, but is not limited to the above example.
  • the artificial intelligence model may include, in addition to, or alternatively, a software structure in addition to the hardware structure.
  • the memory 130 may store various data used by at least one component of the electronic device 101 (eg, the processor 120 or the sensor module 176 ).
  • the data may include, for example, input data or output data for software (eg, the program 140 ) and instructions related thereto.
  • the memory 130 may include a volatile memory 132 or a non-volatile memory 134 .
  • the program 140 may be stored as software in the memory 130 , and may include, for example, an operating system 142 , middleware 144 , or an application 146 .
  • the input module 150 may receive a command or data to be used in a component (eg, the processor 120 ) of the electronic device 101 from the outside (eg, a user) of the electronic device 101 .
  • the input module 150 may include, for example, a microphone, a mouse, a keyboard, a key (eg, a button), or a digital pen (eg, a stylus pen).
  • the sound output module 155 may output a sound signal to the outside of the electronic device 101 .
  • the sound output module 155 may include, for example, a speaker or a receiver.
  • the speaker can be used for general purposes such as multimedia playback or recording playback.
  • the receiver may be used to receive an incoming call. According to one embodiment, the receiver may be implemented separately from or as part of the speaker.
  • the display module 160 may visually provide information to the outside (eg, a user) of the electronic device 101 .
  • the display module 160 may include, for example, a control circuit for controlling a display, a hologram device, or a projector and a corresponding device.
  • the display module 160 may include a touch sensor configured to sense a touch or a pressure sensor configured to measure the intensity of a force generated by the touch.
  • the audio module 170 may convert a sound into an electric signal or, conversely, convert an electric signal into a sound. According to an embodiment, the audio module 170 acquires a sound through the input module 150 , or an external electronic device (eg, a sound output module 155 ) connected directly or wirelessly with the electronic device 101 . A sound may be output through the electronic device 102 (eg, a speaker or headphones).
  • an external electronic device eg, a sound output module 155
  • a sound may be output through the electronic device 102 (eg, a speaker or headphones).
  • the sensor module 176 detects an operating state (eg, power or temperature) of the electronic device 101 or an external environmental state (eg, user state), and generates an electrical signal or data value corresponding to the sensed state. can do.
  • the sensor module 176 may include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, It may include a temperature sensor, a humidity sensor, or an illuminance sensor.
  • the interface 177 may support one or more designated protocols that may be used by the electronic device 101 to directly or wirelessly connect with an external electronic device (eg, the electronic device 102 ).
  • the interface 177 may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.
  • HDMI high definition multimedia interface
  • USB universal serial bus
  • SD card interface Secure Digital Card
  • the connection terminal 178 may include a connector through which the electronic device 101 can be physically connected to an external electronic device (eg, the electronic device 102 ).
  • the connection terminal 178 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (eg, a headphone connector).
  • the haptic module 179 may convert an electrical signal into a mechanical stimulus (eg, vibration or movement) or an electrical stimulus that the user can perceive through tactile or kinesthetic sense.
  • the haptic module 179 may include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
  • the camera module 180 may capture still images and moving images. According to an embodiment, the camera module 180 may include one or more lenses, image sensors, image signal processors, or flashes.
  • the power management module 188 may manage power supplied to the electronic device 101 .
  • the power management module 188 may be implemented as, for example, at least a part of a power management integrated circuit (PMIC).
  • PMIC power management integrated circuit
  • the battery 189 may supply power to at least one component of the electronic device 101 .
  • battery 189 may include, for example, a non-rechargeable primary cell, a rechargeable secondary cell, or a fuel cell.
  • the communication module 190 is a direct (eg, wired) communication channel or a wireless communication channel between the electronic device 101 and an external electronic device (eg, the electronic device 102, the electronic device 104, or the server 108). It can support establishment and communication performance through the established communication channel.
  • the communication module 190 may include one or more communication processors that operate independently of the processor 120 (eg, an application processor) and support direct (eg, wired) communication or wireless communication.
  • the communication module 190 is a wireless communication module 192 (eg, a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module 194 (eg, : It may include a LAN (local area network) communication module, or a power line communication module).
  • GNSS global navigation satellite system
  • a corresponding communication module among these communication modules is a first network 198 (eg, a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network 199 (eg, legacy It may communicate with the external electronic device 104 through a cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (eg, a telecommunication network such as a LAN or a WAN).
  • a first network 198 eg, a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)
  • a second network 199 eg, legacy It may communicate with the external electronic device 104 through a cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (eg, a telecommunication network such as a LAN or a WAN).
  • a telecommunication network
  • the wireless communication module 192 uses the subscriber information (eg, International Mobile Subscriber Identifier (IMSI)) stored in the subscriber identification module 196 within a communication network such as the first network 198 or the second network 199 .
  • the electronic device 101 may be identified or authenticated.
  • the wireless communication module 192 may support a 5G network after a 4G network and a next-generation communication technology, for example, a new radio access technology (NR).
  • NR access technology includes high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and access to multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency) -latency communications)).
  • eMBB enhanced mobile broadband
  • mMTC massive machine type communications
  • URLLC ultra-reliable and low-latency
  • the wireless communication module 192 may support a high frequency band (eg, mmWave band) to achieve a high data rate, for example.
  • a high frequency band eg, mmWave band
  • the wireless communication module 192 includes various technologies for securing performance in a high-frequency band, for example, beamforming, massive multiple-input and multiple-output (MIMO), all-dimensional multiplexing. It may support technologies such as full dimensional MIMO (FD-MIMO), an array antenna, analog beam-forming, or a large scale antenna.
  • the wireless communication module 192 may support various requirements specified in the electronic device 101 , an external electronic device (eg, the electronic device 104 ), or a network system (eg, the second network 199 ).
  • the wireless communication module 192 may include a peak data rate (eg, 20 Gbps or more) for realizing eMBB, loss coverage (eg, 164 dB or less) for realizing mMTC, or U-plane latency for realizing URLLC ( Example: downlink (DL) and uplink (UL) each 0.5 ms or less, or round trip 1 ms or less).
  • a peak data rate eg, 20 Gbps or more
  • loss coverage eg, 164 dB or less
  • U-plane latency for realizing URLLC
  • the antenna module 197 may transmit or receive a signal or power to the outside (eg, an external electronic device).
  • the antenna module 197 may include an antenna including a conductor formed on a substrate (eg, a PCB) or a radiator formed of a conductive pattern.
  • the antenna module 197 may include a plurality of antennas (eg, an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network such as the first network 198 or the second network 199 is connected from the plurality of antennas by, for example, the communication module 190 . can be selected. A signal or power may be transmitted or received between the communication module 190 and an external electronic device through the selected at least one antenna.
  • other components eg, a radio frequency integrated circuit (RFIC)
  • RFIC radio frequency integrated circuit
  • the antenna module 197 may form a mmWave antenna module.
  • the mmWave antenna module comprises a printed circuit board, an RFIC disposed on or adjacent to a first side (eg, bottom side) of the printed circuit board and capable of supporting a designated high frequency band (eg, mmWave band); and a plurality of antennas (eg, an array antenna) disposed on or adjacent to a second side (eg, top or side) of the printed circuit board and capable of transmitting or receiving signals of the designated high frequency band. can do.
  • peripheral devices eg, a bus, general purpose input and output (GPIO), serial peripheral interface (SPI), or mobile industry processor interface (MIPI)
  • GPIO general purpose input and output
  • SPI serial peripheral interface
  • MIPI mobile industry processor interface
  • the command or data may be transmitted or received between the electronic device 101 and the external electronic device 104 through the server 108 connected to the second network 199 .
  • Each of the external electronic devices 102 or 104 may be the same as or different from the electronic device 101 .
  • all or a part of operations executed in the electronic device 101 may be executed in one or more external electronic devices 102 , 104 , or 108 .
  • the electronic device 101 may perform the function or service itself instead of executing the function or service itself.
  • one or more external electronic devices may be requested to perform at least a part of the function or the service.
  • One or more external electronic devices that have received the request may execute at least a part of the requested function or service, or an additional function or service related to the request, and transmit a result of the execution to the electronic device 101 .
  • the electronic device 101 may process the result as it is or additionally and provide it as at least a part of a response to the request.
  • cloud computing distributed computing, mobile edge computing (MEC), or client-server computing technology may be used.
  • the electronic device 101 may provide an ultra-low latency service using, for example, distributed computing or mobile edge computing.
  • the external electronic device 104 may include an Internet of things (IoT) device.
  • Server 108 may be an intelligent server using machine learning and/or neural networks.
  • the external electronic device 104 or the server 108 may be included in the second network 199 .
  • the electronic device 101 may be applied to an intelligent service (eg, smart home, smart city, smart car, or health care) based on 5G communication technology and IoT-related technology.
  • An electronic device may be a device of various types.
  • the electronic device may include, for example, a portable communication device (eg, a smart phone), a computer device, a portable multimedia device, a portable medical device, a camera, a wearable device, or a home appliance device.
  • a portable communication device eg, a smart phone
  • a computer device e.g., a smart phone
  • a portable multimedia device e.g., a portable medical device
  • a camera e.g., a camera
  • a wearable device e.g., a smart bracelet
  • first, second, or first or second may be used simply to distinguish the element from other elements in question, and may refer to elements in other aspects (e.g., importance or order) is not limited. It is said that one (eg, first) component is “coupled” or “connected” to another (eg, second) component, with or without the terms “functionally” or “communicatively”. When referenced, it means that one component can be connected to the other component directly (eg by wire), wirelessly, or through a third component.
  • module used in the embodiments of this document may include a unit implemented in hardware, software, or firmware, and is, for example, used interchangeably with terms such as logic, logic block, component, or circuit.
  • a module may be an integrally formed part or a minimum unit or a part of the part that performs one or more functions.
  • the module may be implemented in the form of an application-specific integrated circuit (ASIC).
  • ASIC application-specific integrated circuit
  • Embodiments of this document include one or more instructions stored in a storage medium (eg, internal memory 136 or external memory 138) readable by a machine (eg, electronic device 101). It may be implemented as included software (eg, the program 140). For example, a processor (eg, processor 120 ) of a device (eg, electronic device 101 ) may call at least one command among one or more commands stored from a storage medium and execute it. This makes it possible for the device to be operated to perform at least one function according to the called at least one command.
  • the one or more instructions may include code generated by a compiler or code executable by an interpreter.
  • the device-readable storage medium may be provided in the form of a non-transitory storage medium.
  • 'non-transitory' only means that the storage medium is a tangible device and does not include a signal (eg, electromagnetic wave), and this term is used in cases where data is semi-permanently stored in the storage medium and It does not distinguish between temporary storage cases.
  • a signal eg, electromagnetic wave
  • the method according to the embodiments disclosed in this document may be provided in a computer program product (computer program product).
  • Computer program products may be traded between sellers and buyers as commodities.
  • the computer program product is distributed in the form of a machine-readable storage medium (eg compact disc read only memory (CD-ROM)), or via an application store (eg Play StoreTM) or on two user devices ( It can be distributed (eg downloaded or uploaded) directly between smartphones (eg: smartphones) and online.
  • a part of the computer program product may be temporarily stored or temporarily created in a machine-readable storage medium such as a memory of a server of a manufacturer, a server of an application store, or a relay server.
  • each component (eg, module or program) of the above-described components may include a singular or a plurality of entities, and some of the plurality of entities may be separately disposed in other components.
  • one or more components or operations among the above-described corresponding components may be omitted, or one or more other components or operations may be added.
  • a plurality of components eg, a module or a program
  • the integrated component may perform one or more functions of each component of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. .
  • operations performed by a module, program, or other component are executed sequentially, in parallel, repeatedly, or heuristically, or one or more of the operations are executed in a different order, omitted, or , or one or more other operations may be added.
  • FIG. 2 is a block diagram 200 illustrating components included in the electronic device 201 according to an exemplary embodiment.
  • the electronic device 201 (eg, the electronic device 101 of FIG. 1 ) includes the processor 220 (eg, the processor 120 of FIG. 1 ) and/or the memory 230 ( For example, the memory 130 of FIG. 1) may be included.
  • the processor 220 may include a main processor 221 (eg, the main processor 221 of FIG. 1 ) and an auxiliary processor 223 (eg, the auxiliary processor 223 of FIG. 1 ).
  • the components shown in FIG. 2 are exemplary, and the embodiments disclosed in this document are not limited thereto.
  • the auxiliary processor 223 may be implemented as a part of the main processor 221 .
  • the electronic device 201 may further include not-shown components or may not include some of the illustrated components.
  • the processor 220 may be operatively coupled to the memory 230 .
  • the memory 430 may store one or more instructions that, when executed, cause the processor 220 to perform various operations of the electronic device 201 .
  • the processor 220 may include a main processor 221 and an auxiliary processor 223 .
  • the main processor 221 may be a central processing unit (CPU) or a graphic processing unit (GPU).
  • the auxiliary processor 223 may be a Neural Processing Unit (NPU).
  • the main processor 221 and the auxiliary processor 223 may be operatively connected.
  • the processor 220 may allocate different data (eg, learning data) to the main processor 221 and the auxiliary processor 223 .
  • the main processor 221 may perform at least a part of a training operation of an artificial neural network.
  • the main processor 221 may perform a backward propagation operation by inputting learning data into a de-quantized artificial neural network.
  • the main processor 221 may update (eg, update) weights of a plurality of layers included in the artificial neural network through a backpropagation operation.
  • the main processor 221 may store data (eg, weights before and/or updated weights) generated in the process of performing the backpropagation operation in the memory 230 .
  • the auxiliary processor 223 may perform at least a part of a learning operation of the artificial neural network. For example, it may be set to be specialized for a specified function (eg, forward propagation of an artificial neural network). For example, the coprocessor 223 inputs training data into a quantized artificial neural network to forward propagation. The auxiliary processor 223 may output the result data generated based on the training data input to the artificial neural network through the forward propagation operation The auxiliary processor 221 performs the forward propagation operation Data (eg, learning data input to the artificial neural network and/or result data) generated in the process may be stored in the memory 230 .
  • Data eg, learning data input to the artificial neural network and/or result data
  • the data processed through the artificial neural network in FIG. 2 may be data corresponding to an image, an image, an audio, or a combination thereof, but is not limited thereto.
  • the processor 220 is illustrated as including the main processor 221 and the auxiliary processor 223 in FIG. 2 , it may further include at least one auxiliary processor.
  • FIG. 3 is a conceptual diagram 300 illustrating an operation in which an electronic device performs a training operation on an artificial neural network, according to an embodiment.
  • the electronic device may perform a neural network processing operation by inputting learning data into an artificial neural network.
  • the electronic device inputs different training data to artificial neural networks (eg, a first artificial neural network or a second artificial neural network) generated by quantizing or de-quantizing one artificial neural network.
  • artificial neural networks eg, a first artificial neural network or a second artificial neural network
  • a neural network processing operation can be performed.
  • the electronic device may input the first learning data 313 stored in a memory (eg, the memory 130 of FIG. 1 ) to the first artificial neural network.
  • the first artificial neural network may be referred to as an artificial neural network generated by quantizing a pre-stored artificial neural network by the electronic device.
  • the electronic device may use an auxiliary processor (eg, the auxiliary processor 223 of FIG. 2 ) to perform a neural network processing operation (eg, the forward propagation operation 301 ) using the first artificial neural network.
  • the electronic device may cause the auxiliary processor (eg, a Neural Processing Unit (NPU)) to perform the forward propagation operation 301 by inputting the first training data 313 into the first artificial neural network.
  • NPU Neural Processing Unit
  • the coprocessor inputs the first training data 313 to the input layer 351 of the first artificial neural network, sequentially passes through the plurality of layers 352 to 357 in the order of reference numerals 352 to 357, and then the output layer 358 ), the generated first result data 315 may be output.
  • the first result data 315 may be referred to as input data of an artificial neural network different from the first artificial neural network (eg, a second artificial neural network).
  • the auxiliary processor may store at least some of data generated in the plurality of layers 352 to 357 in the memory in the process of performing the forward propagation operation 301 using the first artificial neural network.
  • the electronic device may input the first result data 315 generated through the output layer 358 of the first artificial neural network to the second artificial neural network.
  • the second artificial neural network may be referred to as an artificial neural network generated by de-quantizing a pre-stored artificial neural network by the electronic device.
  • the electronic device may use a main processor (eg, the main processor 221 of FIG. 2 ) to perform a neural network processing operation (eg, the backpropagation operation 302 ) using the second artificial neural network.
  • a main processor eg, a central processing unit (CPU) or a graphic processing unit (GPU) inputs the first result data 315 to the second artificial neural network to perform the backpropagation operation 302 .
  • the main processor inputs the first result data 315 to the output layer 358 of the second artificial neural network, and sequentially passes through the plurality of layers 352 to 357 in the order of reference numerals 357 to 352 to the input layer 351 .
  • the second result data 325 generated through ? may be output.
  • the main processor may store at least some of data generated in the plurality of layers 352 to 357 in the memory in the process of performing the backpropagation operation 302 using the second artificial neural network.
  • the operation of the electronic device acquiring result data through the artificial neural network may be repeatedly performed until a specified condition is satisfied. For example, the electronic device identifies the number of times preset by the user or the amount of learning data input to the artificial neural network, and when it is determined that the identification result does not satisfy a specified condition, the electronic device repeatedly performs the neural network processing operation using a plurality of processors. can be done with
  • FIG. 4 is a block diagram 400 illustrating components of an electronic device including a learning distribution unit 410 according to an embodiment.
  • the electronic device may control the plurality of processors 421 and 423 using the learning distribution unit 410 .
  • the learning distribution unit 410 may control to determine a processor to perform a processing operation of the artificial neural network.
  • the learning distribution unit 410 is configured by the main processor 421 (eg, the main processor 221 of FIG. 2 ) to generate a second artificial neural network (eg, a de-quantized artificial neural network). It can be used to control neural network processing operations (eg, backpropagation operations) to be performed.
  • the main processor 421 may load the second artificial neural network stored in the memory 430 (eg, the memory 130 of FIG. 1 ) and input training data to perform a backpropagation operation. there is.
  • the learning distribution unit 410 is a neural network using a first artificial neural network (eg, a quantized artificial neural network) by the auxiliary processor 423 (eg, the auxiliary processor 223 of FIG. 2 ). It can be controlled to perform processing operations (eg, forward propagation operations). For example, the auxiliary processor 423 may load the first artificial neural network stored in the memory 430 and input training data to perform a forward propagation operation.
  • a first artificial neural network eg, a quantized artificial neural network
  • the auxiliary processor 423 eg, the auxiliary processor 223 of FIG. 2 .
  • the auxiliary processor 423 may load the first artificial neural network stored in the memory 430 and input training data to perform a forward propagation operation.
  • the electronic device may further include a quantization module 425 operatively connected to the learning distribution unit 410 and the memory 430 .
  • the quantization module 425 may generate a new artificial neural network by quantizing the artificial neural network stored in the memory 430 .
  • the quantization module 425 may dequantize the quantized artificial neural network to generate a new artificial neural network (eg, a third artificial neural network).
  • the quantization module 425 may store the third artificial neural network in the memory 430 .
  • the processors 421 and 423 may store at least one data obtained using an artificial neural network in a memory.
  • the processors may repeatedly perform a neural network processing operation using the stored at least one data.
  • processors may perform neural network processing operations through different artificial neural networks.
  • the main processor 421 may be a component corresponding to a CPU and/or a GPU.
  • the electronic device may use a CPU and/or GPU optimized for decimal arithmetic in order to perform a neural network processing operation through the second artificial neural network.
  • the second artificial neural network may be defined as an artificial neural network including a weight having a decimal value in at least one layer.
  • the auxiliary processor 423 may be a component corresponding to the NPU.
  • the electronic device may use an NPU optimized for integer arithmetic in order to perform a neural network processing operation through the first artificial neural network.
  • the first artificial neural network may be defined as an artificial neural network including a weight having an integer value in at least one layer.
  • the electronic device may distribute a control signal for performing different neural network processing operations to at least one processor using the learning distribution unit 410 .
  • the quantization module 425 performs the quantization operation of the artificial neural network, but embodiments of the present document are not limited thereto.
  • the electronic device may perform a quantization operation and/or a non-quantization operation of the artificial neural network using the main processor 421 .
  • FIG. 5 is a block diagram 500 illustrating components of an electronic device including a learning distribution unit 510 according to an embodiment.
  • the memory 530 may include an artificial neural network storage 531 and a learning data storage 532 .
  • the artificial neural network storage 531 may store at least one artificial neural network (eg, a first artificial neural network and/or a second artificial neural network).
  • the electronic device eg, the electronic device 101 of FIG. 1
  • uses the CPU 521 or a quantization module eg, the quantization module 425 of FIG. 4
  • Neural networks can be quantized and/or de-quantized.
  • the electronic device may store the quantized and/or non-quantized artificial neural networks in the artificial neural network storage 531 .
  • the learning data storage unit 532 may store at least one piece of learning data.
  • the electronic device may store training data (eg, activation) used to perform a neural network processing operation (eg, forward propagation operation) through the NPU 523 in the training data storage 532 .
  • the electronic device may store training data used to perform a neural network processing operation (eg, a backpropagation operation) through the CPU 521 and/or GPU 522 in the training data storage unit 532 .
  • the electronic device may store data generated in the process of performing neural network processing using the CPU 521 , the GPU 522 , and/or the NPU 523 in the training data storage 532 .
  • the electronic device uses data stored in the memory 530 to perform a neural network processing operation through at least one processor (eg, the CPU 521 , the GPU 522 , and/or the NPU 523 ). can be loaded.
  • the electronic device may load at least one artificial neural network stored in the artificial neural network storage 531 into at least one processor to perform an artificial neural network learning operation.
  • the electronic device may load at least one training data stored in the training data storage 532 into at least one processor to perform an artificial neural network learning operation.
  • FIG. 6 is a block diagram 600 illustrating components of an electronic device including a learning distribution unit 630 according to an embodiment.
  • the electronic device (eg, the electronic device 101 of FIG. 1 ) stores various data required for training of an artificial neural network in a memory (eg, the memory 130 of FIG. 1 ). can be saved
  • the electronic device may store input data or output data for software (eg, the program 140 of FIG. 1 ) and a command related thereto in a memory.
  • the electronic device may store a program having a structure as shown in FIG. 6 .
  • the memory may store components having the block diagram 600 structure shown in FIG. 6 .
  • the components include an application 610 , a machine learning framework 620 , a library module 625 , a learning distribution unit 630 , an artificial neural network Hardware Abstraction Layer (HAL) layer 640 , and/or Drivers 651 , 653 , and 655 may be included.
  • HAL Hardware Abstraction Layer
  • the application 610 refers to a program for providing a predetermined function (eg, image taking, gaming, and/or search) to a user. can do.
  • a predetermined function eg, image taking, gaming, and/or search
  • the application 610 may be preloaded into the electronic device in the manufacturing stage of the electronic device.
  • the application may be downloaded or updated from an external electronic device (eg, the server 108 of FIG. 1 ).
  • the machine learning framework 620 provides various functions to the application 610 so that functions and/or information provided from one or more resources included in the electronic device may be used by the application 610 . ) can be provided.
  • the machine learning framework 620 may include a library module 625 .
  • the library module 625 may be included in the machine learning framework 620 .
  • the library module 625 may be referred to as a software module used by a compiler to add a new function through a programming language while a program is being executed.
  • the library module 625 may be a software module used when the electronic device learns an artificial neural network.
  • the library module 625 may be configured to perform various algorithms (eg, supervised learning, unsupervised learning, semi-supervised learning), or reinforcement related to learning of an artificial neural network. It may include reinforcement learning.
  • the library module 625 may provide a function of quantizing an artificial neural network included in the electronic device.
  • the library module 625 may include a processor (eg, : The processor 120 of Fig.
  • the library module 625 provides a user with a Software Development Kit (SDK) and/or Application Programming Interface (API). . can be changed from the previously set value.
  • SDK Software Development Kit
  • API Application Programming Interface
  • the library module 625 uses the SDK and/or API changed by the user. It is possible to perform a learning operation of the neural network.
  • the learning distribution unit 630 may transmit/receive data to and from the machine learning framework 620 and/or the artificial neural network HAL layer 640 .
  • the learning distribution unit 630 may classify learning data stored in a memory (eg, the memory 130 of FIG. 1 ) according to whether the artificial neural network is quantized.
  • the learning distribution unit 630 may allocate learning data for performing an artificial neural network learning operation to at least one of a plurality of processors included in the electronic device.
  • the learning distribution unit 630 may distribute and transmit data so that a plurality of processors perform a learning operation using different artificial neural networks.
  • the learning distribution unit 630 may allow a Neural Processing Unit (NPU) to perform a forward propagation operation by inputting learning data into a first artificial neural network (eg, a quantized artificial neural network). there is.
  • the training distribution unit 630 may include a CPU (Central Processing Unit) or a GPU (Graphic Processing Unit) to the second artificial neural network (eg, a de-quantized artificial neural network) to the training data (eg, the first The result data output by performing the forward propagation operation in the artificial neural network) can be input to perform the backward propagation operation.
  • NPU Neural Processing Unit
  • the training distribution unit 630 may include a CPU (Central Processing Unit) or a GPU (Graphic Processing Unit) to the second artificial neural network (eg, a de-quantized artificial neural network) to the training data (eg, the first
  • the result data output by performing the forward propagation operation in the artificial neural network can be input to perform the backward propagation operation.
  • the artificial neural network Hardware Abstraction Layer (HAL) layer 640 may perform a data transmission/reception operation between a plurality of layers.
  • the artificial neural network HAL layer 640 may manage an abstracted layer between at least one of hardware components included in the electronic device and the application 610 and the machine learning framework 620 .
  • the artificial neural network HAL layer 640 transmits at least a portion of data transmitted through the application 610 to a plurality of drivers (eg, a DSP driver 651 , an NPU driver 653 , and/or a GPU driver ( 655)) can be transmitted.
  • the artificial neural network HAL layer 640 may receive information transmitted by the machine learning framework 620 , generate a control signal based on the information, and transmit it to at least one of a plurality of drivers.
  • the Digital Signal Processor (DSP) driver 651 may provide an interface capable of controlling and/or managing the DSP.
  • the NPU driver 653 may provide an interface that can control and / or manage the NPU.
  • a DSP or NPU may be referred to as an example of the coprocessor 123 of FIG. 1 .
  • the GPU driver 655 may provide an interface capable of controlling and/or managing the GPU.
  • the GPU may be referred to as an example of the main processor 121 of FIG. 1 .
  • DSP, NPU, and/or GPU may be used for neural network processing through an artificial neural network.
  • the artificial neural network HAL layer 640 may transmit data to a CPU driver (not shown).
  • the CPU driver may provide an interface capable of controlling and/or managing the CPU (eg, the main processor 121 of FIG. 1 ).
  • FIG. 7 illustrates a flowchart 700 of an operation of an electronic device, according to an embodiment.
  • the electronic device may perform the operations of FIG. 7 .
  • the processor of the electronic device eg, the processor 120 of FIG. 1
  • the operations of FIG. 7 when instructions stored in the memory (eg, the memory 130 of FIG. 1 ) are executed. can be set.
  • the electronic device may receive a neural network training request.
  • the electronic device may receive a neural network learning request input by a user or a neural network learning request received based on a preset period.
  • the neural network learning request may include information related to an artificial neural network to perform a learning operation among at least one artificial neural network stored in a memory.
  • the electronic device may identify and/or determine an artificial neural network as a learning target based on the information.
  • the electronic device may input data to the first artificial neural network.
  • the first artificial neural network may include a first processor (eg, the main processor 121 of FIG. 1 ) or a quantization module (eg, the quantization module 425 of FIG. 4 ) with respect to the artificial neural network determined based on the neural network learning request. )) may correspond to an artificial neural network generated by performing a quantization operation.
  • the first artificial neural network may include at least one layer.
  • at least one layer in the first artificial neural network may include a weight having an integer value.
  • the electronic device may input at least a portion of the training data stored in the learning data storage unit (eg, the learning data storage unit 532 of FIG. 5 ) in the memory to the input layer of the first artificial neural network.
  • the neural network processing operation using the first artificial neural network may be performed by the first processor.
  • the electronic device may store data generated based on a forward propagation operation in a memory.
  • the forward propagation operation may correspond to an inference operation using an artificial neural network.
  • the electronic device performs a forward propagation operation in which input data is input to the first artificial neural network through the first processor, and the input data sequentially passes through at least one layer in the first artificial neural network to output the result data. can do.
  • the first processor may store at least a portion of data generated in at least one layer in the memory in the process of performing the forward propagation operation.
  • the electronic device may input data to the second artificial neural network.
  • the second artificial neural network may correspond to an artificial neural network generated by the first processor or quantization module performing a de-quantization operation on the artificial neural network determined based on the neural network learning request.
  • the second artificial neural network may include at least one layer.
  • at least one layer in the second artificial neural network may include a weight having a decimal value.
  • the electronic device may input at least a portion of the training data stored in the learning data storage unit in the memory to the output layer of the second artificial neural network.
  • the neural network processing operation using the second artificial neural network may be performed by a second processor (eg, the auxiliary processor 123 of FIG. 1 ).
  • the electronic device may update (or update) a weight included in the artificial neural network based on the backpropagation operation. For example, the electronic device may perform an operation of updating the weights included in the at least one layer while learning data input to the second artificial neural network sequentially passes through the at least one layer. The operation of updating the weights included in the artificial neural network may be performed by the second processor.
  • FIG. 8 illustrates a flowchart 800 of an operation of an electronic device, according to an embodiment.
  • the electronic device may perform the operations of FIG. 8 .
  • the processor of the electronic device eg, the processor 120 of FIG. 1
  • the operations of FIG. 8 when instructions stored in the memory (eg, the memory 130 of FIG. 1 ) are executed. can be set.
  • the electronic device may receive an artificial neural network training request.
  • the description of the operation of the electronic device receiving the artificial neural network learning request may be replaced with the description of operation 705 of FIG. 7 .
  • the electronic device may identify one or more processors.
  • the electronic device may distinguish and identify processors respectively corresponding to a plurality of operations (eg, forward propagation operation and backpropagation operation) required for artificial neural network learning.
  • the electronic device may identify the first processor (eg, the main processor 121 of FIG. 1 ) as a processor optimized for a forward propagation operation using an artificial neural network.
  • the electronic device may identify the second processor (eg, the auxiliary processor 123 of FIG. 1 ) as a processor optimized for a backpropagation operation using an artificial neural network.
  • the electronic device may allocate an artificial neural network learning operation. For example, the electronic device may allocate data for causing the first processor to perform a forward propagation operation using an artificial neural network. As another example, the electronic device may allocate data for causing the second processor to perform a backpropagation operation using an artificial neural network.
  • the electronic device may determine whether to terminate learning of the artificial neural network.
  • the electronic device may perform operation 825 .
  • the electronic device may perform operation 815 .
  • the electronic device may store the result data in the memory.
  • the electronic device may store data generated in a process of performing an artificial neural network learning operation in a memory.
  • FIG. 9 illustrates a flowchart 900 of an operation of an electronic device, according to an embodiment.
  • the electronic device may perform the operations of FIG. 9 .
  • the processor of the electronic device eg, the processor 120 of FIG. 1
  • the operations of FIG. 9 when instructions stored in the memory (eg, the memory 130 of FIG. 1 ) are executed. can be set.
  • the electronic device may receive an artificial neural network training request.
  • the description of the operation of the electronic device receiving the artificial neural network learning request may be replaced with the description of operation 705 of FIG. 7 .
  • the electronic device may determine whether a weight included in an artificial neural network to perform a learning operation corresponds to an integer value.
  • the electronic device may perform operation 913 .
  • the electronic device may perform operation 915 .
  • the electronic device may generate a first artificial neural network based on an artificial neural network that is a target of a learning operation.
  • the electronic device uses a first processor (eg, the main processor 121 of FIG. 1 ) or a quantization module (eg, the quantization module 425 of FIG. 4 ) to the artificial neural network that is the target of the learning operation.
  • a quantization operation may be performed.
  • the first artificial neural network may be referred to as an artificial neural network in which a quantization operation is performed on an artificial neural network that is a target of the learning operation.
  • the electronic device may generate a second artificial neural network based on an artificial neural network that is a target of a learning operation. For example, the electronic device may perform a de-quantization operation on the artificial neural network that is the target of the learning operation by using the first processor or the quantization module.
  • the second artificial neural network may be referred to as an artificial neural network in which a non-quantization operation is performed on an artificial neural network that is a target of the learning operation.
  • the electronic device may allocate different artificial neural networks to the plurality of processors. For example, the electronic device may load the first artificial neural network into the first processor (eg, the auxiliary processor 123 of FIG. 1 ). As another example, the electronic device may load the second artificial neural network into the second processor (eg, the main processor 121 of FIG. 1 ).
  • the electronic device may perform an artificial neural network learning operation. For example, in operation 920 , the electronic device may perform a learning operation of the artificial neural network based on data allocated to each processor.
  • FIG. 10 illustrates a flowchart 1000 of an operation of an electronic device, according to an embodiment.
  • the electronic device may perform the operations of FIG. 10 .
  • the processor of the electronic device eg, the processor 120 of FIG. 1
  • the operations of FIG. 10 when instructions stored in the memory (eg, the memory 130 of FIG. 1 ) are executed. can be set.
  • the electronic device may store result data through the forward propagation operation in the memory.
  • the electronic device may load the first artificial neural network into the first processor (eg, the auxiliary processor 123 of FIG. 1 ).
  • the first processor performs a forward propagation operation by inputting input data into the first artificial neural network, and receives at least a portion of data generated in at least one layer in the first artificial neural network in the process of performing the forward propagation operation. It can be stored in memory.
  • the electronic device may determine whether result data output through the forward propagation operation for the first artificial neural network satisfies a specified condition. For example, the electronic device may determine whether the result data satisfies the number of batches of input data.
  • the electronic device may perform operation 1015 .
  • the electronic device may repeatedly perform operation 1005 .
  • the electronic device may update the weight through a backpropagation operation.
  • the electronic device may load the second artificial neural network into the second processor (eg, the main processor 121 of FIG. 1 ).
  • the second processor may perform a backpropagation operation on the second artificial neural network, and update weights included in at least one layer in the second artificial neural network based on the backpropagation operation.
  • the electronic device quantizes the second artificial neural network whose weights are updated in operation 1015 .
  • the electronic device updates the weights included in the second artificial neural network through backpropagation, and then causes the first processor or quantization module (eg, the quantization module 425 of FIG. 4 ) to cause the second artificial neural network can be quantized to generate a third artificial neural network.
  • the electronic device may update the first artificial neural network loaded in the first processor to the third artificial neural network.
  • the electronic device may determine whether the number of times of learning the artificial neural network satisfies a specified number of times.
  • the electronic device may end the operation of learning the artificial neural network.
  • the electronic device may perform operation 1005 .
  • an electronic device stores at least one artificial neural network including a first processor, a second processor, and an input layer and an output layer, and operates on the first processor and the second processor. It may include a memory that is operatively connected.
  • the first processor receives an artificial neural network training request, inputs input data to the input layer of the first artificial neural network, performs a forward propagation operation, and the forward propagation Stores first result data generated based on the operation in the memory, and the second processor inputs the first result data to the output layer of a second artificial neural network to perform a backward propagation operation, , may be configured to update weights included in the second artificial neural network based on the backpropagation operation.
  • the first artificial neural network and the second artificial neural network further include at least one layer, and the first processor is generated from the at least one layer in the process of performing the forward propagation operation. store at least some of the data to be used in the memory, and the second processor may be configured to store in the memory at least some of the data generated in the at least one layer in the process of performing the backpropagation operation.
  • the first artificial neural network corresponds to an artificial neural network generated by the first processor performing a quantization operation on the artificial neural network determined based on the artificial neural network learning request
  • the second artificial neural network may correspond to an artificial neural network generated by the first processor performing a de-quantization operation on the artificial neural network determined based on the artificial neural network learning request.
  • the first processor generates a third artificial neural network by quantizing the second artificial neural network in which the weights are updated based on the back-propagation operation, and uses the third artificial neural network to generate the third artificial neural network. It can be set to store in memory.
  • At least one layer in the first artificial neural network and the third artificial neural network includes a weight having an integer value, and at least one layer in the second artificial neural network is a prime number.
  • a weight having a (decimal) value may be included.
  • the artificial neural network learning operation when it is determined that the artificial neural network learning operation satisfies a specified condition, the artificial neural network learning operation is terminated, and when it is determined that the artificial neural network learning operation does not satisfy the specified condition, the It may be set to repeatedly perform the artificial neural network learning operation.
  • SDK Software Development Kit
  • API Application Programming Interface
  • the input data used for forward propagation through the first processor may include activation data.
  • control unit further includes a learning distribution unit stored in the memory, wherein the learning distribution unit performs different neural network processing operations on the first processor or the second processor in response to the artificial neural network learning request. It may be set to distribute and transmit signals and data for learning of an artificial neural network.
  • the first processor may correspond to a neural processing unit (NPU)
  • the second processor may correspond to a central processing unit (CPU) or a graphic processing unit (GPU).
  • a method for an electronic device to perform an artificial neural network training operation includes: receiving an artificial neural network training request; An operation of performing a forward propagation operation by inputting it to an input layer of The method may include performing a backward propagation operation by inputting it to the output layer, and updating weights included in the second artificial neural network based on the backward propagation operation.
  • the first artificial neural network and the second artificial neural network further include at least one layer
  • the method for performing a neural network training operation includes the forward propagation operation.
  • the process of performing the operation of storing at least a portion of the data generated in the one or more layers in the memory and in the process of performing the backpropagation operation, at least a portion of the data generated in the at least one layer
  • the method may further include the operation of storing in the memory.
  • the first artificial neural network corresponds to an artificial neural network generated by the first processor performing a quantization operation on the artificial neural network determined based on the artificial neural network learning request
  • the second artificial neural network may correspond to an artificial neural network generated by the first processor performing a de-quantization operation on the artificial neural network determined based on the artificial neural network learning request.
  • the third artificial neural network is quantized by the second artificial neural network in which the weights are updated based on the back propagation operation.
  • the method may further include generating a neural network and storing the third artificial neural network in the memory.
  • At least one layer in the first artificial neural network and the third artificial neural network includes a weight having an integer value, and at least one layer in the second artificial neural network is a prime number.
  • a weight having a (decimal) value may be included.
  • the method of performing the neural network training operation includes, when it is determined that the artificial neural network learning operation satisfies a specified condition, terminating the artificial neural network training operation; The method may further include, when it is determined that the artificial neural network learning operation does not satisfy the specified condition, repeating the artificial neural network learning operation.
  • the method of performing the artificial neural network training operation receives an external input for changing an SDK or API setting value stored in a memory, and artificially based on the changed setting value.
  • the operation of performing a neural network learning operation may be further included.
  • a training distribution unit performs different neural network processing operations in the first processor or the second processor in response to the artificial neural network training request.
  • the method may further include an operation of distributing and transmitting a control signal for performing , and data for learning of an artificial neural network.

Abstract

제1 프로세서, 제2 프로세서, 및 입력 레이어 및 출력 레이어를 포함하는 적어도 하나의 인공 신경망을 저장하고, 상기 제1 프로세서 및 상기 제2 프로세서에 작동적으로(operatively) 연결되는 메모리를 포함하는 전자 장치가 개시된다. 상기 제1 프로세서는 인공 신경망 학습(training) 요청을 수신하고, 입력 데이터를 제1 인공 신경망의 상기 입력 레이어에 입력하여 순전파(forward propagation) 동작을 수행하고, 상기 순전파 동작에 기반하여 생성된 제1 결과 데이터를 상기 메모리에 저장하고, 상기 제2 프로세서는 상기 제1 결과 데이터를 제2 인공 신경망의 상기 출력 레이어에 입력하여 역전파(backward propagation) 동작을 수행하고, 상기 역전파 동작에 기반하여 상기 제2 인공 신경망에 포함된 가중치(weight)들을 갱신하도록 설정될 수 있다. 이 외에도, 명세서를 통하여 파악되는 다양한 실시예들이 가능할 수 있다.

Description

인공 신경망 학습 방법 및 이를 지원하는 전자 장치
본 문서에서 개시되는 실시 예들은, 인공 신경망 학습 방법 및 이를 지원하는 전자 장치에 관한 것이다.
인공지능 시스템은 인간 수준의 지능을 구현하는 컴퓨터 시스템으로서 기계가 스스로 학습하고 판단하며, 사용할수록 인식률이 향상되는 시스템이다.
인공지능 기술은 입력 데이터들의 특징을 스스로 분류 및/또는 학습하는 알고리즘을 이용하는 기계 학습(예: 딥러닝) 기술 및 기계 학습 알고리즘을 활용하여 인간 두뇌의 인지, 판단 등의 기능을 모사하는 요소 기술들로 구성된다. 인공지능 기술은 인공지능 시스템 내 포함된 뉴럴 네트워크(neural network)를 이용하여 사물 인식 및 음성 인식 등의 서비스를 제공할 수 있다.
요소 기술은, 일 예로, 인간의 언어 또는 문자를 인식하는 언어적 이해 기술을 포함할 수 있다. 언어적 이해는 인간의 언어 또는 문자를 인식하고 응용 및 처리하는 기술로서, 자연어 처리, 기계 번역, 대화 시스템, 질의 응답, 음성 인식 및/또는 합성 등을 포함할 수 있다.
종래 기술에 따른 전자 장치는 인공 신경망의 학습(training)을 위하여 고도의 연산 능력과 상당한 양의 데이터를 필요로 할 수 있었다. 따라서, 휴대용 전자 장치(예: 스마트 폰)를 이용하여 인공 신경망 학습을 수행하는 것은 제한적일 수 있었다. 따라서, 휴대용 전자 장치는 인공 신경망의 학습에 필요한 데이터를 고성능 전자 장치로 전송하고, 고성능 전자 장치에서 상기 데이터를 기반으로 학습된 인공 신경망과 휴대용 전자 장치 내의 인공 신경망을 동기화하는 방식으로 인공 신경망 학습 동작을 수행하는 어려움이 있었다.
또한, 휴대용 전자 장치에서 인공 신경망을 학습하는 경우 사용자의 개인 정보(예: 사용자의 지문 정보 및/또는 얼굴 정보)를 이용하여 지정된 기능(예: 지문 인식 및/또는 얼굴 인식)에 대한 추가적 또는 반복적 학습(예: fine-tuning)이 필요할 수 있다. 상술한 인공 신경망의 학습을 위해서, 보안이 필요한 개인 정보가 외부(예: 고성능 전자 장치)로 전송되어야 하는 문제점이 있었다.
본 문서에 개시되는 일 실시 예에 따른 전자 장치는, 제1 프로세서, 제2 프로세서, 및 입력 레이어 및 출력 레이어를 포함하는 적어도 하나의 인공 신경망을 저장하고, 상기 제1 프로세서 및 상기 제2 프로세서에 작동적으로(operatively) 연결되는 메모리를 포함할 수 있다. 예를 들어, 상기 제1 프로세서는 인공 신경망 학습(training) 요청을 수신하고, 입력 데이터를 제1 인공 신경망의 입력 레이어에 입력하여 순전파(forward propagation) 동작을 수행하고, 상기 순전파 동작에 기반하여 생성된 제1 결과 데이터를 상기 메모리에 저장하도록 설정될 수 있다. 상기 제2 프로세서는 상기 제1 결과 데이터를 제2 인공 신경망의 출력 레이어에 입력하여 역전파(backward propagation) 동작을 수행하고, 상기 역전파 동작에 기반하여 상기 제2 인공 신경망에 포함된 가중치(weight)들을 갱신하도록 설정될 수 있다.
본 문서에 개시되는 일 실시 예에 따른 전자 장치가 인공 신경망(neural network) 학습(training) 동작을 수행하는 방법은, 인공 신경망 학습 요청을 수신하는 동작, 제1 프로세서를 통해 입력 데이터를 제1 인공 신경망의 입력 레이어에 입력하여 순전파(forward propagation) 동작을 수행하고, 상기 순전파 동작에 기반하여 생성된 제1 결과 데이터를 상기 메모리에 저장하는 동작, 및 상기 제1 결과 데이터를 제2 인공 신경망의 상기 출력 레이어에 입력하여 역전파(backward propagation) 동작을 수행하고, 상기 역전파 동작에 기반하여 상기 제2 인공 신경망에 포함된 가중치(weight)들을 갱신하는 동작을 포함할 수 있다.
본 문서에 개시되는 일 실시 예에 따르면, 전자 장치는 인공 신경망 학습에 필요한 단계마다 각각 최적화 된 하드웨어 구성요소 및/또는 소프트웨어 구성 요소를 이용하여 연산 처리함으로써 효율적인 학습 기능을 제공할 수 있다.
본 문서에 개시되는 일 실시 예에 따르면, 전자 장치는 인공 신경망 학습을 위해 필요한 데이터들 중 상대적으로 높은 보안이 필요한 개인 정보(예: 사용자의 지문 정보 및/또는 얼굴 정보)를 외부(예: 고성능 전자 장치)로 전송하지 않고 자체적으로 이용하여 fine-tuning 동작을 수행할 수 있다.
이 외에, 본 문서를 통해 직접적 또는 간접적으로 파악되는 다양한 효과들이 제공될 수 있다.
도 1은 일 실시 예에 따른, 네트워크 환경 내의 전자 장치의 블록도이다.
도 2는 일 실시 예에 따른, 전자 장치가 포함하는 구성 요소들을 도시한 블록도이다.
도 3은 일 실시 예에 따른, 전자 장치가 인공 신경망(neural network)에 대한 학습(training) 동작을 수행하는 동작 개념도를 도시한다.
도 4는 일 실시 예에 따른, 학습 분배부를 포함하는 전자 장치의 구성 요소들을 도시한 블록도이다.
도 5는 일 실시 예에 따른, 학습 분배부를 포함하는 전자 장치의 구성 요소들을 도시한 블록도이다.
도 6은 일 실시 예에 따른, 학습 분배부를 포함하는 전자 장치의 구성 요소들을 도시한 블록도이다.
도 7은 일 실시 예에 따른, 전자 장치의 동작 순서도를 도시한다.
도 8은 일 실시 예에 따른, 전자 장치의 동작 순서도를 도시한다.
도 9는 일 실시 예에 따른, 전자 장치의 동작 순서도를 도시한다.
도 10은 일 실시 예에 따른, 전자 장치의 동작 순서도를 도시한다.
도면의 설명과 관련하여, 동일 또는 유사한 구성요소에 대해서는 동일 또는 유사한 참조 부호가 사용될 수 있다.
이하, 본 문서의 다양한 실시 예가 첨부된 도면을 참조하여 기재된다. 그러나, 이는 본 문서에 기재된 기술을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 문서의 실시 예의 다양한 변경(modification), 균등물(equivalent), 및/또는 대체물(alternative)을 포함하는 것으로 이해되어야 한다.
도 1은, 일 실시 예에 따른, 네트워크 환경(100) 내의 전자 장치(101)의 블록도이다. 도 1을 참조하면, 네트워크 환경(100)에서 전자 장치(101)는 제 1 네트워크(198)(예: 근거리 무선 통신 네트워크)를 통하여 전자 장치(102)와 통신하거나, 또는 제 2 네트워크(199)(예: 원거리 무선 통신 네트워크)를 통하여 전자 장치(104) 또는 서버(108)와 통신할 수 있다. 일실시예에 따르면, 전자 장치(101)는 서버(108)를 통하여 전자 장치(104)와 통신할 수 있다. 일실시예에 따르면, 전자 장치(101)는 프로세서(120), 메모리(130), 입력 모듈(150), 음향 출력 모듈(155), 디스플레이 모듈(160), 오디오 모듈(170), 센서 모듈(176), 인터페이스(177), 연결 단자(178), 햅틱 모듈(179), 카메라 모듈(180), 전력 관리 모듈(188), 배터리(189), 통신 모듈(190), 가입자 식별 모듈(196), 또는 안테나 모듈(197)을 포함할 수 있다. 어떤 실시예에서는, 전자 장치(101)에는, 이 구성요소들 중 적어도 하나(예: 연결 단자(178))가 생략되거나, 하나 이상의 다른 구성요소가 추가될 수 있다. 어떤 실시예에서는, 이 구성요소들 중 일부들(예: 센서 모듈(176), 카메라 모듈(180), 또는 안테나 모듈(197))은 하나의 구성요소(예: 디스플레이 모듈(160))로 통합될 수 있다.
프로세서(120)는, 예를 들면, 소프트웨어(예: 프로그램(140))를 실행하여 프로세서(120)에 연결된 전자 장치(101)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 일실시예에 따르면, 데이터 처리 또는 연산의 적어도 일부로서, 프로세서(120)는 다른 구성요소(예: 센서 모듈(176) 또는 통신 모듈(190))로부터 수신된 명령 또는 데이터를 휘발성 메모리(132)에 저장하고, 휘발성 메모리(132)에 저장된 명령 또는 데이터를 처리하고, 결과 데이터를 비휘발성 메모리(134)에 저장할 수 있다. 일실시예에 따르면, 프로세서(120)는 메인 프로세서(121)(예: 중앙 처리 장치 또는 어플리케이션 프로세서) 또는 이와는 독립적으로 또는 함께 운영 가능한 보조 프로세서(123)(예: 그래픽 처리 장치, 신경망 처리 장치(NPU: neural processing unit), 이미지 시그널 프로세서, 센서 허브 프로세서, 또는 커뮤니케이션 프로세서)를 포함할 수 있다. 예를 들어, 전자 장치(101)가 메인 프로세서(121) 및 보조 프로세서(123)를 포함하는 경우, 보조 프로세서(123)는 메인 프로세서(121)보다 저전력을 사용하거나, 지정된 기능에 특화되도록 설정될 수 있다. 보조 프로세서(123)는 메인 프로세서(121)와 별개로, 또는 그 일부로서 구현될 수 있다.
보조 프로세서(123)는, 예를 들면, 메인 프로세서(121)가 인액티브(예: 슬립) 상태에 있는 동안 메인 프로세서(121)를 대신하여, 또는 메인 프로세서(121)가 액티브(예: 어플리케이션 실행) 상태에 있는 동안 메인 프로세서(121)와 함께, 전자 장치(101)의 구성요소들 중 적어도 하나의 구성요소(예: 디스플레이 모듈(160), 센서 모듈(176), 또는 통신 모듈(190))와 관련된 기능 또는 상태들의 적어도 일부를 제어할 수 있다. 일실시예에 따르면, 보조 프로세서(123)(예: 이미지 시그널 프로세서 또는 커뮤니케이션 프로세서)는 기능적으로 관련 있는 다른 구성요소(예: 카메라 모듈(180) 또는 통신 모듈(190))의 일부로서 구현될 수 있다. 일실시예에 따르면, 보조 프로세서(123)(예: 신경망 처리 장치)는 인공지능 모델의 처리에 특화된 하드웨어 구조를 포함할 수 있다. 인공지능 모델은 기계 학습을 통해 생성될 수 있다. 이러한 학습은, 예를 들어, 인공지능이 수행되는 전자 장치(101) 자체에서 수행될 수 있고, 별도의 서버(예: 서버(108))를 통해 수행될 수도 있다. 학습 알고리즘은, 예를 들어, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)을 포함할 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은, 복수의 인공 신경망 레이어들을 포함할 수 있다. 인공 신경망은 심층 신경망(DNN: deep neural network), CNN(convolutional neural network), RNN(recurrent neural network), RBM(restricted boltzmann machine), DBN(deep belief network), BRDNN(bidirectional recurrent deep neural network), 심층 Q-네트워크(deep Q-networks) 또는 상기 중 둘 이상의 조합 중 하나일 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은 하드웨어 구조 이외에, 추가적으로 또는 대체적으로, 소프트웨어 구조를 포함할 수 있다.
메모리(130)는, 전자 장치(101)의 적어도 하나의 구성요소(예: 프로세서(120) 또는 센서 모듈(176))에 의해 사용되는 다양한 데이터를 저장할 수 있다. 데이터는, 예를 들어, 소프트웨어(예: 프로그램(140)) 및, 이와 관련된 명령에 대한 입력 데이터 또는 출력 데이터를 포함할 수 있다. 메모리(130)는, 휘발성 메모리(132) 또는 비휘발성 메모리(134)를 포함할 수 있다.
프로그램(140)은 메모리(130)에 소프트웨어로서 저장될 수 있으며, 예를 들면, 운영 체제(142), 미들 웨어(144) 또는 어플리케이션(146)을 포함할 수 있다.
입력 모듈(150)은, 전자 장치(101)의 구성요소(예: 프로세서(120))에 사용될 명령 또는 데이터를 전자 장치(101)의 외부(예: 사용자)로부터 수신할 수 있다. 입력 모듈(150)은, 예를 들면, 마이크, 마우스, 키보드, 키(예: 버튼), 또는 디지털 펜(예: 스타일러스 펜)을 포함할 수 있다.
음향 출력 모듈(155)은 음향 신호를 전자 장치(101)의 외부로 출력할 수 있다. 음향 출력 모듈(155)은, 예를 들면, 스피커 또는 리시버를 포함할 수 있다. 스피커는 멀티미디어 재생 또는 녹음 재생과 같이 일반적인 용도로 사용될 수 있다. 리시버는 착신 전화를 수신하기 위해 사용될 수 있다. 일실시예에 따르면, 리시버는 스피커와 별개로, 또는 그 일부로서 구현될 수 있다.
디스플레이 모듈(160)은 전자 장치(101)의 외부(예: 사용자)로 정보를 시각적으로 제공할 수 있다. 디스플레이 모듈(160)은, 예를 들면, 디스플레이, 홀로그램 장치, 또는 프로젝터 및 해당 장치를 제어하기 위한 제어 회로를 포함할 수 있다. 일실시예에 따르면, 디스플레이 모듈(160)은 터치를 감지하도록 설정된 터치 센서, 또는 상기 터치에 의해 발생되는 힘의 세기를 측정하도록 설정된 압력 센서를 포함할 수 있다.
오디오 모듈(170)은 소리를 전기 신호로 변환시키거나, 반대로 전기 신호를 소리로 변환시킬 수 있다. 일실시예에 따르면, 오디오 모듈(170)은, 입력 모듈(150)을 통해 소리를 획득하거나, 음향 출력 모듈(155), 또는 전자 장치(101)와 직접 또는 무선으로 연결된 외부 전자 장치(예: 전자 장치(102))(예: 스피커 또는 헤드폰)를 통해 소리를 출력할 수 있다.
센서 모듈(176)은 전자 장치(101)의 작동 상태(예: 전력 또는 온도), 또는 외부의 환경 상태(예: 사용자 상태)를 감지하고, 감지된 상태에 대응하는 전기 신호 또는 데이터 값을 생성할 수 있다. 일실시예에 따르면, 센서 모듈(176)은, 예를 들면, 제스처 센서, 자이로 센서, 기압 센서, 마그네틱 센서, 가속도 센서, 그립 센서, 근접 센서, 컬러 센서, IR(infrared) 센서, 생체 센서, 온도 센서, 습도 센서, 또는 조도 센서를 포함할 수 있다.
인터페이스(177)는 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 직접 또는 무선으로 연결되기 위해 사용될 수 있는 하나 이상의 지정된 프로토콜들을 지원할 수 있다. 일실시예에 따르면, 인터페이스(177)는, 예를 들면, HDMI(high definition multimedia interface), USB(universal serial bus) 인터페이스, SD카드 인터페이스, 또는 오디오 인터페이스를 포함할 수 있다.
연결 단자(178)는, 그를 통해서 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 물리적으로 연결될 수 있는 커넥터를 포함할 수 있다. 일실시예에 따르면, 연결 단자(178)는, 예를 들면, HDMI 커넥터, USB 커넥터, SD 카드 커넥터, 또는 오디오 커넥터(예: 헤드폰 커넥터)를 포함할 수 있다.
햅틱 모듈(179)은 전기적 신호를 사용자가 촉각 또는 운동 감각을 통해서 인지할 수 있는 기계적인 자극(예: 진동 또는 움직임) 또는 전기적인 자극으로 변환할 수 있다. 일실시예에 따르면, 햅틱 모듈(179)은, 예를 들면, 모터, 압전 소자, 또는 전기 자극 장치를 포함할 수 있다.
카메라 모듈(180)은 정지 영상 및 동영상을 촬영할 수 있다. 일실시예에 따르면, 카메라 모듈(180)은 하나 이상의 렌즈들, 이미지 센서들, 이미지 시그널 프로세서들, 또는 플래시들을 포함할 수 있다.
전력 관리 모듈(188)은 전자 장치(101)에 공급되는 전력을 관리할 수 있다. 일실시예에 따르면, 전력 관리 모듈(188)은, 예를 들면, PMIC(power management integrated circuit)의 적어도 일부로서 구현될 수 있다.
배터리(189)는 전자 장치(101)의 적어도 하나의 구성요소에 전력을 공급할 수 있다. 일실시예에 따르면, 배터리(189)는, 예를 들면, 재충전 불가능한 1차 전지, 재충전 가능한 2차 전지 또는 연료 전지를 포함할 수 있다.
통신 모듈(190)은 전자 장치(101)와 외부 전자 장치(예: 전자 장치(102), 전자 장치(104), 또는 서버(108)) 간의 직접(예: 유선) 통신 채널 또는 무선 통신 채널의 수립, 및 수립된 통신 채널을 통한 통신 수행을 지원할 수 있다. 통신 모듈(190)은 프로세서(120)(예: 어플리케이션 프로세서)와 독립적으로 운영되고, 직접(예: 유선) 통신 또는 무선 통신을 지원하는 하나 이상의 커뮤니케이션 프로세서를 포함할 수 있다. 일실시예에 따르면, 통신 모듈(190)은 무선 통신 모듈(192)(예: 셀룰러 통신 모듈, 근거리 무선 통신 모듈, 또는 GNSS(global navigation satellite system) 통신 모듈) 또는 유선 통신 모듈(194)(예: LAN(local area network) 통신 모듈, 또는 전력선 통신 모듈)을 포함할 수 있다. 이들 통신 모듈 중 해당하는 통신 모듈은 제 1 네트워크(198)(예: 블루투스, WiFi(wireless fidelity) direct 또는 IrDA(infrared data association)와 같은 근거리 통신 네트워크) 또는 제 2 네트워크(199)(예: 레거시 셀룰러 네트워크, 5G 네트워크, 차세대 통신 네트워크, 인터넷, 또는 컴퓨터 네트워크(예: LAN 또는 WAN)와 같은 원거리 통신 네트워크)를 통하여 외부의 전자 장치(104)와 통신할 수 있다. 이런 여러 종류의 통신 모듈들은 하나의 구성요소(예: 단일 칩)로 통합되거나, 또는 서로 별도의 복수의 구성요소들(예: 복수 칩들)로 구현될 수 있다. 무선 통신 모듈(192)은 가입자 식별 모듈(196)에 저장된 가입자 정보(예: 국제 모바일 가입자 식별자(IMSI))를 이용하여 제 1 네트워크(198) 또는 제 2 네트워크(199)와 같은 통신 네트워크 내에서 전자 장치(101)를 확인 또는 인증할 수 있다.
무선 통신 모듈(192)은 4G 네트워크 이후의 5G 네트워크 및 차세대 통신 기술, 예를 들어, NR 접속 기술(new radio access technology)을 지원할 수 있다. NR 접속 기술은 고용량 데이터의 고속 전송(eMBB(enhanced mobile broadband)), 단말 전력 최소화와 다수 단말의 접속(mMTC(massive machine type communications)), 또는 고신뢰도와 저지연(URLLC(ultra-reliable and low-latency communications))을 지원할 수 있다. 무선 통신 모듈(192)은, 예를 들어, 높은 데이터 전송률 달성을 위해, 고주파 대역(예: mmWave 대역)을 지원할 수 있다. 무선 통신 모듈(192)은 고주파 대역에서의 성능 확보를 위한 다양한 기술들, 예를 들어, 빔포밍(beamforming), 거대 배열 다중 입출력(massive MIMO(multiple-input and multiple-output)), 전차원 다중입출력(FD-MIMO: full dimensional MIMO), 어레이 안테나(array antenna), 아날로그 빔형성(analog beam-forming), 또는 대규모 안테나(large scale antenna)와 같은 기술들을 지원할 수 있다. 무선 통신 모듈(192)은 전자 장치(101), 외부 전자 장치(예: 전자 장치(104)) 또는 네트워크 시스템(예: 제 2 네트워크(199))에 규정되는 다양한 요구사항을 지원할 수 있다. 일실시예에 따르면, 무선 통신 모듈(192)은 eMBB 실현을 위한 Peak data rate(예: 20Gbps 이상), mMTC 실현을 위한 손실 Coverage(예: 164dB 이하), 또는 URLLC 실현을 위한 U-plane latency(예: 다운링크(DL) 및 업링크(UL) 각각 0.5ms 이하, 또는 라운드 트립 1ms 이하)를 지원할 수 있다.
안테나 모듈(197)은 신호 또는 전력을 외부(예: 외부의 전자 장치)로 송신하거나 외부로부터 수신할 수 있다. 일실시예에 따르면, 안테나 모듈(197)은 서브스트레이트(예: PCB) 위에 형성된 도전체 또는 도전성 패턴으로 이루어진 방사체를 포함하는 안테나를 포함할 수 있다. 일실시예에 따르면, 안테나 모듈(197)은 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다. 이런 경우, 제 1 네트워크(198) 또는 제 2 네트워크(199)와 같은 통신 네트워크에서 사용되는 통신 방식에 적합한 적어도 하나의 안테나가, 예를 들면, 통신 모듈(190)에 의하여 상기 복수의 안테나들로부터 선택될 수 있다. 신호 또는 전력은 상기 선택된 적어도 하나의 안테나를 통하여 통신 모듈(190)과 외부의 전자 장치 간에 송신되거나 수신될 수 있다. 어떤 실시예에 따르면, 방사체 이외에 다른 부품(예: RFIC(radio frequency integrated circuit))이 추가로 안테나 모듈(197)의 일부로 형성될 수 있다.
일 실시 예에 따르면, 안테나 모듈(197)은 mmWave 안테나 모듈을 형성할 수 있다. 일실시예에 따르면, mmWave 안테나 모듈은 인쇄 회로 기판, 상기 인쇄 회로 기판의 제 1 면(예: 아래 면)에 또는 그에 인접하여 배치되고 지정된 고주파 대역(예: mmWave 대역)을 지원할 수 있는 RFIC, 및 상기 인쇄 회로 기판의 제 2 면(예: 윗 면 또는 측 면)에 또는 그에 인접하여 배치되고 상기 지정된 고주파 대역의 신호를 송신 또는 수신할 수 있는 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다.
상기 구성요소들 중 적어도 일부는 주변 기기들간 통신 방식(예: 버스, GPIO(general purpose input and output), SPI(serial peripheral interface), 또는 MIPI(mobile industry processor interface))을 통해 서로 연결되고 신호(예: 명령 또는 데이터)를 상호간에 교환할 수 있다.
일실시예에 따르면, 명령 또는 데이터는 제 2 네트워크(199)에 연결된 서버(108)를 통해서 전자 장치(101)와 외부의 전자 장치(104)간에 송신 또는 수신될 수 있다. 외부의 전자 장치(102, 또는 104) 각각은 전자 장치(101)와 동일한 또는 다른 종류의 장치일 수 있다. 일실시예에 따르면, 전자 장치(101)에서 실행되는 동작들의 전부 또는 일부는 외부의 전자 장치들(102, 104, 또는 108) 중 하나 이상의 외부의 전자 장치들에서 실행될 수 있다. 예를 들면, 전자 장치(101)가 어떤 기능이나 서비스를 자동으로, 또는 사용자 또는 다른 장치로부터의 요청에 반응하여 수행해야 할 경우에, 전자 장치(101)는 기능 또는 서비스를 자체적으로 실행시키는 대신에 또는 추가적으로, 하나 이상의 외부의 전자 장치들에게 그 기능 또는 그 서비스의 적어도 일부를 수행하라고 요청할 수 있다. 상기 요청을 수신한 하나 이상의 외부의 전자 장치들은 요청된 기능 또는 서비스의 적어도 일부, 또는 상기 요청과 관련된 추가 기능 또는 서비스를 실행하고, 그 실행의 결과를 전자 장치(101)로 전달할 수 있다. 전자 장치(101)는 상기 결과를, 그대로 또는 추가적으로 처리하여, 상기 요청에 대한 응답의 적어도 일부로서 제공할 수 있다. 이를 위하여, 예를 들면, 클라우드 컴퓨팅, 분산 컴퓨팅, 모바일 에지 컴퓨팅(MEC: mobile edge computing), 또는 클라이언트-서버 컴퓨팅 기술이 이용될 수 있다. 전자 장치(101)는, 예를 들어, 분산 컴퓨팅 또는 모바일 에지 컴퓨팅을 이용하여 초저지연 서비스를 제공할 수 있다. 다른 실시예에 있어서, 외부의 전자 장치(104)는 IoT(internet of things) 기기를 포함할 수 있다. 서버(108)는 기계 학습 및/또는 신경망을 이용한 지능형 서버일 수 있다. 일실시예에 따르면, 외부의 전자 장치(104) 또는 서버(108)는 제 2 네트워크(199) 내에 포함될 수 있다. 전자 장치(101)는 5G 통신 기술 및 IoT 관련 기술을 기반으로 지능형 서비스(예: 스마트 홈, 스마트 시티, 스마트 카, 또는 헬스 케어)에 적용될 수 있다.
본 문서에 개시된 일 실시 예에 따른 전자 장치는 다양한 형태의 장치가 될 수 있다. 전자 장치는, 예를 들면, 휴대용 통신 장치(예: 스마트폰), 컴퓨터 장치, 휴대용 멀티미디어 장치, 휴대용 의료 기기, 카메라, 웨어러블 장치, 또는 가전 장치를 포함할 수 있다. 본 문서의 실시예에 따른 전자 장치는 전술한 기기들에 한정되지 않는다.
본 문서의 실시예들 및 이에 사용된 용어들은 본 문서에 기재된 기술적 특징들을 특정한 실시예들로 한정하려는 것이 아니며, 해당 실시예의 다양한 변경, 균등물, 또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 또는 관련된 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 아이템에 대응하는 명사의 단수 형은 관련된 문맥상 명백하게 다르게 지시하지 않는 한, 상기 아이템 한 개 또는 복수 개를 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및 B 중 적어도 하나", "A 또는 B 중 적어도 하나", "A, B 또는 C", "A, B 및 C 중 적어도 하나", 및 "A, B, 또는 C 중 적어도 하나"와 같은 문구들 각각은 그 문구들 중 해당하는 문구에 함께 나열된 항목들 중 어느 하나, 또는 그들의 모든 가능한 조합을 포함할 수 있다. "제 1", "제 2", 또는 "첫째" 또는 "둘째"와 같은 용어들은 단순히 해당 구성요소를 다른 해당 구성요소와 구분하기 위해 사용될 수 있으며, 해당 구성요소들을 다른 측면(예: 중요성 또는 순서)에서 한정하지 않는다. 어떤(예: 제 1) 구성요소가 다른(예: 제 2) 구성요소에, "기능적으로" 또는 "통신적으로"라는 용어와 함께 또는 이런 용어 없이, "커플드" 또는 "커넥티드"라고 언급된 경우, 그것은 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로(예: 유선으로), 무선으로, 또는 제 3 구성요소를 통하여 연결될 수 있다는 것을 의미한다.
본 문서의 실시예들에서 사용된 용어 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구현된 유닛을 포함할 수 있으며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로와 같은 용어와 상호 호환적으로 사용될 수 있다. 모듈은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는, 상기 부품의 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 일실시예에 따르면, 모듈은 ASIC(application-specific integrated circuit)의 형태로 구현될 수 있다.
본 문서의 실시예들은 기기(machine)(예: 전자 장치(101)) 의해 읽을 수 있는 저장 매체(storage medium)(예: 내장 메모리(136) 또는 외장 메모리(138))에 저장된 하나 이상의 명령어들을 포함하는 소프트웨어(예: 프로그램(140))로서 구현될 수 있다. 예를 들면, 기기(예: 전자 장치(101))의 프로세서(예: 프로세서(120))는, 저장 매체로부터 저장된 하나 이상의 명령어들 중 적어도 하나의 명령을 호출하고, 그것을 실행할 수 있다. 이것은 기기가 상기 호출된 적어도 하나의 명령어에 따라 적어도 하나의 기능을 수행하도록 운영되는 것을 가능하게 한다. 상기 하나 이상의 명령어들은 컴파일러에 의해 생성된 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장 매체는, 비일시적(non-transitory) 저장 매체의 형태로 제공될 수 있다. 여기서, '비일시적'은 저장 매체가 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장 매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다.
일실시예에 따르면, 본 문서에 개시된 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory(CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어™)를 통해 또는 두 개의 사용자 장치들(예: 스마트 폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.
일 실시 예에 따르면, 상기 기술한 구성요소들의 각각의 구성요소(예: 모듈 또는 프로그램)는 단수 또는 복수의 개체를 포함할 수 있으며, 복수의 개체 중 일부는 다른 구성요소에 분리 배치될 수도 있다. 일 실시 예에 따르면, 전술한 해당 구성요소들 중 하나 이상의 구성요소들 또는 동작들이 생략되거나, 또는 하나 이상의 다른 구성요소들 또는 동작들이 추가될 수 있다. 대체적으로 또는 추가적으로, 복수의 구성요소들(예: 모듈 또는 프로그램)은 하나의 구성요소로 통합될 수 있다. 이런 경우, 통합된 구성요소는 상기 복수의 구성요소들 각각의 구성요소의 하나 이상의 기능들을 상기 통합 이전에 상기 복수의 구성요소들 중 해당 구성요소에 의해 수행되는 것과 동일 또는 유사하게 수행할 수 있다. 일 실시 예에 따르면, 모듈, 프로그램 또는 다른 구성요소에 의해 수행되는 동작들은 순차적으로, 병렬적으로, 반복적으로, 또는 휴리스틱하게 실행되거나, 상기 동작들 중 하나 이상이 다른 순서로 실행되거나, 생략되거나, 또는 하나 이상의 다른 동작들이 추가될 수 있다.
도 2는 일 실시 예에 따른, 전자 장치(201)가 포함하는 구성 요소들을 도시한 블록도(200)이다.
본 문서의 일 실시 예에 따르면, 전자 장치(201)(예: 도 1의 전자 장치(101))는 프로세서(220)(예: 도 1의 프로세서(120)) 및/또는 메모리(230)(예: 도 1의 메모리(130))를 포함할 수 있다. 프로세서(220)는 메인 프로세서(221)(예: 도 1의 메인 프로세서(221)) 및 보조 프로세서(223)(예: 도 1의 보조 프로세서(223))를 포함할 수 있다. 도 2에 도시된 구성 요소들은 예시적인 것으로서, 본 문서에 개시된 실시예들이 이에 제한되는 것은 아니다. 예를 들어, 보조 프로세서(223)는 메인 프로세서(221)의 일부로서 구현될 수 있다. 전자 장치(201)는 도시되지 않은 구성 요소를 더 포함하거나 도시된 구성 요소들 중 일부를 포함하지 않을 수 있다.
프로세서(220)는 메모리(230)와 작동적으로(operatively) 연결될 수 있다. 메모리(430)는, 실행되었을 때, 프로세서(220)로 하여금 전자 장치(201)의 다양한 동작들을 수행하도록 하는 하나 이상의 인스트럭션들(instructions)을 저장할 수 있다.
일 실시예에 따르면, 프로세서(220)는 메인 프로세서(221) 및 보조 프로세서(223)를 포함할 수 있다. 예를 들어, 메인 프로세서(221)는 CPU(Central Processing Unit) 또는 GPU(Graphic Processing Unit)일 수 있다. 보조 프로세서(223)는 NPU(Neural Processing Unit)일 수 있다. 메인 프로세서(221)와 보조 프로세서(223)는 작동적으로 연결될 수 있다. 프로세서(220)는 메인 프로세서(221) 및 보조 프로세서(223)에 서로 다른 데이터(예: 학습 데이터)를 할당할 수 있다.
일 실시예에 따르면, 메인 프로세서(221)는 인공 신경망(neural network)의 학습(training) 동작 중 적어도 일부를 수행할 수 있다. 예를 들어, 메인 프로세서(221)는 비 양자화(de-quantization) 된 인공 신경망에 학습 데이터를 입력하여 역전파(backward propagation) 동작을 수행할 수 있다. 메인 프로세서(221)는 역전파 동작을 통해 인공 신경망에 포함된 복수의 레이어들의 가중치(weight)를 갱신(예: 업데이트(update))할 수 있다. 메인 프로세서(221)는 역전파 동작을 수행하는 과정에서 발생하는 데이터들(예: 갱신되기 전의 가중치 및/또는 갱신된 가중치)을 메모리(230)에 저장할 수 있다.
일 실시예에 따르면, 보조 프로세서(223)는 인공 신경망의 학습 동작 중 적어도 일부를 수행할 수 있다. 예를 들어, 지정된 기능(예: 인공 신경망의 순전파(forward propagation)에 특화되도록 설정될 수 있다. 일 예로, 보조 프로세서(223)는 양자화(quantization) 된 인공 신경망에 학습 데이터를 입력하여 순전파 동작을 수행할 수 있다. 보조 프로세서(223)는 순전파 동작을 통해, 인공 신경망에 입력된 학습 데이터를 기반으로 생성되는 결과 데이터를 출력할 수 있다. 보조 프로세서(221)는 순전파 동작을 수행하는 과정에서 발생하는 데이터들(예: 인공 신경망에 입력된 학습 데이터 및/또는 결과 데이터)을 메모리(230)에 저장할 수 있다.
도 2에서 인공 신경망을 통해 처리되는 데이터들은 이미지, 영상, 음성, 또는 이들의 조합에 대응되는 데이터일 수 있으나, 이에 제한되는 것은 아니다. 또한, 도 2에서 프로세서(220)는 메인 프로세서(221) 및 보조 프로세서(223)를 포함하는 것으로 도시하고 있으나, 적어도 하나의 보조 프로세서를 더 포함할 수도 있다.
도 3은 일 실시 예에 따른, 전자 장치가 인공 신경망(neural network)에 대한 학습(training) 동작을 수행하는 동작 개념도(300)를 도시한다.
일 실시예에 따르면, 전자 장치(예: 도 1의 전자 장치(101))는 인공 신경망에 학습 데이터를 입력하여 신경망 처리 동작을 수행할 수 있다. 예를 들어, 전자 장치는 하나의 인공 신경망을 양자화(quantization) 또는 비 양자화(de-quantization)하여 생성된 인공 신경망들(예: 제1 인공 신경망 또는 제2 인공 신경망)에 서로 다른 학습 데이터들을 입력하여 신경망 처리 동작을 수행할 수 있다.
일 실시예에 따르면, 전자 장치는 메모리(예: 도 1의 메모리(130))에 저장된 제1 학습 데이터(313)를 제1 인공 신경망에 입력할 수 있다. 예를 들어, 제1 인공 신경망은 전자 장치가 기 저장된 인공 신경망을 양자화(quantization)하여 생성한 인공 신경망으로 참조될 수 있다. 전자 장치는 제1 인공 신경망을 이용하여 신경망 처리 동작(예: 순전파 동작(301))을 수행하기 위하여 보조 프로세서(예: 도 2의 보조 프로세서(223))를 이용할 수 있다. 예를 들어, 전자 장치는, 보조 프로세서(예: NPU(Neural Processing Unit))가 제1 인공 신경망에 제1 학습 데이터(313)를 입력하여 순전파 동작(301)을 수행하도록 할 수 있다. 보조 프로세서는 제1 인공 신경망의 입력 레이어(351)에 제1 학습 데이터(313)를 입력하고, 복수의 레이어들(352 내지 357)을 참조 번호 352 내지 357 순으로 순차적으로 거친 후 출력 레이어(358)를 거쳐 생성된 제1 결과 데이터(315)를 출력할 수 있다. 일 예로, 제1 결과 데이터(315)는 제1 인공 신경망과 다른 인공 신경망(예: 제2 인공 신경망)의 입력 데이터로 참조될 수 있다. 보조 프로세서는 제1 인공 신경망을 이용하여 순전파 동작(301)을 수행하는 과정에서 복수의 레이어들(352 내지 357)에서 생성되는 데이터들 중 적어도 일부를 메모리에 저장할 수 있다.
일 실시예에 따르면, 전자 장치는 제1 인공 신경망의 출력 레이어(358)를 통해 생성된 제1 결과 데이터(315)를 제2 인공 신경망에 입력할 수 있다. 예를 들어, 제2 인공 신경망은 전자 장치가 기 저장된 인공 신경망을 비 양자화(de-quantization)하여 생성한 인공 신경망으로 참조될 수 있다. 전자 장치는 제2 인공 신경망을 이용하여 신경망 처리 동작(예: 역전파 동작(302))을 수행하기 위하여 메인 프로세서(예: 도 2의 메인 프로세서(221))를 이용할 수 있다. 예를 들어, 전자 장치는, 메인 프로세서(예: CPU(Central Processing Unit) 또는 GPU(Graphic Processing Unit))가 제2 인공 신경망에 제1 결과 데이터(315)를 입력하여 역전파 동작(302)을 수행하도록 할 수 있다. 메인 프로세서는 제2 인공 신경망의 출력 레이어(358)에 제1 결과 데이터(315)를 입력하고, 복수의 레이어들(352 내지 357)을 참조 번호 357 내지 352 순으로 순차적으로 거쳐 입력 레이어(351)를 거쳐 생성된 제2 결과 데이터(325)를 출력할 수 있다. 메인 프로세서는 제2 인공 신경망을 이용하여 역전파 동작(302)을 수행하는 과정에서 복수의 레이어들(352 내지 357)에서 생성되는 데이터들 중 적어도 일부를 메모리에 저장할 수 있다.
일 실시예에 따르면, 전자 장치가 인공 신경망을 통해 결과 데이터를 획득하는 동작은 지정된 조건을 만족할 때까지 반복하여 수행될 수 있다. 예를 들어, 전자 장치는 사용자에 의해 기 설정된 횟수 또는 인공 신경망에 입력되는 학습 데이터의 양을 식별하고, 식별 결과가 지정된 조건을 만족하지 않는 것으로 판단된 경우 복수의 프로세서들을 이용한 신경망 처리 동작을 반복적으로 수행할 수 있다.
도 4는 일 실시 예에 따른, 학습 분배부(410)를 포함하는 전자 장치의 구성 요소들을 도시한 블록도(400)이다.
도 4를 참조하여, 일 실시예에 따르면, 전자 장치(예: 도 1의 전자 장치(101))는 학습 분배부(410)를 이용하여 복수의 프로세서들(421 및 423)을 제어할 수 있다. 예를 들어, 학습 분배부(410)는 인공 신경망의 처리 동작을 수행할 프로세서를 결정하도록 제어할 수 있다.
일 실시예에 따르면, 학습 분배부(410)는 메인 프로세서(421)(예: 도 2의 메인 프로세서(221))가 제2 인공 신경망(예: 비 양자화(de-quantization) 된 인공 신경망)을 이용하여 신경망 처리 동작(예: 역전파 동작)을 수행하도록 제어할 수 있다. 예를 들어, 메인 프로세서(421)는 메모리(430)(예: 도 1의 메모리(130))에 저장된 제2 인공 신경망을 로드(load)하고, 학습 데이터를 입력하여 역전파 동작을 수행할 수 있다.
일 실시예에 따르면, 학습 분배부(410)는 보조 프로세서(423)(예: 도 2의 보조 프로세서(223))가 제1 인공 신경망(예: 양자화(quantization) 된 인공 신경망)을 이용하여 신경망 처리 동작(예: 순전파 동작)을 수행하도록 제어할 수 있다. 예를 들어, 보조 프로세서(423)는 메모리(430)에 저장된 제1 인공 신경망을 로드하고, 학습 데이터를 입력하여 순전파 동작을 수행할 수 있다.
일 실시예에 따르면, 전자 장치는 학습 분배부(410) 및 메모리(430)에 작동적으로(operatively) 연결된 양자화 모듈(425)를 더 포함할 수 있다. 예를 들어, 양자화 모듈(425)은 메모리(430)에 저장된 인공 신경망을 양자화하여 새로운 인공 신경망을 생성할 수 있다. 다른 예를 들어, 양자화 모듈(425)은 양자화 된 인공 신경망을 비 양자화하여 새로운 인공 신경망(예: 제3 인공 신경망)을 생성할 수 있다. 양자화 모듈(425)은 제3 인공 신경망을 메모리(430)에 저장할 수 있다.
일 실시예에 따르면, 프로세서들(421, 423)은 인공 신경망을 이용하여 획득한 적어도 하나의 데이터들을 메모리에 저장할 수 있다. 프로세서들은 상기 저장된 적어도 하나의 데이터들을 이용하여 반복적으로 신경망 처리 동작을 수행할 수 있다.
본 문서의 일 실시 예에 따르면, 프로세서들은 서로 다른 인공 신경망을 통해 신경망 처리 동작을 수행할 수 있다. 예를 들어, 메인 프로세서(421)는 CPU 및/또는 GPU에 대응되는 구성 요소일 수 있다. 전자 장치는 제2 인공 신경망을 통한 신경망 처리 동작을 수행하기 위하여, 소수 연산에 최적화 된 CPU 및/또는 GPU를 이용할 수 있다. 일 예로, 제2 인공 신경망은 적어도 하나의 레이어에 소수(decimal) 값을 갖는 가중치(weight)가 포함된 인공 신경망으로 정의될 수 있다. 다른 예를 들어, 보조 프로세서(423)는 NPU에 대응되는 구성 요소일 수 있다. 전자 장치는 제1 인공 신경망을 통한 신경망 처리 동작을 수행하기 위하여, 정수 연산에 최적화 된 NPU를 이용할 수 있다. 일 예로, 제1 인공 신경망은 적어도 하나의 레이어에 정수(integer) 값을 갖는 가중치가 포함된 인공 신경망으로 정의될 수 있다. 전자 장치는 학습 분배부(410)를 이용하여 서로 다른 신경망 처리 동작을 수행하도록 하는 제어 신호를 적어도 하나의 프로세서들로 분배할 수 있다.
도 4에서, 양자화 모듈(425)이 인공 신경망의 양자화 동작을 수행하는 것으로 설명하고 있으나 본 문서의 실시 예들이 이에 제한되는 것은 아니다. 예를 들어, 전자 장치는 메인 프로세서(421)를 이용하여 인공 신경망의 양자화 동작 및/또는 비 양자화 동작을 수행할 수도 있다.
도 5는 일 실시 예에 따른, 학습 분배부(510)를 포함하는 전자 장치의 구성 요소들을 도시한 블록도(500)이다.
도 5의 구성 요소들 중 도 4와 동일한 명칭으로 정의된 구성 요소들(예: 학습 분배부(510) 및 메모리(530))에 대한 설명은 상술한 도 4의 설명에 의하여 대체될 수 있다.
도 5를 참조하여, 일 실시예에 따르면, 메모리(530)(예: 도 1의 메모리(130))는 인공 신경망 저장부(531) 및 학습 데이터 저장부(532)를 포함할 수 있다.
일 실시예에 따르면, 인공 신경망 저장부(531)는 적어도 하나의 인공 신경망(예: 제1 인공 신경망 및/또는 제2 인공 신경망)을 저장할 수 있다. 전자 장치(예: 도 1의 전자 장치(101))는 CPU(521) 또는 양자화 모듈(예: 도 4의 양자화 모듈(425))을 이용하여 인공 신경망 저장부(531)에 기 저장되어 있던 인공 신경망을 양자화(quantization) 및/또는 비 양자화(de-quantization) 할 수 있다. 전자 장치는 양자화 및/또는 비 양자화 된 인공 신경망들을 인공 신경망 저장부(531)에 저장할 수 있다.
일 실시예에 따르면, 학습 데이터 저장부(532)는 적어도 하나의 학습 데이터들을 저장할 수 있다. 예를 들어, 전자 장치는 NPU(523)를 통한 신경망 처리 동작(예: 순전파 동작)을 수행하기 위하여 이용되는 학습 데이터(예: activation)를 학습 데이터 저장부(532)에 저장할 수 있다. 다른 예를 들어, 전자 장치는 CPU(521) 및/또는 GPU(522)를 통한 신경망 처리 동작(예: 역전파 동작)을 수행하기 위하여 이용되는 학습 데이터를 학습 데이터 저장부(532)에 저장할 수 있다. 또 다른 예로, 전자 장치는 CPU(521), GPU(522), 및/또는 NPU(523)를 이용하여 신경망 처리를 수행하는 과정에서 발생하는 데이터들을 학습 데이터 저장부(532)에 저장할 수 있다.
일 실시예에 따르면, 전자 장치는 적어도 하나의 프로세서(예: CPU(521), GPU(522), 및/또는 NPU(523))를 통하여 신경망 처리 동작을 수행하기 위하여 메모리(530)에 저장된 데이터들을 로드(load)할 수 있다. 예를 들어, 전자 장치는 인공 신경망 학습 동작을 수행하기 위하여 인공 신경망 저장부(531)에 저장된 적어도 하나의 인공 신경망을 적어도 하나의 프로세서에 로드할 수 있다. 다른 예를 들어, 전자 장치는 인공 신경망 학습 동작을 수행하기 위하여 학습 데이터 저장부(532)에 저장된 적어도 하나의 학습 데이터를 적어도 하나의 프로세서에 로드할 수 있다.
도 6은 일 실시 예에 따른, 학습 분배부(630)를 포함하는 전자 장치의 구성 요소들을 도시한 블록도(600)이다.
일 실시예에 따르면, 전자 장치(예: 도 1의 전자 장치(101))는 메모리(예: 도 1의 메모리(130))에 인공 신경망(neural network)의 학습(training)에 필요한 다양한 데이터들을 저장할 수 있다. 예를 들어, 전자 장치는 메모리에 소프트웨어(예: 도 1의 프로그램(140)) 및 이와 연관된 명령에 대한 입력 데이터 또는 출력 데이터를 저장할 수 있다. 전자 장치는 도 6에 도시된 바와 같은 구조를 갖는 프로그램을 저장할 수 있다. 메모리는 도 6에 도시된 블록도(600) 구조를 갖는 구성 요소들을 저장할 수 있다. 예를 들어, 상기 구성 요소들은 어플리케이션(610), 머신 러닝 프레임워크(620), 라이브러리 모듈(625), 학습 분배부(630), 인공 신경망 HAL(Hardware Abstraction Layer) 레이어(640), 및/또는 드라이버들(651, 653, 및 655)을 포함할 수 있다.
일 실시예에 따르면, 어플리케이션(610)(예: 도 1의 어플리케이션(146))은 사용자에게 소정의 기능(예: 이미지 촬영, 게이밍(gaming), 및/또는 검색)을 제공하기 위한 프로그램을 지칭할 수 있다. 예를 들어, 어플리케이션(610)은 전자 장치의 제조 단계에서 전자 장치에 프리 로드 될 수 있다. 다른 예를 들어, 어플리케이션은 전자 장치가 사용자에 의해 사용될 경우 외부 전자 장치(예: 도 1의 서버(108))로부터 다운로드 되거나 갱신될 수 있다.
일 실시예에 따르면, 머신 러닝 프레임워크(620)는 전자 장치에 포함된 하나 이상의 리소스(resource)들로부터 제공되는 기능 및/또는 정보가 어플리케이션(610)에 의하여 사용될 수 있도록 다양한 기능들을 어플리케이션(610)으로 제공할 수 있다. 예를 들어, 머신 러닝 프레임워크(620)는 라이브러리 모듈(625)을 포함할 수 있다.
일 실시예에 따르면, 라이브러리 모듈(625)가 머신 러닝 프레임워크(620)에 포함될 수 있다. 라이브러리 모듈(625)은 프로그램이 실행되는 동안 프로그래밍 언어를 통해 새로운 기능을 추가하기 위하여 컴파일러가 사용하는 소프트웨어 모듈로 참조될 수 있다. 라이브러리 모듈(625)은 전자 장치가 인공 신경망을 학습할 때 이용하는 소프트웨어 모듈일 수 있다. 예를 들어, 라이브러리 모듈(625)은 인공 신경망의 학습과 연관된 다양한 알고리즘들(예: 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning), 또는 강화 학습(reinforcement learning)을 포함할 수 있다. 예를 들어, 라이브러리 모듈(625)은 전자 장치에 포함된 인공 신경망을 양자화(quantization)하는 기능을 제공할 수 있다. 라이브러리 모듈(625)은 프로세서(예: 도 1의 프로세서(120))가 양자화 된 인공 신경망을 비 양자화 인공 신경망으로 전환하거나, 비 양자화 된 인공 신경망을 양자화 인공 신경망으로 전환하는 동작을 수행하도록 할 수 있다. 일 예로, 양자화 인공 신경망은 복수의 레이어들에 포함된 가중치가 정수(interger) 값을 갖는 정수형 형태의 인공 신경망으로 참조될 수 있다. 다른 예로, 비 양자화 인공 신경망은 복수의 레이어들에 포함된 가중치(weight)가 소수(decimal) 값을 갖는 소수형 형태의 인공 신경망으로 참조될 수 있다. 라이브러리 모듈(625)은 복수의 인공 신경망들의 형태를 식별하고, 식별된 형태를 기반으로 서로 다른 프로세서(예: 도 2의 메인 프로세서(221) 또는 보조 프로세서(223))가 각 인공 신경망에 대한 학습 동작을 수행하도록 할 수 있다. 예를 들어, 라이브러리 모듈(625)은 사용자에게 SDK(Software Development Kit) 및/또는 API(Appplication Programming Interface)를 제공할 수 있다. 전자 장치는 SDK 및/또는 API를 변경하도록 하는 외부 입력을 수신할 수 있다. 일 예로, 사용자는 제공된 SDK 및/또는 API를 변경하여 인공 신경망 학습 동작에 연관된 복수의 파라미터들을 기존에 설정된 값에서 변경할 수 있다. 라이브러리 모듈(625)은 사용자에 의해 변경된 SDK 및/또는 API를 이용하여 인공 신경망의 학습 동작을 수행할 수 있다.
일 실시예에 따르면, 학습 분배부(630)는 머신 러닝 프레임워크(620) 및/또는 인공 신경망 HAL 레이어(640)와 데이터를 송수신 할 수 있다. 예를 들어, 학습 분배부(630)는 메모리(예: 도 1의 메모리(130))에 저장된 학습 데이터들을 인공 신경망의 양자화 여부에 따라 분류할 수 있다. 예를 들어, 학습 분배부(630)는 전자 장치에 포함된 복수의 프로세서들 중 적어도 하나에 인공 신경망 학습 동작을 수행하도록 하는 학습 데이터를 할당할 수 있다. 학습 분배부(630)는 복수의 프로세서들이 서로 다른 인공 신경망을 이용하여 학습 동작을 수행하도록 하기 위하여, 데이터들을 분배하여 전송할 수 있다. 일 예로, 학습 분배부(630)는 NPU(Neural Processing Unit)가 제1 인공 신경망(예: 양자화(quantization) 된 인공 신경망)에 학습 데이터를 입력하여 순전파(forward propagation) 동작을 수행하도록 할 수 있다. 다른 예로, 학습 분배부(630)는 CPU(Central Processing Unit) 또는 GPU(Graphic Processing Unit)가 제2 인공 신경망(예: 비 양자화(de-quantization) 된 인공 신경망)에 학습 데이터(예: 제1 인공 신경망에서 순전파 동작을 수행하여 출력한 결과 데이터)를 입력하여 역전파(backward propagation) 동작을 수행하도록 할 수 있다.
일 실시예에 따르면, 인공 신경망 HAL(Hardware Abstraction Layer) 레이어(640)는 복수의 레이어들 간의 데이터 송수신 동작을 수행할 수 있다. 인공 신경망 HAL 레이어(640)는 전자 장치에 포함된 하드웨어 구성 요소들 중 적어도 하나와 어플리케이션(610), 머신 러닝 프레임워크(620) 사이의 추상화 된 계층을 관리할 수도 있다. 예를 들어, 인공 신경망 HAL 레이어(640)는 어플리케이션(610)을 통해 전송되는 데이터 중 적어도 일부를 복수의 드라이버들(예: DSP 드라이버(651), NPU 드라이버(653), 및/또는 GPU 드라이버(655))로 전송할 수 있다. 다른 예를 들어, 인공 신경망 HAL 레이어(640)는 머신 러닝 프레임워크(620)가 전송한 정보를 수신하고, 상기 정보를 기반으로 제어 신호를 생성하여 복수의 드라이버들 중 적어도 하나로 전송할 수 있다.
일 실시예에 따르면, DSP(Digital Signal Processor) 드라이버(651)는 DSP를 제어 및/또는 관리할 수 있는 인터페이스를 제공할 수 있다. 일 실시예에 따르면, NPU 드라이버(653)는 NPU를 제어 및/또는 관리할 수 있는 인터페이스를 제공할 수 있다. 예를 들어, DSP 또는 NPU는 도 1의 보조 프로세서(123)의 일 예로 참조될 수 있다. 일 실시예에 따르면, GPU 드라이버(655)는 GPU를 제어 및/또는 관리할 수 있는 인터페이스를 제공할 수 있다. 예를 들어, GPU는 도 1의 메인 프로세서(121)의 일 예로 참조될 수 있다. 본 문서의 일 실시 예에 따르면, DSP, NPU, 및/또는 GPU는 인공 신경망을 통한 신경망 처리 동작에 이용될 수 있다.
도 6의 레이어 구조는 예시적인 것으로서, 본 문서의 실시 예들이 이에 제한되는 것은 아니다. 예를 들어, 인공 신경망 HAL 레이어(640)는 CPU 드라이버(미도시)에 데이터를 전송할 수도 있다. CPU 드라이버는 CPU(예: 도 1의 메인 프로세서(121))를 제어 및/또는 관리할 수 있는 인터페이스를 제공할 수 있다.
도 7은 일 실시 예에 따른, 전자 장치의 동작 순서도(700)를 도시한다.
일 실시예에 따르면, 전자 장치(예: 도 1의 전자 장치(101))는 도 7의 동작들을 수행할 수 있다. 예를 들어, 전자 장치의 프로세서(예: 도 1의 프로세서(120))는 메모리(예: 도 1의 메모리(130))에 저장된 인스트럭션들(instructions)의 실행 시에 도 7의 동작들을 수행하도록 설정될 수 있다.
동작 705에서, 전자 장치는 신경망 학습 요청을 수신할 수 있다. 예를 들어, 전자 장치는 사용자에 의해 입력되는 신경망 학습 요청 또는 기 설정된 주기에 기반하여 수신되는 신경망 학습 요청을 수신할 수 있다. 상기 신경망 학습 요청에는 메모리에 저장된 적어도 하나의 인공 신경망들 중 학습 동작을 수행하고자 하는 인공 신경망에 연관된 정보가 포함될 수 있다. 전자 장치는 상기 정보를 기반으로 학습 대상이 되는 인공 신경망을 식별 및/또는 결정할 수 있다.
동작 710에서, 전자 장치는 제1 인공 신경망에 데이터를 입력할 수 있다. 예를 들어, 제1 인공 신경망은 상기 신경망 학습 요청에 기반하여 결정된 인공 신경망에 대하여, 제1 프로세서(예: 도 1의 메인 프로세서(121)) 또는 양자화 모듈(예: 도 4의 양자화 모듈(425))이 양자화(quantization) 동작을 수행하여 생성한 인공 신경망에 해당할 수 있다. 제1 인공 신경망은 적어도 하나의 레이어를 포함할 수 있다. 예를 들어, 제1 인공 신경망 내의 적어도 하나의 레이어는 정수(integer) 값을 갖는 가중치(weight)를 포함할 수 있다. 전자 장치는 메모리 내의 학습 데이터 저장부(예: 도 5의 학습 데이터 저장부(532))에 저장된 학습 데이터 중 적어도 일부를 제1 인공 신경망의 입력 레이어에 입력할 수 있다. 제1 인공 신경망을 이용한 신경망 처리 동작은 제1 프로세서에 의하여 수행될 수 있다.
동작 715에서, 전자 장치는 순전파(forward propagation) 동작에 기반하여 생성된 데이터를 메모리에 저장할 수 있다. 예를 들어, 순전파 동작은 인공 신경망을 이용한 추론 동작에 대응될 수 있다. 일 예로, 전자 장치는 제1 프로세서를 통해 제1 인공 신경망에 입력 데이터를 입력하고, 상기 입력 데이터가 제1 인공 신경망 내의 적어도 하나의 레이어들을 순차적으로 통과하여 결과 데이터를 출력하는 순전파 동작을 수행할 수 있다. 제1 프로세서는 순전파 동작을 수행하는 과정에서 적어도 하나의 레이어들에서 생성되는 데이터들 중 적어도 일부를 메모리에 저장할 수 있다.
동작 720에서, 전자 장치는 제2 인공 신경망에 데이터를 입력할 수 있다. 예를 들어, 제2 인공 신경망은 상기 신경망 학습 요청에 기반하여 결정된 인공 신경망에 대하여, 제1 프로세서 또는 양자화 모듈이 비 양자화(de-quantization) 동작을 수행하여 생성한 인공 신경망에 해당할 수 있다. 제2 인공 신경망은 적어도 하나의 레이어를 포함할 수 있다. 예를 들어, 제2 인공 신경망 내의 적어도 하나의 레이어는 소수(decimal) 값을 갖는 가중치(weight)를 포함할 수 있다. 전자 장치는 메모리 내의 학습 데이터 저장부에 저장된 학습 데이터 중 적어도 일부를 제2 인공 신경망의 출력 레이어에 입력할 수 있다. 제2 인공 신경망을 이용한 신경망 처리 동작은 제2 프로세서(예: 도 1의 보조 프로세서(123))에 의하여 수행될 수 있다.
동작 725에서, 전자 장치는 역전파 동작에 기반하여 인공 신경망에 포함된 가중치를 갱신(또는, 업데이트)할 수 있다. 예를 들어, 전자 장치는 제2 인공 신경망에 입력되는 학습 데이터가 적어도 하나의 레이어를 순차적으로 통과되면서 상기 적어도 하나의 레이어에 포함된 가중치들을 갱신하는 동작을 수행할 수 있다. 인공 신경망에 포함된 가중치를 갱신하는 동작은 제2 프로세서에 의하여 수행될 수 있다.
도 8은 일 실시 예에 따른, 전자 장치의 동작 순서도(800)를 도시한다.
일 실시예에 따르면, 전자 장치(예: 도 1의 전자 장치(101))는 도 8의 동작들을 수행할 수 있다. 예를 들어, 전자 장치의 프로세서(예: 도 1의 프로세서(120))는 메모리(예: 도 1의 메모리(130))에 저장된 인스트럭션들(instructions)의 실행 시에 도 8의 동작들을 수행하도록 설정될 수 있다.
동작 805에서, 전자 장치는 인공 신경망 학습 요청을 수신할 수 있다. 전자 장치가 인공 신경망 학습 요청을 수신하는 동작에 대한 설명은 도 7의 동작 705에 대한 설명으로 대체될 수 있다.
동작 810에서, 전자 장치는 적어도 하나의 프로세서들을 식별할 수 있다. 예를 들어, 전자 장치는 인공 신경망 학습을 위해 필요한 복수의 동작(예: 순전파 동작 및 역전파 동작)들에 각각 대응되는 프로세서들을 구분하여 식별할 수 있다. 예를 들어, 전자 장치는 제1 프로세서(예: 도 1의 메인 프로세서(121))를 인공 신경망을 이용한 순전파 동작에 최적화 된 프로세서로 식별할 수 있다. 다른 예를 들어, 전자 장치는 제2 프로세서(예: 도 1의 보조 프로세서(123))를 인공 신경망을 이용한 역전파 동작에 최적화 된 프로세서로 식별할 수 있다.
동작 815에서, 전자 장치는 인공 신경망 학습 동작을 할당할 수 있다. 예를 들어, 전자 장치는 제1 프로세서로 하여금 인공 신경망을 이용한 순전파 동작을 수행하도록 하는 데이터를 할당할 수 있다. 다른 예를 들어, 전자 장치는 제2 프로세서로 하여금 인공 신경망을 이용한 역전파 동작을 수행하도록 하는 데이터를 할당할 수 있다.
동작 820에서, 전자 장치는 인공 신경망의 학습 종료 여부를 결정할 수 있다.
예를 들어, 전자 장치가 인공 신경망 학습을 종료하는 경우(예: 동작 820 - Yes), 전자 장치는 동작 825를 수행할 수 있다. 다른 예를 들어, 전자 장치가 인공 신경망 학습을 종료하지 않는 경우(예: 동작 820 - No), 전자 장치는 동작 815를 수행할 수 있다.
동작 825에서, 전자 장치는 결과 데이터들을 메모리에 저장할 수 있다. 예를 들어, 전자 장치는 인공 신경망 학습 동작을 수행하는 과정에서 생성되는 데이터들을 메모리에 저장할 수 있다.
도 9는 일 실시 예에 따른, 전자 장치의 동작 순서도(900)를 도시한다.
일 실시예에 따르면, 전자 장치(예: 도 1의 전자 장치(101))는 도 9의 동작들을 수행할 수 있다. 예를 들어, 전자 장치의 프로세서(예: 도 1의 프로세서(120))는 메모리(예: 도 1의 메모리(130))에 저장된 인스트럭션들(instructions)의 실행 시에 도 9의 동작들을 수행하도록 설정될 수 있다.
동작 905에서, 전자 장치는 인공 신경망 학습 요청을 수신할 수 있다. 전자 장치가 인공 신경망 학습 요청을 수신하는 동작에 대한 설명은 도 7의 동작 705에 대한 설명으로 대체될 수 있다.
동작 910에서, 전자 장치는 학습 동작을 수행하려는 인공 신경망에 포함된 가중치(weight)가 정수 값에 해당하는지 여부를 판단할 수 있다.
예를 들어, 학습 동작의 대상이 되는 인공 신경망에 포함된 가중치(weight)가 정수(integer) 값에 해당하는 경우(예: 동작 910 - Yes), 전자 장치는 동작 913을 수행할 수 있다. 다른 예를 들어, 학습 동작의 대상이 되는 인공 신경망에 포함된 가중치가 소수(decimal) 값에 해당하는 경우(예: 동작 910 - No), 전자 장치는 동작 915를 수행할 수 있다.
동작 913에서, 전자 장치는 학습 동작의 대상이 되는 인공 신경망을 기반으로 제1 인공 신경망을 생성할 수 있다. 예를 들어, 전자 장치는 제1 프로세서(예: 도 1의 메인 프로세서(121)) 또는 양자화 모듈(예: 도 4의 양자화 모듈(425))을 이용하여 상기 학습 동작의 대상이 되는 인공 신경망에 대한 양자화(quantization) 동작을 수행할 수 있다. 제1 인공 신경망은 상기 학습 동작의 대상이 되는 인공 신경망에 대한 양자화 동작이 수행된 인공 신경망으로 참조될 수 있다.
동작 915에서, 전자 장치는 학습 동작의 대상이 되는 인공 신경망을 기반으로 제2 인공 신경망을 생성할 수 있다. 예를 들어, 전자 장치는 제1 프로세서 또는 양자화 모듈을 이용하여 상기 학습 동작의 대상이 되는 인공 신경망에 대한 비 양자화(de-quantization) 동작을 수행할 수 있다. 제2 인공 신경망은 상기 학습 동작의 대상이 되는 인공 신경망에 대한 비 양자화 동작이 수행된 인공 신경망으로 참조될 수 있다.
동작 920에서, 전자 장치는 복수의 프로세서에 서로 다른 인공 신경망을 할당할 수 있다. 예를 들어, 전자 장치는 제1 프로세서(예: 도 1의 보조 프로세서(123))에 제1 인공 신경망을 로드(load)할 수 있다. 다른 예를 들어, 전자 장치는 제2 프로세서(예: 도 1의 메인 프로세서(121))에 제2 인공 신경망을 로드할 수 있다.
동작 925에서, 전자 장치는 인공 신경망 학습 동작을 수행할 수 있다. 예를 들어, 전자 장치는 동작 920에서 각 프로세서에 할당된 데이터들을 기반으로 인공 신경망의 학습 동작을 수행할 수 있다.
도 10은 일 실시 예에 따른, 전자 장치의 동작 순서도(1000)를 도시한다.
일 실시예에 따르면, 전자 장치(예: 도 1의 전자 장치(101))는 도 10의 동작들을 수행할 수 있다. 예를 들어, 전자 장치의 프로세서(예: 도 1의 프로세서(120))는 메모리(예: 도 1의 메모리(130))에 저장된 인스트럭션들(instructions)의 실행 시에 도 10의 동작들을 수행하도록 설정될 수 있다.
동작 1005에서, 전자 장치는 순전파 동작을 통한 결과 데이터들을 메모리에 저장할 수 있다. 예를 들어, 전자 장치는 제1 프로세서(예: 도 1의 보조 프로세서(123))에 제1 인공 신경망을 로드(load)할 수 있다. 제1 프로세서는 제1 인공 신경망에 입력 데이터를 입력하여 순전파 동작을 수행하고, 상기 순전파 동작을 수행하는 과정에서 상기 제1 인공 신경망 내의 적어도 하나의 레이어들에서 생성되는 데이터들 중 적어도 일부를 메모리에 저장하도록 할 수 있다.
동작 1010에서, 전자 장치는 제1 인공 신경망에 대한 순전파 동작을 통해 출력된 결과 데이터가 지정된 조건을 만족하는지 여부를 판단할 수 있다. 예를 들어, 전자 장치는 결과 데이터가 입력 데이터의 batch 수를 만족하는지 여부를 판단할 수 있다.
예를 들어, 결과 데이터가 지정된 조건을 만족하는 경우(예: 동작 1010 - Yes), 전자 장치는 동작 1015를 수행할 수 있다. 다른 예를 들어, 결과 데이터가 지정된 조건을 만족하지 않는 경우(예: 동작 1010 - No), 전자 장치는 동작 1005를 반복하여 수행할 수 있다.
동작 1015에서, 전자 장치는 역전파 동작을 통해 가중치를 갱신할 수 있다. 예를 들어, 전자 장치는 제2 프로세서(예: 도 1의 메인 프로세서(121))에 제2 인공 신경망을 로드(load)할 수 있다. 제2 프로세서는 제2 인공 신경망에 대한 역전파 동작을 수행하고, 상기 역전파 동작에 기반하여 제2 인공 신경망 내의 적어도 하나의 레이어에 포함된 가중치들을 갱신할 수 있다.
동작 1020에서, 전자 장치는 동작 1015에서 가중치들이 갱신된 제2 인공 신경망을 양자화(quantization) 할 수 있다. 예를 들어, 전자 장치는 역전파 동작을 통해 제2 인공 신경망에 포함된 가중치들을 갱신한 후, 제1 프로세서 또는 양자화 모듈(예: 도 4의 양자화 모듈(425))으로 하여금 상기 제2 인공 신경망을 양자화하여 제3 인공 신경망을 생성하도록 할 수 있다. 전자 장치는 제1 프로세서에 로드(load) 된 제1 인공 신경망을 제3 인공 신경망으로 업데이트 할 수 있다.
동작 1025에서, 전자 장치는 인공 신경망 학습 횟수가 지정된 횟수를 만족하는지 여부를 판단할 수 있다.
예를 들어, 인경 신경망 학습 횟수가 지정된 횟수를 만족하는 것으로 판단된 경우(예: 동작 1025 - Yes), 전자 장치는 인공 신경망 학습 동작을 종료할 수 있다. 다른 예를 들어, 인경 신경망 학습 횟수가 지정된 횟수를 만족하지 못한 것으로 판단된 경우(예: 동작 1025 - No), 전자 장치는 동작 1005를 수행할 수 있다.
본 문서의 일 실시 예에 따르면, 전자 장치는 제1 프로세서, 제2 프로세서, 및 입력 레이어 및 출력 레이어를 포함하는 적어도 하나의 인공 신경망을 저장하고, 상기 제1 프로세서 및 상기 제2 프로세서에 작동적으로(operatively) 연결되는 메모리를 포함할 수 있다.
일 실시예에 따르면, 상기 제1 프로세서는 인공 신경망 학습(training) 요청을 수신하고, 입력 데이터를 제1 인공 신경망의 상기 입력 레이어에 입력하여 순전파(forward propagation) 동작을 수행하고, 상기 순전파 동작에 기반하여 생성된 제1 결과 데이터를 상기 메모리에 저장하고, 상기 제2 프로세서는, 상기 제1 결과 데이터를 제2 인공 신경망의 상기 출력 레이어에 입력하여 역전파(backward propagation) 동작을 수행하고, 상기 역전파 동작에 기반하여 상기 제2 인공 신경망에 포함된 가중치(weight)들을 갱신하도록 설정될 수 있다.
일 실시예에 따르면, 상기 제1 인공 신경망 및 상기 제2 인공 신경망은 적어도 하나의 레이어를 더 포함하고, 상기 제1 프로세서는, 상기 순전파 동작을 수행하는 과정에서 상기 적어도 하나의 레이어들에서 생성되는 데이터들 중 적어도 일부를 상기 메모리에 저장하고, 상기 제2 프로세서는, 상기 역전파 동작을 수행하는 과정에서 상기 적어도 하나의 레이어들에서 생성되는 데이터들 중 적어도 일부를 상기 메모리에 저장하도록 설정될 수 있다.
일 실시예에 따르면, 상기 제1 인공 신경망은, 상기 인공 신경망 학습 요청에 기반하여 결정된 인공 신경망에 대하여 상기 제1 프로세서가 양자화(quantization) 동작을 수행하여 생성한 인공 신경망에 해당하고, 상기 제2 인공 신경망은, 상기 인공 신경망 학습 요청에 기반하여 결정된 인공 신경망에 대하여 상기 제1 프로세서가 비 양자화(de-quantization) 동작을 수행하여 생성한 인공 신경망에 해당할 수 있다.
일 실시예에 따르면, 상기 제1 프로세서는, 상기 역전파 동작에 기반하여 상기 가중치들이 갱신된 상기 제2 인공 신경망을 양자화(quantization)하여 제3 인공 신경망을 생성하고, 상기 제3 인공 신경망을 상기 메모리에 저장하도록 설정될 수 있다.
일 실시예에 따르면, 상기 제1 인공 신경망 및 상기 제3 인공 신경망 내의 적어도 하나의 레이어는 정수(integer) 값을 갖는 가중치(weight)를 포함하고, 상기 제2 인공 신경망 내의 적어도 하나의 레이어는 소수(decimal) 값을 갖는 가중치를 포함할 수 있다.
일 실시예에 따르면, 상기 인공 신경망 학습 동작이 지정된 조건을 만족하는 것으로 판단된 경우, 상기 인공 신경망 학습 동작을 종료하고, 상기 인공 신경망 학습 동작이 상기 지정된 조건을 만족하지 못한 것으로 판단된 경우, 상기 인공 신경망 학습 동작을 반복하여 수행하도록 설정될 수 있다.
일 실시예에 따르면, 상기 메모리에 저장된 SDK(Software Development Kit) 또는 API(Application Programming Interface)를 더 포함하고, 상기 SDK 또는 API 설정 값을 변경하도록 하는 외부 입력을 수신하고, 상기 변경된 설정 값을 기반으로 인공 신경망 학습 동작을 수행하도록 설정될 수 있다.
일 실시예에 따르면, 상기 제1 프로세서를 통한 순전파 동작을 위하여 이용되는 상기 입력 데이터는 액티베이션(activation) 데이터를 포함할 수 있다.
일 실시예에 따르면, 상기 메모리에 저장된 학습 분배부를 더 포함하고, 상기 학습 분배부는, 상기 인공 신경망 학습 요청에 대응하여 상기 제1 프로세서 또는 상기 제2 프로세서에 서로 다른 신경망 처리 동작을 수행하도록 하는 제어 신호 및 인공 신경망의 학습을 위한 데이터를 분배하여 전송하도록 설정될 수 있다.
일 실시예에 따르면, 상기 제1 프로세서는 NPU(Neural Processing Unit)에 해당하고, 상기 제2 프로세서는 CPU(Central Processing Unit) 또는 GPU(Graphic Processing Unit)에 해당할 수 있다.
본 문서의 일 실시 예에 따른, 전자 장치가 인공 신경망(neural network) 학습(training) 동작을 수행하는 방법은, 인공 신경망 학습 요청을 수신하는 동작,제1 프로세서를 통해 입력 데이터를 제1 인공 신경망의 입력 레이어에 입력하여 순전파(forward propagation) 동작을 수행하고, 상기 순전파 동작에 기반하여 생성된 제1 결과 데이터를 상기 메모리에 저장하는 동작, 및 상기 제1 결과 데이터를 제2 인공 신경망의 상기 출력 레이어에 입력하여 역전파(backward propagation) 동작을 수행하고, 상기 역전파 동작에 기반하여 상기 제2 인공 신경망에 포함된 가중치(weight)들을 갱신하는 동작을 포함할 수 있다.
일 실시예에 따르면, 상기 제1 인공 신경망 및 상기 제2 인공 신경망은 적어도 하나의 레이어를 더 포함하고, 상기 인공 신경망(neural network) 학습(training) 동작을 수행하는 방법은, 상기 순전파 동작을 수행하는 과정에서 상기 적어도 하나의 레이어들에서 생성되는 데이터들 중 적어도 일부를 상기 메모리에 저장하는 동작 및 상기 역전파 동작을 수행하는 과정에서 상기 적어도 하나의 레이어들에서 생성되는 데이터들 중 적어도 일부를 상기 메모리에 저장하는 동작을 더 포함할 수 있다.
일 실시예에 따르면, 상기 제1 인공 신경망은, 상기 인공 신경망 학습 요청에 기반하여 결정된 인공 신경망에 대하여 상기 제1 프로세서가 양자화(quantization) 동작을 수행하여 생성한 인공 신경망에 해당하고, 상기 제2 인공 신경망은, 상기 인공 신경망 학습 요청에 기반하여 결정된 인공 신경망에 대하여 상기 제1 프로세서가 비 양자화(de-quantization) 동작을 수행하여 생성한 인공 신경망에 해당할 수 있다.
일 실시예에 따르면, 상기 인공 신경망(neural network) 학습(training) 동작을 수행하는 방법은, 상기 역전파 동작에 기반하여 상기 가중치들이 갱신된 상기 제2 인공 신경망을 양자화(quantization)하여 제3 인공 신경망을 생성하고, 상기 제3 인공 신경망을 상기 메모리에 저장하는 동작을 더 포함할 수 있다.
일 실시예에 따르면, 상기 제1 인공 신경망 및 상기 제3 인공 신경망 내의 적어도 하나의 레이어는 정수(integer) 값을 갖는 가중치(weight)를 포함하고, 상기 제2 인공 신경망 내의 적어도 하나의 레이어는 소수(decimal) 값을 갖는 가중치를 포함할 수 있다.
일 실시예에 따르면, 상기 인공 신경망(neural network) 학습(training) 동작을 수행하는 방법은, 상기 인공 신경망 학습 동작이 지정된 조건을 만족하는 것으로 판단된 경우, 상기 인공 신경망 학습 동작을 종료하는 동작 및 상기 인공 신경망 학습 동작이 상기 지정된 조건을 만족하지 못한 것으로 판단된 경우, 상기 인공 신경망 학습 동작을 반복하여 수행하는 동작을 더 포함할 수 있다.
일 실시예에 따르면, 상기 인공 신경망(neural network) 학습(training) 동작을 수행하는 방법은, 메모리에 저장된 SDK 또는 API 설정 값을 변경하도록 하는 외부 입력을 수신하고, 상기 변경된 설정 값을 기반으로 인공 신경망 학습 동작을 수행하는 동작을 더 포함할 수 있다.
일 실시예에 따르면, 상기 인공 신경망(neural network) 학습(training) 동작을 수행하는 방법은, 학습 분배부가 상기 인공 신경망 학습 요청에 대응하여 상기 제1 프로세서 또는 상기 제2 프로세서에 서로 다른 신경망 처리 동작을 수행하도록 하는 제어 신호 및 인공 신경망의 학습을 위한 데이터를 분배하여 전송하는 동작을 더 포함할 수 있다.

Claims (15)

  1. 전자 장치에 있어서,
    제1 프로세서;
    제2 프로세서; 및
    입력 레이어 및 출력 레이어를 포함하는 적어도 하나의 인공 신경망을 저장하고, 상기 제1 프로세서 및 상기 제2 프로세서에 작동적으로(operatively) 연결되는 메모리; 를 포함하고,
    상기 제1 프로세서는:
    인공 신경망 학습(training) 요청을 수신하고, 입력 데이터를 제1 인공 신경망의 입력 레이어에 입력하여 순전파(forward propagation) 동작을 수행하고, 상기 순전파 동작에 기반하여 생성된 제1 결과 데이터를 상기 메모리에 저장하고,
    상기 제2 프로세서는:
    상기 제1 결과 데이터를 제2 인공 신경망의 출력 레이어에 입력하여 역전파(backward propagation) 동작을 수행하고, 상기 역전파 동작에 기반하여 상기 제2 인공 신경망에 포함된 가중치(weight)들을 갱신하도록 설정된, 전자 장치.
  2. 청구항 1에 있어서,
    상기 제1 인공 신경망 및 상기 제2 인공 신경망은 적어도 하나의 레이어를 더 포함하고,
    상기 제1 프로세서는, 상기 순전파 동작을 수행하는 과정에서 상기 적어도 하나의 레이어들에서 생성되는 데이터들 중 적어도 일부를 상기 메모리에 저장하고,
    상기 제2 프로세서는, 상기 역전파 동작을 수행하는 과정에서 상기 적어도 하나의 레이어들에서 생성되는 데이터들 중 적어도 일부를 상기 메모리에 저장하도록 설정된, 전자 장치.
  3. 청구항 1에 있어서,
    상기 제1 인공 신경망은, 상기 인공 신경망 학습 요청에 기반하여 결정된 인공 신경망에 대하여 상기 제1 프로세서가 양자화(quantization) 동작을 수행하여 생성한 인공 신경망에 해당하고,
    상기 제2 인공 신경망은, 상기 인공 신경망 학습 요청에 기반하여 결정된 인공 신경망에 대하여 상기 제1 프로세서가 비 양자화(de-quantization) 동작을 수행하여 생성한 인공 신경망에 해당하는, 전자 장치.
  4. 청구항 1에 있어서,
    상기 제1 프로세서는, 상기 역전파 동작에 기반하여 상기 가중치들이 갱신된 상기 제2 인공 신경망을 양자화(quantization)하여 제3 인공 신경망을 생성하고, 상기 제3 인공 신경망을 상기 메모리에 저장하도록 설정된, 전자 장치.
  5. 청구항 4에 있어서,
    상기 제1 인공 신경망 및 상기 제3 인공 신경망 내의 적어도 하나의 레이어는 정수(integer) 값을 갖는 가중치(weight)를 포함하고,
    상기 제2 인공 신경망 내의 적어도 하나의 레이어는 소수(decimal) 값을 갖는 가중치를 포함하는, 전자 장치.
  6. 청구항 1에 있어서,
    상기 인공 신경망 학습 동작이 지정된 조건을 만족하는 것으로 판단된 경우, 상기 인공 신경망 학습 동작을 종료하고,
    상기 인공 신경망 학습 동작이 상기 지정된 조건을 만족하지 못한 것으로 판단된 경우, 상기 인공 신경망 학습 동작을 반복하여 수행하도록 설정된, 전자 장치.
  7. 청구항 1에 있어서,
    상기 메모리에 저장된 적어도 하나의 SDK(Software Development Kit) 또는 API(Application Programming Interface)를 더 포함하고,
    상기 SDK 또는 API 설정 값을 변경하도록 하는 외부 입력을 수신하고,
    상기 변경된 설정 값을 기반으로 인공 신경망 학습 동작을 수행하도록 설정된, 전자 장치.
  8. 청구항 1에 있어서,
    상기 제1 프로세서를 통한 순전파 동작을 위하여 이용되는 상기 입력 데이터는 액티베이션(activation) 데이터를 포함하는, 전자 장치.
  9. 청구항 1에 있어서,
    상기 메모리에 저장된 학습 분배부를 더 포함하고,
    상기 학습 분배부는, 상기 인공 신경망 학습 요청에 대응하여 상기 제1 프로세서 또는 상기 제2 프로세서에 서로 다른 신경망 처리 동작을 수행하도록 하는 제어 신호 및 인공 신경망의 학습을 위한 데이터를 분배하여 전송하도록 설정된, 전자 장치.
  10. 청구항 1에 있어서,
    상기 제1 프로세서는 NPU(Neural Processing Unit)에 해당하고,
    상기 제2 프로세서는 CPU(Central Processing Unit) 또는 GPU(Graphic Processing Unit)에 해당하는, 전자 장치.
  11. 전자 장치가 인공 신경망(neural network) 학습(training) 동작을 수행하는 방법으로서,
    인공 신경망 학습 요청을 수신하는 동작;
    제1 프로세서를 통해 입력 데이터를 제1 인공 신경망의 입력 레이어에 입력하여 순전파(forward propagation) 동작을 수행하고, 상기 순전파 동작에 기반하여 생성된 제1 결과 데이터를 상기 메모리에 저장하는 동작; 및
    상기 제1 결과 데이터를 제2 인공 신경망의 출력 레이어에 입력하여 역전파(backward propagation) 동작을 수행하고, 상기 역전파 동작에 기반하여 상기 제2 인공 신경망에 포함된 가중치(weight)들을 갱신하는 동작; 을 포함하는, 방법.
  12. 청구항 11에 있어서,
    상기 제1 인공 신경망 및 상기 제2 인공 신경망은 적어도 하나의 레이어를 더 포함하고,
    상기 인공 신경망(neural network) 학습(training) 동작을 수행하는 방법은,
    상기 순전파 동작을 수행하는 과정에서 상기 적어도 하나의 레이어들에서 생성되는 데이터들 중 적어도 일부를 상기 메모리에 저장하는 동작; 및
    상기 역전파 동작을 수행하는 과정에서 상기 적어도 하나의 레이어들에서 생성되는 데이터들 중 적어도 일부를 상기 메모리에 저장하는 동작; 을 더 포함하는, 방법.
  13. 청구항 11에 있어서,
    상기 제1 인공 신경망은, 상기 인공 신경망 학습 요청에 기반하여 결정된 인공 신경망에 대하여 상기 제1 프로세서가 양자화(quantization) 동작을 수행하여 생성한 인공 신경망에 해당하고,
    상기 제2 인공 신경망은, 상기 인공 신경망 학습 요청에 기반하여 결정된 인공 신경망에 대하여 상기 제1 프로세서가 비 양자화(de-quantization) 동작을 수행하여 생성한 인공 신경망에 해당하는, 방법.
  14. 청구항 11에 있어서,
    상기 인공 신경망(neural network) 학습(training) 동작을 수행하는 방법은,
    상기 역전파 동작에 기반하여 상기 가중치들이 갱신된 상기 제2 인공 신경망을 양자화(quantization)하여 제3 인공 신경망을 생성하고, 상기 제3 인공 신경망을 상기 메모리에 저장하는 동작; 을 더 포함하는, 방법.
  15. 청구항 11에 있어서,
    상기 인공 신경망(neural network) 학습(training) 동작을 수행하는 방법은,
    상기 인공 신경망 학습 동작이 지정된 조건을 만족하는 것으로 판단된 경우, 상기 인공 신경망 학습 동작을 종료하는 동작; 및
    상기 인공 신경망 학습 동작이 상기 지정된 조건을 만족하지 못한 것으로 판단된 경우, 상기 인공 신경망 학습 동작을 반복하여 수행하는 동작; 을 더 포함하는, 방법.
PCT/KR2021/009491 2020-10-15 2021-07-22 인공 신경망 학습 방법 및 이를 지원하는 전자 장치 WO2022080634A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/429,185 US20220309352A1 (en) 2020-10-15 2021-07-22 Method for training artificial neural network and electronic device for supporting the same

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020200133261A KR20220049759A (ko) 2020-10-15 2020-10-15 인공 신경망 학습 방법 및 이를 지원하는 전자 장치
KR10-2020-0133261 2020-10-15

Publications (1)

Publication Number Publication Date
WO2022080634A1 true WO2022080634A1 (ko) 2022-04-21

Family

ID=81209062

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/009491 WO2022080634A1 (ko) 2020-10-15 2021-07-22 인공 신경망 학습 방법 및 이를 지원하는 전자 장치

Country Status (3)

Country Link
US (1) US20220309352A1 (ko)
KR (1) KR20220049759A (ko)
WO (1) WO2022080634A1 (ko)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102494095B1 (ko) * 2022-07-06 2023-02-06 주식회사 스퀴즈비츠 인공 신경망 학습 장치 및 방법
CN117492380B (zh) * 2023-12-29 2024-05-03 珠海格力电器股份有限公司 智能家居的中央控制系统的控制方法和控制装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101855360B1 (ko) * 2017-12-13 2018-05-09 한국과학기술정보연구원 신경망의 학습 최적화를 위한 신경망 구성 방법 및 장치
US20190204832A1 (en) * 2017-12-29 2019-07-04 Apex Artificial Intelligence Industries, Inc. Controller systems and methods of limiting the operation of neural networks to be within one or more conditions
KR102071179B1 (ko) * 2019-05-20 2020-01-29 주식회사 루닛 데이터 셋의 연속적인 학습 방법 및 장치
US20200184320A1 (en) * 2018-12-08 2020-06-11 Apical Limited Neural network processing
KR20200111948A (ko) * 2019-03-20 2020-10-05 삼성전자주식회사 인공 신경망을 처리하는 방법 및 이를 위한 전자 장치

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101855360B1 (ko) * 2017-12-13 2018-05-09 한국과학기술정보연구원 신경망의 학습 최적화를 위한 신경망 구성 방법 및 장치
US20190204832A1 (en) * 2017-12-29 2019-07-04 Apex Artificial Intelligence Industries, Inc. Controller systems and methods of limiting the operation of neural networks to be within one or more conditions
US20200184320A1 (en) * 2018-12-08 2020-06-11 Apical Limited Neural network processing
KR20200111948A (ko) * 2019-03-20 2020-10-05 삼성전자주식회사 인공 신경망을 처리하는 방법 및 이를 위한 전자 장치
KR102071179B1 (ko) * 2019-05-20 2020-01-29 주식회사 루닛 데이터 셋의 연속적인 학습 방법 및 장치

Also Published As

Publication number Publication date
KR20220049759A (ko) 2022-04-22
US20220309352A1 (en) 2022-09-29

Similar Documents

Publication Publication Date Title
WO2022055068A1 (ko) 음성에 포함된 커맨드를 확인하는 전자 장치와 이의 동작 방법
WO2022080634A1 (ko) 인공 신경망 학습 방법 및 이를 지원하는 전자 장치
WO2022019538A1 (ko) 언어 모델 및 이를 포함하는 전자 장치
WO2022177162A1 (ko) 어플리케이션의 모델 파일을 초기화하는 프로세서 및 이를 포함하는 전자 장치
WO2022114599A1 (ko) 커넥터를 포함하는 전자 장치
WO2022092580A1 (ko) 전자 장치 표면의 온도를 예측하는 방법 및 그 전자 장치
WO2022050611A1 (ko) 전자 장치 및 전자 장치의 동작 방법
WO2022154383A1 (ko) 전자 장치 및 전자 장치의 커널 모듈 로딩 방법
WO2021085996A1 (ko) 신경망의 커널들을 정렬하는 전자 장치 및 이의 동작 방법
WO2022145883A1 (ko) 음성 입력에 응답하는 방법 및 이를 지원하는 전자 장치
WO2022234984A1 (ko) 전자 장치 및 전자 장치의 동작 방법
WO2022092539A1 (ko) 사용자 모델을 관리하는 전자 장치 및 이의 동작 방법
WO2023120921A1 (ko) 펌웨어 업데이트 방법, 상기 방법을 수행하는 전자 장치 및 충전 장치
WO2023054913A1 (ko) 포스 터치를 확인하는 전자 장치와 이의 동작 방법
WO2022173260A1 (ko) 부품을 제어하기 위한 방법 및 이를 지원하는 전자 장치
WO2023287023A1 (ko) 음향 신호를 생성하는 전자 장치 및 방법
WO2022114648A1 (ko) 배경 화면을 설정하기 위한 전자 장치 및 그의 동작 방법
WO2022010158A1 (ko) 전자 장치 및 전자 장치의 동작 방법
WO2022191378A1 (ko) 서비스를 제공하는 전자 장치 및 이의 동작 방법
WO2022103108A1 (ko) 전자 장치 및 전자 장치의 터치 입력 감지 방법
WO2022203182A1 (ko) 인공 지능 모델을 최적화하기 위한 전자 장치 및 그 동작 방법
WO2022163907A1 (ko) 전자 장치 및 이의 제어 방법
WO2022102960A1 (en) Electronic device for managing task relating to processing of audio signal, and operation method therefor
WO2024058615A1 (ko) 신경 처리부를 포함하는 전자 장치 및 그 동작 방법
WO2022203179A1 (ko) 오디오 데이터 처리 방법 및 이를 지원하는 전자 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21880284

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21880284

Country of ref document: EP

Kind code of ref document: A1