WO2022039385A1 - 전자 장치 및 그 제어 방법 - Google Patents

전자 장치 및 그 제어 방법 Download PDF

Info

Publication number
WO2022039385A1
WO2022039385A1 PCT/KR2021/008631 KR2021008631W WO2022039385A1 WO 2022039385 A1 WO2022039385 A1 WO 2022039385A1 KR 2021008631 W KR2021008631 W KR 2021008631W WO 2022039385 A1 WO2022039385 A1 WO 2022039385A1
Authority
WO
WIPO (PCT)
Prior art keywords
neural network
threshold range
value
network operation
weights
Prior art date
Application number
PCT/KR2021/008631
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/425,216 priority Critical patent/US20230153068A1/en
Publication of WO2022039385A1 publication Critical patent/WO2022039385A1/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/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/52Multiplying; Dividing
    • G06F7/523Multiplying only
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/01Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Definitions

  • the present disclosure relates to an electronic device and a method for controlling the same, and more particularly, to an electronic device for performing a neural network operation on input data based on an artificial intelligence model and a method for controlling the same.
  • Recent display devices support 8K (7680 ⁇ 4320) resolution over 4K (3840 ⁇ 2160) resolution.
  • the resolution of an existing video source is often less than 2K (1920 ⁇ 1080) resolution.
  • a display device supporting a high resolution may upscale an image source to a resolution corresponding to the resolution of the display device when a low resolution image source is input.
  • the display apparatus displays a low-resolution image source after improving the image quality of the image signal such as noise reduction, detail enhancement, and contrast enhancement. Upscaling may be performed to a resolution corresponding to the resolution of the device.
  • the display device improves the image quality through Deep Learning Super Resolution (DLSR), and then converts the frame rate to correspond to the display panel and outputs it.
  • DLSR Deep Learning Super Resolution
  • the deep learning super-resolution receives a YUV or RGB image source and extracts a factor, and a deep neural network composed of a multi-layer perceptron. It is possible to obtain detail information through the operation of , and obtain an input image (YUV or RGB) with improved detail by adding detail information to the input image (YUV or RGB).
  • the perceptron which is a core structure of deep artificial neural network operation, may include various circuit configurations.
  • 1C shows an example of a perceptron, which is a core structure of deep artificial neural network computation.
  • the perceptron may include a multiply and accumulate unit (MAC) that multiplies and accumulates an input signal and a weight, an adder that adds the output of the MAC with a bias, and a configuration that performs an activation function.
  • 1D shows a hardware perceptron to which a total of m input signals and weights are input.
  • MAC multiply and accumulate unit
  • the MAC, the adder, and the components performing the activation function of the perceptron all consume power, and the power consumption may increase exponentially according to the resolution of the image source. Therefore, it is necessary to solve the problem of heat generation due to power consumption and a decrease in processing speed.
  • the present disclosure has been made in accordance with the above-mentioned necessity, and an object of the present disclosure is to provide an electronic device for reducing power consumption generated in a neural network calculation process and a control method thereof.
  • an electronic device provides an input interface, a memory in which a plurality of weights corresponding to an artificial intelligence model are stored, and an input provided through the input interface based on the plurality of weights. It includes a processor that performs neural network operations on data. In addition, if at least one of the input data, the plurality of weights, or an operation result obtained in the process of performing the neural network operation is within a threshold range, the processor changes the original value within the threshold range to a preset value, The neural network operation may be performed based on the set value.
  • the preset value may be 0.
  • the processor may acquire the threshold range based on a result of the neural network operation performed using the preset value and a result of the neural network operation performed using the original value.
  • the threshold range is a range from -a to a, and a may be a positive number smaller than a maximum value of at least one of the input data, the plurality of weights, or an operation result obtained in the process of performing the neural network operation.
  • the processor changes the original value within the first threshold range to one of a plurality of first representative values and performing the neural network operation based on a changed value corresponding to one of the plurality of first representative values, and a second threshold in which at least one of the input data, the plurality of weights, or the operation result is smaller than the threshold range If it is within the range, the original value within the second threshold range may be changed to one of a plurality of second representative values, and the neural network operation may be performed based on the changed value corresponding to one of the plurality of first representative values. .
  • Each of the plurality of first representative values and the plurality of second representative values is a multiplier of 2, and the processor outputs at least one of the input data, the plurality of weights, or the operation result to the plurality of first representative values and A representative value having the smallest size difference among the plurality of second representative values may be changed, and the neural network operation may be performed based on the representative value.
  • the processor may obtain a multiplication operation result using one of the plurality of first representative values or the plurality of second representative values in the process of performing the neural network operation based on the shift operation.
  • the processor obtains the number of bits less than a threshold value determined based on the plurality of first representative values and the plurality of second representative values, wherein at least one of the input data, the plurality of weights, or the operation result is the threshold value If it does not fall within the range, the first threshold range, and the second threshold range, the number of bits may be obtained.
  • the processor determines the threshold range, the first critical range, and the second critical range based on a result of the neural network operation performed using the changed value and a result of the neural network operation performed using the preset value can be obtained
  • the critical range ranges from -a to a
  • a is a positive number
  • the first critical range ranges from b to c
  • the second critical range ranges from -c to -b
  • b may be a positive number greater than a and smaller than c
  • c may be a positive number smaller than a maximum value of at least one of the input data, the plurality of weights, or an operation result obtained in the process of performing the neural network operation.
  • the threshold range may be different for each layer of the artificial intelligence model.
  • the electronic device may further include a user interface, and when a user command is received through the user interface, the processor may identify whether at least one of the input data, the plurality of weights, or the calculation result is within a threshold range.
  • a control method of an electronic device for performing a neural network operation includes: performing a neural network operation on input data based on a plurality of weights learned by an artificial intelligence model; identifying whether at least one of the input data, the plurality of weights, or an operation result obtained in the process of performing the neural network operation is within a threshold range, and changing an original value within the threshold range to a predetermined value; and the predetermined value and performing the neural network operation based on .
  • the preset value may be 0.
  • the control method may further include obtaining the threshold range based on a result of the neural network operation performed using the preset value and a result of the neural network operation performed using the original value.
  • 1A is a block diagram of an electronic device.
  • 1B is a block diagram of a DLSR.
  • 1C shows a perceptron
  • 1D is a block diagram of a hardware perceptron.
  • FIG. 2A is a block diagram illustrating a configuration of an electronic device according to an embodiment of the present disclosure.
  • 2B is a block diagram illustrating an example of a detailed configuration of an electronic device.
  • 3A and 3B illustrate a perceptron to which a mapper is added according to an embodiment of the present disclosure.
  • FIG. 4 is a diagram for explaining a critical range according to an embodiment of the present disclosure.
  • FIG. 5 is a flowchart illustrating a mapping operation including an active switch according to an embodiment of the present disclosure.
  • FIG. 6 is a diagram for describing a critical range, a first critical range, and a second critical range according to an embodiment of the present disclosure.
  • FIG. 7 is a flowchart illustrating a mapping operation including an active switch in a plurality of threshold ranges according to an embodiment of the present disclosure.
  • FIG. 8 is a flowchart illustrating a method of controlling an electronic device according to an embodiment of the present disclosure.
  • expressions such as “have,” “may have,” “include,” or “may include” indicate the presence of a corresponding characteristic (eg, a numerical value, function, operation, or component such as a part). and does not exclude the presence of additional features.
  • an expression like "at least one” modifies the entire list of elements when preceded by a list of elements, not individual elements of the list.
  • the expression “at least one of a, b and c” includes only a, only b, only c, both a and b, both a and c, both b and c, or all of a, b and c should be understood as
  • the term user may refer to a person who uses an electronic device or a device (eg, an artificial intelligence electronic device) using the electronic device.
  • a device eg, an artificial intelligence electronic device
  • 2A is a block diagram illustrating a configuration of an electronic device 100 according to an embodiment of the present disclosure.
  • the electronic device 100 is a device that performs a neural network operation, and is a TV, a desktop PC, a laptop computer, a smartphone, a tablet PC, a monitor, smart glasses, a smart watch, a set-top box (STB), a speaker, a computer body, and a video wall (video). wall), a large format display (LFD), a digital signage (digital signage), a digital information display (DID), a projector display, a digital video disk (DVD) player, and the like.
  • the present invention is not limited thereto, and the electronic device 100 may be any device as long as it can perform a neural network operation.
  • the electronic device 100 includes a memory 110 , a processor 120 , and an input unit 130 .
  • the present invention is not limited thereto, and the electronic device 100 may be implemented in a form in which some components are excluded, or may further include other components.
  • the memory 110 may refer to hardware that stores information such as data in an electrical or magnetic form so that the processor 120 can access it. To this end, the memory 110 may be implemented with at least one hardware selected from among non-volatile memory, volatile memory, flash memory, hard disk drive (HDD) or solid state drive (SSD), RAM, ROM, etc. .
  • the memory 110 may store weights learned by the artificial intelligence model.
  • the artificial intelligence model is a Convolutional Neural Network (CNN), Deep Neural Network (DNN), Recurrent Neural Network (RNN), Restricted Boltzmann Machine (RBM), Deep Belief Network (DBN), Bidirectional Recurrent Deep Neural Network (BRDNN) and It may be deep Q-networks, and the like, and in the present disclosure, weights learned by various types of artificial intelligence models as well as the above-mentioned neural networks may be stored in the memory 110 .
  • the artificial intelligence model may be learned through the electronic device 100 or a separate server/system through various learning algorithms.
  • the learning algorithm is a method of training a predetermined target device (eg, a robot) using a plurality of learning data so that the predetermined target device can make a decision or make a prediction by itself.
  • Examples of the learning algorithm include supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, and various learning algorithms can be used. there is.
  • the memory 110 may store information on a threshold range and a preset value to which a value within the threshold range is to be converted. Also, the memory 110 may store information on a plurality of threshold ranges and information on values to which values within each threshold range are to be converted. Information on such a critical range may be different for each layer included in the artificial intelligence model.
  • the memory 110 is accessed by the processor 120 , and reading/writing/modification/deletion/update of instructions, modules, artificial intelligence models or data may be performed by the processor 120 .
  • the input unit 130 may have any configuration for receiving input data.
  • the input unit 130 may be configured to receive input data through wired/wireless communication.
  • the input unit 130 is configured to take an image like a camera, and the image may be input data.
  • the processor 120 controls the overall operation of the electronic device 100 .
  • the processor 120 may be connected to each component of the electronic device 100 to control the overall operation of the electronic device 100 .
  • the processor 120 may be connected to a component such as a display to control the operation of the electronic device 100 .
  • the processor 120 may be implemented as a digital signal processor (DSP), a microprocessor, or a time controller (TCON).
  • DSP digital signal processor
  • TCON time controller
  • the present invention is not limited thereto, and the central processing unit (central processing unit (CPU)), micro controller unit (MCU), micro processing unit (MPU), controller, application processor (AP), or communication processor (CP), ARM processor
  • the processor 120 may be implemented as a SoC (System on Chip) or LSI (large scale integration) in which a processing algorithm is embedded, or an FPGA ( Field programmable gate array) may be implemented.
  • SoC System on Chip
  • LSI large scale integration
  • FPGA Field programmable gate array
  • the processor 120 may perform a neural network operation on the input data input through the input unit 130 based on the artificial intelligence model.
  • the processor 120 changes a value within the threshold range to a preset value
  • neural network calculations can be performed.
  • the processor 120 may perform a neural network operation by changing a value within the threshold range to 0.
  • the threshold range may be obtained based on a result of a neural network operation performed using the changed value and a result of a neural network operation performed using a value before the change.
  • the peak signal-to-noise ratio (PSNR) of the result of the neural network operation performed using the changed value is the maximum signal-to-noise ratio of the result of the neural network operation performed using the value before the change.
  • a threshold range may be set so that a certain level or more is maintained.
  • the threshold range may be determined within a maximum and minimum range according to input data, a plurality of weights, and bits of an operation result.
  • the threshold range may be determined based on input data, a plurality of weights, or the number of bits of an operation result. For example, when the number of bits of input data, a plurality of weights, or an operation result is 16 bits, the threshold range may be determined to be -16 to 16. Alternatively, when the number of bits of input data, a plurality of weights or an operation result is 8 bits, the threshold range may be determined from -4 to 4.
  • the threshold range may be different for each layer included in the artificial intelligence model.
  • the critical range of the first layer included in the AI model may be -4 to 4
  • the critical range of the second layer included in the AI model may be -8 to 8.
  • the processor 120 may perform a neural network operation by using the input data, the plurality of weights, or the calculation results as they are.
  • the processor 120 changes the value within the first threshold range to one of the plurality of first representative values, If at least one of the data, the plurality of weights, or the calculation result is within a second threshold range that is smaller than the threshold range, the neural network operation may be performed by changing a value within the second threshold range to one of the plurality of second representative values.
  • the threshold range is -4 to 4
  • the first threshold range is 10 to 127
  • the second threshold range is -10 to -128
  • each of the plurality of first representative values and the plurality of second representative values is a multiplier of 2
  • the processor 120 converts at least one of the input data, the plurality of weights, and the operation results to the plurality of first representative values and the plurality of second representative values.
  • the neural network operation can be performed by changing the representative value with the smallest size difference among the two representative values.
  • the plurality of first representative values are 16, 32, and 64
  • the plurality of second representative values are -16, -32, -64, and -128, and the processor 120 determines that the weight or the calculation result is 18 If , 18 is changed to 16, and if it is 60, then 60 is changed to 64 to perform neural network operation.
  • the processor 120 may obtain a multiplication operation result using one of a plurality of first representative values or a plurality of second representative values in a process of performing a neural network operation based on a shift operation. That is, since the plurality of first representative values or the plurality of second representative values is a multiplier of 2, the processor 120 may substitute the shift operation without performing the multiplication operation.
  • the processor 120 includes a multiplier capable of calculating the number of bits less than a threshold value determined based on the plurality of first representative values and the plurality of second representative values, wherein at least one of input data, a plurality of weights, or an operation result is a threshold value. If it does not fall within the range, the first threshold range, and the second threshold range, a multiplication result may be obtained by using a multiplier.
  • the processor 120 when at least one of input data, a plurality of weights, or an operation result is within a threshold range, the processor 120 performs a neural network operation by changing a value within the threshold range to 0, and input data, a plurality of weights or calculations If at least one of the results is within the first threshold range or the second threshold range, a shift operation is performed using the corresponding value, and at least one of the input data, a plurality of weights, or the operation result is the threshold range, the first threshold range, and the second threshold range. If it does not fall within the threshold range, an operation result may be obtained using a multiplier or an adder.
  • the processor 120 may perform the operation only when at least one of the input data, the plurality of weights, or the operation result does not fall within the threshold range, the first threshold range, and the second threshold range.
  • the processor 120 needs an 8-bit multiplier, but the multiplication operation within the first threshold range and the second threshold range is a shift operation. As it is replaced, an 8-bit multiplier is not required.
  • the processor 120 when input data, a plurality of weights, or calculation results are within 5 to 9 and -5 to -9, a multiplication operation is performed, so the processor 120 only needs a 4-bit multiplier.
  • the threshold range, the first critical range, and the second critical range may be obtained based on a result of a neural network operation performed using the changed value and a result of a neural network operation performed using the value before the change.
  • the electronic device 100 may include a memory 110 , a processor 120 , and an input unit 130 . Also, according to FIG. 2B , the electronic device 100 may further include a user interface 140 , a communication interface 150 , and a display 160 . Among the components shown in FIG. 2B , detailed descriptions of parts overlapping with those shown in FIG. 2A will be omitted.
  • the user interface 140 may be implemented as a device such as a button, a touch pad, a mouse, and a keyboard, or may be implemented as a touch screen capable of performing both a display function and a manipulation input function.
  • the button may be various types of buttons such as a mechanical button, a touch pad, a wheel, etc. formed in an arbitrary area such as the front, side, or rear of the exterior of the main body of the electronic device 100 .
  • the processor 120 may identify whether at least one of input data, a plurality of weights, or an operation result is within a threshold range. That is, the processor 120 may perform the power saving operation only when there is a user command.
  • the communication interface 150 is a configuration for performing communication with various devices.
  • the communication interface 150 may support various wired communication methods such as HDMI, MHL, USB, RGB, D-SUB, and DVI.
  • the communication interface 150 may support various wireless communication methods such as BT (BlueTooth), BLE (Bluetooth Low Energy), WI-FI (Wireless Fidelity), Zigbee, and the like.
  • BT Bluetooth
  • BLE Bluetooth Low Energy
  • WI-FI Wireless Fidelity
  • Zigbee Zigbee
  • the present invention is not limited thereto, and any communication standard capable of communicating with an external device may be used.
  • the processor 120 may receive an image source from an external device through the communication interface 150 and process the received image source.
  • the display 160 may be implemented as various types of displays, such as a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display panel (PDP), and the like.
  • the display 160 may include a driving circuit, a backlight unit, and the like, which may be implemented in the form of an a-si TFT, a low temperature poly silicon (LTPS) TFT, or an organic TFT (OTFT).
  • the display 160 may be implemented as a touch screen combined with a touch sensor, a flexible display, a three-dimensional display, or the like.
  • the processor 120 may change the frame rate of the input data on which the neural network operation is performed through the artificial intelligence model and display it through the display 160 .
  • the processor 120 may include a mapper 121 , a MAC 122 , an adder 123 , an activation function 124 , and a shifter 125 .
  • the mapper 121 may change the corresponding value to another value.
  • the MAC 122 is a configuration for performing a convolution operation, and may be accumulated after multiplying input data and a weight.
  • the processor 120 may include a plurality of MACs to improve the speed of the convolution operation through parallel operation.
  • the first adder may add outputs of a plurality of MACs.
  • the second adder may add a bias to the output of the first adder.
  • the activation function 124 is a configuration for performing operations such as Relu and Sigmoid, and may be implemented in various forms.
  • the shifter 125 changes the corresponding value to a multiplier of 2 and replaces the multiplication operation through a shift operation.
  • the above mapper 121 , MAC 122 , adder 123 , activation function 124 , and shifter 125 may be provided for each layer.
  • the processor 120 may not use the threshold range and may use only the first threshold range and the second threshold range.
  • the processor 120 may use a method of changing to a power of 2 in the entire range.
  • the threshold range and the first threshold range may be adjacent to each other, and the threshold range and the second threshold range may be adjacent to each other. In this case, the processor 120 may not perform a multiplication operation.
  • 3A and 3B illustrate a perceptron to which a mapper is added according to an embodiment of the present disclosure.
  • the first mapper 310 may identify whether a plurality of weights learned by the artificial intelligence model are within a specific range, and may change the weight values within the specific range.
  • an operation of changing a weight value will be described as a mapping operation.
  • the second mapper 320 may identify whether at least one of input data or feature map data obtained in the process of performing a neural network operation is within a specific range, and may change a value within the specific range.
  • the third mapper 330 , the fourth mapper 340 , and the fifth mapper 350 may each identify whether an operation result obtained in the process of performing a neural network operation is within a specific range, and may change an operation result value within a specific range. .
  • Each mapper can operate according to a user command. For example, according to a user command, only the first mapper 310 may perform a mapping operation, and the other mappers may not perform a mapping operation. Also, specific ranges and changed values of the first mapper 310 to the fifth mapper 350 may be different from each other.
  • only some of the plurality of first mappers 310 may perform the mapping operation, and the remaining mappers among the plurality of first mappers 310 may not perform the mapping operation.
  • specific ranges and changed values of the plurality of first mappers 310 may be different from each other.
  • FIG. 3A If the perceptron of FIG. 3A is configured as a hardware structure to which a total of m input signals and weights are input, it may be illustrated as in FIG. 3B, and a redundant description will be omitted.
  • FIG. 4 is a diagram for explaining a critical range according to an embodiment of the present disclosure.
  • the processor 120 may change the corresponding value to the mapping value_M. That is, if at least one of the input data, the plurality of weights, or the calculation result is within the section 2, the processor 120 may change the corresponding value to the mapping value_M, and if the mapping value_M is 0, the multiplication or addition operation is performed. 0 can be output as a multiplication result without
  • the processor 120 may perform a multiplication or addition operation without a mapping operation.
  • FIG. 5 is a flowchart illustrating a mapping operation including an active switch according to an embodiment of the present disclosure.
  • the processor 120 may identify whether the M_mapping active switch is activated (S510). That is, if there is a user command, the processor 120 may identify that the M_mapping activation switch is activated and compare the input with the threshold value_M1 ( S520 ).
  • the processor 120 may output the input as it is without a mapping operation (S530).
  • the processor 120 may identify whether the M_mapping activation switch is activated (S540).
  • the processor 120 may output the input as it is (S530).
  • the processor 120 may compare the input with the threshold value_M0 ( S550 ). As a result of the comparison, if the input is smaller than the threshold value_M0, the processor 120 may output the input as it is without a mapping operation ( S530 ).
  • the processor 120 may change the input to the mapping value_M and output it (S560).
  • 6 is a diagram for describing a critical range, a first critical range, and a second critical range according to an embodiment of the present disclosure. 6 is a concept including the critical range of FIG. 4 , and a redundant description thereof will be omitted.
  • the processor 120 changes the corresponding value to one of the plurality of first representative values if at least one of the input data, the plurality of weights, or the calculation result is within the threshold value_H0 and the threshold value_Hmax, and , input data, a plurality of weights, and when at least one of the calculation results is within the threshold_L0 and the threshold_Lmin, the corresponding value may be changed to one of the plurality of second representative values.
  • the first threshold range may be within threshold_H0 and threshold_Hmax
  • the second threshold range may be within threshold_L0 and threshold_Lmin.
  • the first threshold range and the second threshold range are similar concepts and will be described based on the first threshold range.
  • the plurality of first representative values may be a multiplier of 2 within the first threshold range. Also, there are a plurality of sections within the first threshold range, and a boundary between the plurality of sections may be an intermediate value of adjacent mapping values.
  • the processor 120 may change at least one of the input data, the plurality of weights, or the calculation result into a corresponding mapping value by sequentially comparing at least one of the input data, the plurality of weights, and the calculation result with the threshold values.
  • the processor 120 may perform a mapping operation and obtain a multiplication operation result through a shift operation.
  • the processor 120 performs a multiplication operation without performing a mapping operation.
  • power consumption can be reduced through the shift operation, and the number of effective bits of the multiplication operation can be reduced to reduce the size of the multiplier.
  • FIG. 7 is a flowchart illustrating a mapping operation including an active switch in a plurality of threshold ranges according to an embodiment of the present disclosure.
  • the processor 120 may perform a mapping operation based on an active switch operation and a comparison operation with a plurality of threshold ranges, and the operation of FIG. 5 is merely described in more detail, and thus overlapping A description is omitted.
  • FIG. 8 is a flowchart illustrating a method of controlling an electronic device according to an embodiment of the present disclosure.
  • a neural network operation is performed on input data based on the artificial intelligence model (S810). And, if at least one of the input data, the plurality of weights learned by the artificial intelligence model, or the operation result obtained in the process of performing the neural network operation is within the threshold range, the neural network operation is performed by changing the value within the threshold range to a preset value. do (S820).
  • the neural network operation may be performed by changing the value within the threshold range to 0.
  • the threshold range may be obtained based on a result of a neural network operation performed using the changed value and a result of a neural network operation performed using a value before the change.
  • changing and performing the neural network operation may include, when at least one of input data, a plurality of weights, or a calculation result is within a first threshold range that is larger than the threshold range, a value within the first threshold range is set to a plurality of first representatives. If at least one of the input data, the plurality of weights, or the operation result is within a second threshold range that is smaller than the threshold range, the neural network operation is performed by changing the value within the second threshold range to one of the plurality of second representative values. can be done
  • each of the plurality of first representative values and the plurality of second representative values is a multiplier of 2
  • performing a neural network operation by changing it is to convert at least one of input data, a plurality of weights, or an operation result to a plurality of second representative values.
  • a neural network operation may be performed by changing the representative value having the smallest size difference among the first representative value and the plurality of second representative values.
  • a multiplication operation result using one of a plurality of first representative values or a plurality of second representative values may be obtained in the process of performing a neural network operation based on a shift operation.
  • the multiplier may be capable of calculating the number of bits less than a threshold value determined based on the plurality of first representative values and the plurality of second representative values.
  • the critical range, the first critical range, and the second critical range may be obtained based on a result of a neural network operation performed using the changed value and a result of a neural network operation performed using a value before the change.
  • the threshold range may be different for each layer included in the artificial intelligence model.
  • the method further includes receiving a user command, and performing a neural network operation by changing it ( S820 ) is to identify whether at least one of input data, a plurality of weights, or a calculation result is within a threshold range when the user command is received.
  • the electronic device consumes power by changing input data, a plurality of weights learned by the artificial intelligence model, or some of the calculation results obtained in the process of performing a neural network operation to a preset value.
  • the electronic device may reduce power consumption by replacing some of a plurality of multiplication operations with a shift operation in the process of performing a neural network operation.
  • the size of the multiplier may be reduced, thereby reducing manufacturing cost.
  • the various embodiments described above may be implemented as software including instructions stored in a machine-readable storage medium readable by a machine (eg, a computer).
  • the device is a device capable of calling a stored instruction from a storage medium and operating according to the called instruction, and may include an electronic device (eg, electronic device A) according to the disclosed embodiments.
  • the processor When executed by the processor, the processor may perform a function corresponding to the instruction, either directly or by using other components under the control of the processor,
  • the instruction may include code generated or executed by a compiler or interpreter.
  • the readable storage medium may be provided in the form of a non-transitory storage medium, where 'non-transitory' means that the storage medium does not include a signal and is tangible. It does not distinguish between semi-permanent or temporary storage of data on a storage medium.
  • the method according to the various embodiments described above may be provided by being included in a computer program product.
  • Computer program products may be traded between sellers and buyers as commodities.
  • the computer program product may be distributed in the form of a machine-readable storage medium (eg, compact disc read only memory (CD-ROM)) or online through an application store (eg, Play StoreTM).
  • an application store eg, Play StoreTM
  • at least a portion of the computer program product may be temporarily stored or temporarily generated in a storage medium such as a memory of a server of a manufacturer, a server of an application store, or a relay server.
  • each of the components may be composed of a single or a plurality of entities, and some sub-components of the aforementioned sub-components may be omitted, or other sub-components may be omitted. Components may be further included in various embodiments. Alternatively or additionally, some components (eg, a module or a program) may be integrated into a single entity, so that functions performed by each corresponding component prior to integration may be performed identically or similarly. According to various embodiments, operations performed by a module, program, or other component may be sequentially, parallelly, repetitively or heuristically executed, or at least some operations may be executed in a different order, omitted, or other operations may be added. can

Landscapes

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

Abstract

전자 장치가 개시된다. 본 전자 장치는 입력 인터페이스, 인공 지능 모델에 대응되는 복수의 가중치가 저장된 메모리, 복수의 가중치에 기초하여 입력 인터페이스를 통해 제공된 입력 데이터에 대한 신경망 연산을 수행하는 프로세서를 포함한다. 또한, 프로세서는 입력 데이터, 복수의 가중치 또는 신경망 연산의 수행 과정에서 획득되는 연산 결과 중 적어도 하나가 임계 범위 내이면, 임계 범위 내의 원본 값을 기설정된 값으로 변경하고, 상기 기설정된 값에 기초하여 신경망 연산을 수행할 수 있다.

Description

전자 장치 및 그 제어 방법
본 개시는 전자 장치 및 그 제어 방법에 대한 것으로, 더욱 상세하게는 인공 지능 모델에 기초하여 입력 데이터에 대한 신경망 연산을 수행하는 전자 장치 및 그 제어 방법에 대한 것이다.
CROSS-REFERENCE TO RELATED APPLICATIONS
본 출원은 2020년 08월 21일에 출원된 대한민국 특허출원 제 10-2020-0105273호에 기초하여 우선권을 주장하며, 해당 출원의 모든 내용은 그 전체가 본 출원에 레퍼런스로 포함된다.
최근 디스플레이 장치는 4K (3840×2160) 해상도를 넘는 8K (7680×4320) 해상도를 지원하고 있다. 다만, 기존에 제작된 영상 소스의 해상도는 2K (1920×1080) 해상도 이하인 경우가 많다.
고해상도를 지원하는 디스플레이 장치는 저해상도의 영상 소스가 입력되면 영상 소소를 디스플레이 장치의 해상도에 대응되는 해상도로 업 스케일링할 수 있다. 예를 들어, 도 1에 도시된 바와 같이, 디스플레이 장치는 저해상도 영상 소스를 노이즈 제거(Noise Reduction), 디테일 개선(Detail Enhancement), 콘트라스트 개선(Contrast Enhancement) 등 영상 신호의 화질을 개선한 후, 디스플레이 장치의 해상도에 대응되는 해상도로 업 스케일링할 수 있다.
이후, 디스플레이 장치는 딥러닝 슈퍼레졸루션(Deep Learning Super Resolution, DLSR)을 통해 영상 화질을 개선한 후, 디스플레이 패널에 대응되도록 프레임 레이트를 변환하여 출력하게 된다.
여기서, 딥러닝 슈퍼레졸루션은 도 1b에 도시된 바와 같이, YUV 또는 RGB 영상 소스를 입력받아 요인(feature)을 추출하여 다층(multi-layer) 퍼셉트론(perceptron)으로 이루어진 심층 인공 신경망(deep neural network)의 연산을 통해 디테일 정보를 획득하고, 입력 영상(YUV 또는 RGB)에 디테일 정보를 부가하여 디테일이 개선된 입력 영상(YUV 또는 RGB)을 획득할 수 있다.
이때, 심층 인공 신경망 연산의 핵심 구조인 퍼셉트론은 다양한 회로 구성을 포함할 수 있다. 도 1c는 심층 인공 신경망 연산의 핵심 구조인 퍼셉트론의 일 예를 나타낸다. 퍼셉트론은 입력 신호와 가중치를 곱하여 누적하는 MAC(multiply and accumulate unit), MAC의 출력을 바이어스와 더하는 덧셈기 및 활성 함수(activation function)를 수행하는 구성을 포함할 수 있다. 도 1d는 총 m개의 입력 신호와 가중치가 입력되는 하드웨어 퍼셉트론을 도시한다.
이러한 퍼셉트론을 구성하는 MAC, 덧셈기 및 활성 함수를 수행하는 구성은 모두 전력을 소모하며, 영상 소스의 해상도에 따라 전력 소비는 기하급수적으로 증가할 수 있다. 따라서, 전력 소비에 따른 발열 문제 및 처리 속도의 저하 문제가 해결될 필요가 있다.
본 개시는 상술한 필요성에 따른 것으로, 본 개시의 목적은 신경망 연산 과정에서 발생하는 전력 소비를 저감하기 위한 전자 장치 및 그 제어 방법을 제공함에 있다.
이상과 같은 목적을 달성하기 위한 본 개시의 일 실시 예에 따르면, 전자 장치는 입력 인터페이스, 인공 지능 모델에 대응되는 복수의 가중치가 저장된 메모리, 상기 복수의 가중치에 기초하여 상기 입력 인터페이스를 통해 제공된 입력 데이터에 대한 신경망 연산을 수행하는 프로세서를 포함한다. 또한, 상기 프로세서는 상기 입력 데이터, 상기 복수의 가중치 또는 상기 신경망 연산의 수행 과정에서 획득되는 연산 결과 중 적어도 하나가 임계 범위 내이면, 상기 임계 범위 내의 원본 값을 기설정된 값으로 변경하고, 상기 기설정된 값에 기초하여 상기 신경망 연산을 수행할 수 있다.
상기 기설정된 값은 0일 수 있다.
상기 프로세서는 상기 기설정된 값을 이용하여 수행된 상기 신경망 연산의 결과 및 상기 원본 값을 이용하여 수행된 상기 신경망 연산의 결과에 기초하여 상기 임계 범위를 획득할 수 있다.
상기 임계 범위는 -a 부터 a 사이의 범위이며, a는 상기 입력 데이터, 상기 복수의 가중치 또는 상기 신경망 연산의 수행 과정에서 획득되는 연산 결과 중 적어도 하나의 최대값보다 작은 양수일 수 있다.
상기 프로세서는 상기 입력 데이터, 상기 복수의 가중치 또는 상기 연산 결과 중 적어도 하나가 상기 임계 범위보다 큰 제1 임계 범위 내이면, 상기 제1 임계 범위 내의 상기 원본 값을 복수의 제1 대표 값 중 하나로 변경하고, 상기 복수의 제1 대표 값 중 하나에 대응되는 변경된 값에 기초하여 상기 신경망 연산을 수행하며, 상기 입력 데이터, 상기 복수의 가중치 또는 상기 연산 결과 중 적어도 하나가 상기 임계 범위보다 작은 제2 임계 범위 내이면, 상기 제2 임계 범위 내의 상기 원본 값을 복수의 제2 대표 값 중 하나로 변경하고, 상기 복수의 제1 대표 값 중 하나에 대응되는 변경된 값에 기초하여 상기 신경망 연산을 수행할 수 있다.
상기 복수의 제1 대표 값 및 상기 복수의 제2 대표 값 각각은, 2의 승수이고, 상기 프로세서는 상기 입력 데이터, 상기 복수의 가중치 또는 상기 연산 결과 중 적어도 하나를 상기 복수의 제1 대표 값 및 상기 복수의 제2 대표 값 중 크기 차이가 가장 작은 대표 값으로 변경하고, 상기 대표 값에 기초하여 상기 신경망 연산을 수행할 수 있다.
상기 프로세서는 시프트 연산에 기초하여 상기 신경망 연산의 수행 과정에서 상기 복수의 제1 대표 값 또는 상기 복수의 제2 대표 값 중 하나를 이용한 곱셈 연산 결과를 획득할 수 있다.
상기 프로세서는 상기 복수의 제1 대표 값 및 상기 복수의 제2 대표 값에 기초하여 결정된 임계 수치 미만의 비트 수를 획득하며, 상기 입력 데이터, 상기 복수의 가중치 또는 상기 연산 결과 중 적어도 하나가 상기 임계 범위, 상기 제1 임계 범위 및 상기 제2 임계 범위 내에 속하지 않으면, 상기 비트 수를 획득할 수 있다.
상기 프로세서는 상기 변경된 값을 이용하여 수행된 상기 신경망 연산의 결과 및 상기 기설정된 값을 이용하여 수행된 상기 신경망 연산의 결과에 기초하여 상기 임계 범위, 상기 제1 임계 범위 및 상기 제2 임계 범위를 획득할 수 있다.
상기 임계 범위는 -a 부터 a 사이의 범위이며, a는, 양수이고, 상기 제1 임계 범위는 b 부터 c 사이의 범위이며, 상기 제2 임계 범위는 -c 부터 -b 사이의 범위이며, b는, a보다 크고 c보다 작은 양수이고, c는 상기 입력 데이터, 상기 복수의 가중치 또는 상기 신경망 연산의 수행 과정에서 획득되는 연산 결과 중 적어도 하나의 최대값보다 작은 양수일 수 있다.
상기 임계 범위는 상기 인공 지능 모델의 레이어 별로 상이할 수 있다.
상기 전자 장치는 사용자 인터페이스를 더 포함하며, 상기 프로세서는 상기 사용자 인터페이스를 통해 사용자 명령이 수신되면, 상기 입력 데이터, 상기 복수의 가중치 또는 상기 연산 결과 중 적어도 하나가 임계 범위 내인지 식별할 수 있다.
한편, 본 개시의 일 실시 예에 따르면, 신경망(Neural Network) 연산을 수행하는 전자 장치의 제어 방법은 인공 지능 모델에 의해 학습된 복수의 가중치에 기초하여 입력 데이터에 대한 신경망 연산을 수행하는 단계, 상기 입력 데이터, 상기 복수의 가중치 또는 상기 신경망 연산의 수행 과정에서 획득되는 연산 결과 중 적어도 하나가 임계 범위 내인지 식별하고, 상기 임계 범위 내의 원본 값을 기설정된 값으로 변경하는 단계 및 상기 기설정된 값에 기초하여 상기 신경망 연산을 수행하는 단계를 포함한다.
상기 기설정된 값은 0일 수 있다.
상기 제어 방법은 상기 기설정된 값을 이용하여 수행된 상기 신경망 연산의 결과 및 상기 원본 값을 이용하여 수행된 상기 신경망 연산의 결과에 기초하여 상기 임계 범위를 획득하는 단계를 더 포함할 수 있다.
본 개시 내용의 특정 실시 예의 상기 및 다른 측면, 특징 및 이점은 첨부 도면과 함께 취해진 다음 설명으로부터 더 명백해질 것이다.
도 1a는 전자 장치의 블록도이다.
도 1b는 DLSR의 블록도이다.
도 1c는 퍼셉트론을 도시한다.
도 1d는 하드웨어 퍼셉트론의 블록도이다.
도 2a는 본 개시의 일 실시 예에 따른 전자 장치의 구성을 나타내는 블럭도이다.
도 2b는 전자 장치의 세부 구성의 일 예를 나타내는 블럭도이다.
도 3a 및 도 3b는 본 개시의 일 실시 예에 따른 맵퍼가 부가된 퍼셉트론을 나타낸다.
도 4는 본 개시의 일 실시 예에 따른 임계 범위를 설명하기 위한 도면이다.
도 5는 본 개시의 일 실시 예에 따른 활성 스위치를 포함한 맵핑 동작을 설명하기 위한 흐름도이다.
도 6은 본 개시의 일 실시 예에 따른 임계 범위, 제1 임계 범위 및 제2 임계 범위를 설명하기 위한 도면이다.
도 7은 본 개시의 일 실시 예에 따른 복수의 임계 범위에서 활성 스위치를 포함한 맵핑 동작을 설명하기 위한 흐름도이다.
도 8은 본 개시의 일 실시 예에 따른 전자 장치의 제어 방법을 설명하기 위한 흐름도이다.
-
이하에서는 첨부 도면을 참조하여 본 개시를 설명한다.
본 개시의 실시 예에서 사용되는 용어는 본 개시에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 개시의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 개시에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 개시의 전반에 걸친 내용을 토대로 정의되어야 한다.
본 명세서에서, "가진다," "가질 수 있다," "포함한다," 또는 "포함할 수 있다" 등의 표현은 해당 특징(예: 수치, 기능, 동작, 또는 부품 등의 구성요소)의 존재를 가리키며, 추가적인 특징의 존재를 배제하지 않는다.
"적어도 하나"와 같은 표현식은 요소 목록 앞에 올 때 전체 요소 목록을 수정하고 목록의 개별 요소를 수정하지 않습니다. 예를 들어, "a, b 및 c 중 적어도 하나"라는 표현은 a 만, b 만, c 만, a와 b 모두, a와 c 모두, b와 c 모두 또는 a, b 및 c의 모두를 포함하는 것으로 이해해야 한다.
"제1," "제2," "첫째," 또는 "둘째,"등의 표현들은 순서 또는 중요도에 상관없이 사용될 수 있고, 구성 요소에 제한 없이 구성요소를 구분하기 위해 사용될 뿐이다.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "구성되다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.
본 명세서에서, 사용자라는 용어는 전자 장치를 사용하는 사람 또는 전자 장치를 사용하는 장치(예: 인공 지능 전자 장치)를 지칭할 수 있다.
이하 첨부된 도면들을 참조하여 본 개시의 다양한 실시 예를 보다 상세하게 설명한다.
도 2a는 본 개시의 일 실시 예에 따른 전자 장치(100)의 구성을 나타내는 블럭도이다.
전자 장치(100)는 신경망 연산을 수행하는 장치로서, TV, 데스크탑 PC, 노트북, 스마트폰, 태블릿 PC, 모니터, 스마트 안경, 스마트 워치, 셋탑박스(STB), 스피커, 컴퓨터 본체, 비디오 월(video wall), LFD(large format display), Digital Signage(디지털 간판), DID(Digital Information Display), 프로젝터 디스플레이, DVD(digital video disk) 플레이어 등과 같은 장치일 수 있다. 다만, 이에 한정되는 것은 아니며, 전자 장치(100)는 신경망 연산을 수행할 수 있는 장치라면 어떠한 장치라도 무방하다.
도 2a에 따르면, 전자 장치(100)는 메모리(110), 프로세서(120) 및 입력부(130)를 포함한다. 다만, 이에 한정되는 것은 아니며, 전자 장치(100)는 일부 구성이 제외된 형태로 구현될 수도 있고, 다른 구성을 더 포함할 수도 있다.
메모리(110)는 프로세서(120) 등이 접근할 수 있도록 데이터 등의 정보를 전기 또는 자기 형태로 저장하는 하드웨어를 지칭할 수 있다. 이를 위해, 메모리(110)는 비휘발성 메모리, 휘발성 메모리, 플래시메모리(Flash Memory), 하드디스크 드라이브(HDD) 또는 솔리드 스테이트 드라이브(SSD), RAM, ROM 등 중에서 적어도 하나의 하드웨어로 구현될 수 있다.
메모리(110)에는 인공 지능 모델에 의해 학습된 가중치가 저장될 수 있다. 여기서, 인공 지능 모델은 CNN(Convolutional Neural Network), DNN(Deep Neural Network), RNN(Recurrent Neural Network), RBM(Restricted Boltzmann Machine), DBN(Deep Belief Network), BRDNN(Bidirectional Recurrent Deep Neural Network) 및 심층 Q-네트워크(Deep Q-Networks) 등일 수 있으며, 본 개시에서는 이상의 언급한 신경망 뿐만 아니라 얼마든지 다양한 형태의 인공 지능 모델에 의해 학습된 가중치가 메모리(110)에 저장될 수 있다.
인공 지능 모델은 다양한 학습 알고리즘을 통해 전자 장치(100) 또는 별도의 서버/시스템을 통해 학습된 것일 수 있다. 학습 알고리즘은 다수의 학습 데이터들을 이용하여 소정의 대상 기기(예컨대, 로봇)를 훈련시켜 소정의 대상 기기 스스로 결정을 내리거나 예측을 할 수 있도록 하는 방법이다. 학습 알고리즘의 예로는, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)이 있으며, 얼마든지 다양한 학습 알고리즘이 이용될 수 있다.
메모리(110)에는 임계 범위에 대한 정보 및 임계 범위 내의 값이 변환될 기설정된 값에 대한 정보가 저장될 수 있다. 또한, 메모리(110)에는 복수의 임계 범위에 대한 정보 및 각 임계 범위 내의 값이 변환될 값에 대한 정보가 저장될 수도 있다. 이러한 임계 범위에 대한 정보는 인공 지능 모델에 포함된 레이어 별로 상이할 수 있다.
메모리(110)는 프로세서(120)에 의해 액세스되며, 프로세서(120)에 의해 인스트럭션, 모듈, 인공 지능 모델 또는 데이터에 대한 독취/기록/수정/삭제/갱신 등이 수행될 수 있다.
입력부(130)는 입력 데이터를 수신하기 위한 어떠한 구성이라도 무방하다. 예를 들어, 입력부(130)는 유무선 통신을 통해 입력 데이터를 수신하는 구성일 수 있다. 또는, 입력부(130)는 카메라와 같이 이미지를 촬영하는 구성으로서, 이미지가 입력 데이터일 수 있다.
프로세서(120)는 전자 장치(100)의 동작을 전반적으로 제어한다. 구체적으로, 프로세서(120)는 전자 장치(100)의 각 구성과 연결되어 전자 장치(100)의 동작을 전반적으로 제어할 수 있다. 예를 들어, 프로세서(120)는 디스플레이 등과 같은 구성과 연결되어 전자 장치(100)의 동작을 제어할 수 있다.
일 실시 예에 따라 프로세서(120)는 디지털 시그널 프로세서(digital signal processor(DSP), 마이크로 프로세서(microprocessor), TCON(Time controller)으로 구현될 수 있다. 다만, 이에 한정되는 것은 아니며, 중앙처리장치(central processing unit(CPU)), MCU(Micro Controller Unit), MPU(micro processing unit), 컨트롤러(controller), 어플리케이션 프로세서(application processor(AP)), 또는 커뮤니케이션 프로세서(communication processor(CP)), ARM 프로세서 중 하나 또는 그 이상을 포함하거나, 해당 용어로 정의될 수 있다. 또한, 프로세서(120)는 프로세싱 알고리즘이 내장된 SoC(System on Chip), LSI(large scale integration)로 구현될 수도 있고, FPGA(Field Programmable gate array) 형태로 구현될 수도 있다.
프로세서(120)는 인공 지능 모델에 기초하여 입력부(130)를 통해 입력된 입력 데이터에 대한 신경망 연산을 수행할 수 있다. 특히, 프로세서(120)는 입력 데이터, 인공 지능 모델에 의해 학습된 복수의 가중치 또는 신경망 연산의 수행 과정에서 획득되는 연산 결과 중 적어도 하나가 임계 범위 내이면, 임계 범위 내의 값을 기설정된 값으로 변경하여 신경망 연산을 수행할 수 있다.
예를 들어, 프로세서(120)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 임계 범위 내이면, 임계 범위 내의 값을 0으로 변경하여 신경망 연산을 수행할 수 있다.
여기서, 임계 범위는 변경된 값을 이용하여 수행된 신경망 연산의 결과 및 변경 전의 값을 이용하여 수행된 신경망 연산의 결과에 기초하여 획득될 수 있다. 예를 들어, 변경된 값을 이용하여 수행된 신경망 연산의 결과의 최대 신호 대 잡음비(Peak Signal-to-noise ratio, PSNR)가 변경 전의 값을 이용하여 수행된 신경망 연산의 결과의 최대 신호 대 잡음비의 일정 수준 이상이 유지되도록 임계 범위가 설정될 수 있다.
또한, 임계 범위는 입력 데이터, 복수의 가중치, 연산 결과의 비트에 따른 최대 최소 범위 내에서 결정될 수도 있다. 또한, 임계 범위는 입력 데이터, 복수의 가중치 또는 연산 결과의 비트 수에 기초하여 결정될 수도 있다. 예를 들어, 입력 데이터, 복수의 가중치 또는 연산 결과의 비트 수가 16비트인 경우, 임계 범위는 -16 부터 16로 결정될 수 있다. 또는, 입력 데이터, 복수의 가중치 또는 연산 결과의 비트 수가 8비트인 경우, 임계 범위는 -4 부터 4로 결정될 수도 있다.
그리고, 임계 범위는 인공 지능 모델에 포함된 레이어 별로 상이할 수 있다. 예를 들어, 인공 지능 모델에 포함된 제1 레이어의 임계 범위는 -4 부터 4이고, 인공 지능 모델에 포함된 제2 레이어의 임계 범위는 -8에서 8일 수도 있다.
프로세서(120)는 입력 데이터, 복수의 가중치 또는 연산 결과가 임계 범위 내에 속하지 않으면, 입력 데이터, 복수의 가중치 또는 연산 결과를 그대로 이용하여 신경망 연산을 수행할 수 있다.
이상과 같이, 임계 범위 내의 값이 0으로 변경되는 경우, 곱셈 연산 또는 덧셈 연산을 수행할 필요가 없이 0이 출력되며, 그에 따라 전력 소비를 절감할 수 있다.
추가적으로, 프로세서(120)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 임계 범위보다 큰 제1 임계 범위 내이면, 제1 임계 범위 내의 값을 복수의 제1 대표 값 중 하나로 변경하고, 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 임계 범위보다 작은 제2 임계 범위 내이면, 제2 임계 범위 내의 값을 복수의 제2 대표 값 중 하나로 변경하여 신경망 연산을 수행할 수도 있다.
예를 들어, 입력 데이터, 복수의 가중치 또는 연산 결과의 비트 수가 8비트인 경우, 임계 범위는 -4 부터 4이고, 제1 임계 범위는 10 부터 127이며, 제2 임계 범위는 -10부터 -128일 수 있다.
여기서, 복수의 제1 대표 값 및 복수의 제2 대표 값 각각은 2의 승수이고, 프로세서(120)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나를 복수의 제1 대표 값 및 복수의 제2 대표 값 중 크기 차이가 가장 작은 대표 값으로 변경하여 신경망 연산을 수행할 수 있다.
상술한 예에서, 복수의 제1 대표 값은 16, 32, 64이고, 복수의 제2 대표 값은 -16, -32, -64, -128이며, 프로세서(120)는 가중치 또는 연산 결과가 18이면 18을 16으로 변경하고, 60이면 60을 64로 변경하여 신경망 연산을 수행할 수 있다.
이 경우, 프로세서(120)는 시프트 연산에 기초하여 신경망 연산의 수행 과정에서 복수의 제1 대표 값 또는 복수의 제2 대표 값 중 하나를 이용한 곱셈 연산 결과를 획득할 수 있다. 즉, 복수의 제1 대표 값 또는 복수의 제2 대표 값이 2의 승수이므로, 프로세서(120)는 곱셈 연산을 수행하지 않고 시프트 연산으로 대체할 수 있다.
프로세서(120)는 복수의 제1 대표 값 및 복수의 제2 대표 값에 기초하여 결정된 임계 수치 미만의 비트 수 연산이 가능한 곱셈기를 포함하며, 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 임계 범위, 제1 임계 범위 및 제2 임계 범위 내에 속하지 않으면, 곱셈기를 이용하여 곱셈 연산 결과를 획득할 수 있다.
상술한 예에서, 프로세서(120)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 임계 범위 내이면 임계 범위 내의 값을 0으로 변경하여 신경망 연산을 수행하고, 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 제1 임계 범위 또는 제2 임계 범위 내이면 해당 값을 이용한 시프트 연산을 수행하게 되며, 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 임계 범위, 제1 임계 범위 및 제2 임계 범위 내에 속하지 않으면, 곱셈기 또는 덧셈기를 이용하여 연산 결과를 획득할 수 있다.
즉, 프로세서(120)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 임계 범위, 제1 임계 범위 및 제2 임계 범위 내에 속하지 않는 경우에만 연산을 수행할 수 있다. 또한, 상술한 예와 같이 입력 데이터, 복수의 가중치 또는 연산 결과의 비트 수가 8비트이면 프로세서(120)는 8비트 곱셈기가 필요하나, 제1 임계 범위 및 제2 임계 범위 내의 곱셈 연산이 시프트 연산으로 대체됨에 따라 8비트 곱셈기가 필요하지 않다. 상술한 예의 경우, 입력 데이터, 복수의 가중치 또는 연산 결과가 5부터 9 및 -5부터 -9 내인 경우, 곱셈 연산이 수행되므로, 프로세서(120)는 4비트 곱셈기가 필요할 뿐이다.
임계 범위, 제1 임계 범위 및 제2 임계 범위는 변경된 값을 이용하여 수행된 신경망 연산의 결과 및 변경 전의 값을 이용하여 수행된 신경망 연산의 결과에 기초하여 획득될 수 있다.
이상과 같이, 일부 곱셈 연산이 시프트 연산으로 대체됨에 따라 전력 소모를 절감할 수 있다. 또한, 곱셈기의 크기를 줄일 수도 있어 하드웨어 제조 비용도 절감할 수 있다.
도 2b는 전자 장치(100)의 세부 구성의 일 예를 나타내는 블럭도이다. 전자 장치(100)는 메모리(110), 프로세서(120) 및 입력부(130)를 포함할 수 있다. 또한, 도 2b에 따르면, 전자 장치(100)는 사용자 인터페이스(140), 통신 인터페이스(150), 디스플레이(160)를 더 포함할 수도 있다. 도 2b에 도시된 구성요소들 중 도 2a에 도시된 구성요소와 중복되는 부분에 대해서는 자세한 설명을 생략하도록 한다.
사용자 인터페이스(140)는 버튼, 터치 패드, 마우스 및 키보드와 같은 장치로 구현되거나, 디스플레이 기능 및 조작 입력 기능도 함께 수행 가능한 터치 스크린으로도 구현될 수 있다. 여기서, 버튼은 전자 장치(100)의 본체 외관의 전면부나 측면부, 배면부 등의 임의의 영역에 형성된 기계적 버튼, 터치 패드, 휠 등과 같은 다양한 유형의 버튼이 될 수 있다.
프로세서(120)는 사용자 인터페이스(140)를 통해 사용자 명령이 수신되면, 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 임계 범위 내인지 식별할 수 있다. 즉, 프로세서(120)는 사용자 명령이 있는 경우에만 전력 절감 동작을 수행할 수도 있다.
통신 인터페이스(150)는 다양한 장치와 통신을 수행하기 위한 구성이다. 예를 들어, 통신 인터페이스(150)는 HDMI, MHL, USB, RGB, D-SUB, DVI 등과 같이 다양한 유선 통신 방식을 지원할 수 있다. 또한, 통신 인터페이스(150)는 BT(BlueTooth), BLE(Bluetooth Low Energy), WI-FI(Wireless Fidelity), Zigbee 등과 같이 다양한 무선 통신 방식을 지원할 수도 있다. 다만, 이에 한정되는 것은 아니며, 외부 장치와의 통신이 가능한 통신 규격이라면 어떤 것이라도 무방하다.
프로세서(120)는 통신 인터페이스(150)를 통해 외부 장치로부터 영상 소스를 수신하고, 수신된 영상 소스를 영상 처리할 수 있다.
디스플레이(160)는 LCD(Liquid Crystal Display), OLED(Organic Light Emitting Diodes) 디스플레이, PDP(Plasma Display Panel) 등과 같은 다양한 형태의 디스플레이로 구현될 수 있다. 디스플레이(160) 내에는 a-si TFT, LTPS(low temperature poly silicon) TFT, OTFT(organic TFT) 등과 같은 형태로 구현될 수 있는 구동 회로, 백라이트 유닛 등도 함께 포함될 수 있다. 한편, 디스플레이(160)는 터치 센서와 결합된 터치 스크린, 플렉시블 디스플레이(flexible display), 3차원 디스플레이(3D display) 등으로 구현될 수 있다.
프로세서(120)는 인공 지능 모델을 통해 신경망 연산이 수행된 입력 데이터의 프레임 레이트를 변경하여 디스플레이(160)를 통해 디스플레이할 수 있다.
한편, 프로세서(120)는 맵퍼(Mapper, 121), MAC(122), 덧셈기(123), 활성 함수(124), 시프터(125)를 포함할 수 있다.
맵퍼(121)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 특정 범위 내인 경우, 해당 값을 다른 값으로 변경할 수 있다.
MAC(122)는 컨볼루션 연산을 수행하기 위한 구성으로, 입력 데이터 및 가중치를 곱셈 연산한 후 누적할 수 있다. 프로세서(120)는 복수의 MAC를 포함하여 병렬 연산을 통해 컨볼루션 연산 속도를 향상시킬 수 있다.
덧셈기(123)는 복수일 수 있으며, 제1 덧셈기는 복수의 MAC의 출력을 더할 수 있다. 제2 덧셈기는 제1 덧셈기의 출력과 바이어스를 더할 수 있다.
활성 함수(124)는 Relu, Sigmoid와 같은 연산을 수행하기 위한 구성으로, 얼마든지 다양한 형태로 구현될 수 있다.
시프터(125)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 제1 임계 범위 또는 제2 임계 범위 내인 경우, 해당 값을 2의 승수로 변경하고, 시프트 연산을 통해 곱셈 연산을 대체하기 위한 구성이다.
이상의 맵퍼(121), MAC(122), 덧셈기(123), 활성 함수(124), 시프터(125)는 레이어 별로 구비될 수 있다.
한편, 이상에서는 임계 범위를 이용하는 경우와 임계 범위, 제1 임계 범위 및 제2 임계 범위를 이용하는 경우를 설명하였으나, 이에 한정되는 것은 아니다. 예를 들어, 프로세서(120)는 임계 범위를 이용하지 않고, 제1 임계 범위 및 제2 임계 범위만을 이용할 수도 있다. 또한, 프로세서(120)는 전체 범위에서 2의 승수로 변경하는 방법을 이용할 수도 있다. 또한, 프로세서(120)는 임계 범위와 제1 임계 범위가 인접하고, 임계 범위와 제2 임계 범위가 인접할 수도 있다. 이 경우, 프로세서(120)는 곱셈 연산을 수행하지 않을 수도 있다.
이하에서는 다양한 도면을 통해 프로세서(120)의 동작을 좀더 구체적으로 설명한다. 이하의 도면에서 각각의 실시 예는 개별적으로 구현될 수도 있고, 조합된 형태로 구현될 수도 있다.
도 3a 및 도 3b는 본 개시의 일 실시 예에 따른 맵퍼가 부가된 퍼셉트론을 나타낸다.
도 3a에 도시된 바와 같이, 제1 맵퍼(310)는 인공 지능 모델에 의해 학습된 복수의 가중치가 특정 범위 내인지 식별하고, 특정 범위 내의 가중치 값을 변경할 수 있다. 이하에서는 가중치 값의 변경 동작을 맵핑 동작이라고 설명한다.
제2 맵퍼(320)는 입력 데이터 또는 신경망 연산의 수행 과정에서 획득되는 피쳐 맵 데이터 중 적어도 하나가 특정 범위 내인지 식별하고, 특정 범위 내의 값을 변경할 수 있다.
제3 맵퍼(330), 제4 맵퍼(340) 및 제5 맵퍼(350)는 각각 신경망 연산의 수행 과정에서 획득되는 연산 결과가 특정 범위 내인지 식별하고, 특정 범위 내의 연산 결과 값을 변경할 수 있다.
각 맵퍼는 사용자 명령에 따라 동작할 수 있다. 예를 들어, 사용자 명령에 따라, 제1 맵퍼(310)만이 맵핑 동작을 수행하고, 나머지 맵퍼는 맵핑 동작을 수행하지 않을 수 있다. 또한, 제1 맵퍼(310) 내지 제5 맵퍼(350)의 특정 범위 및 변경되는 값은 서로 상이할 수 있다.
또한, 경우에 따라서 복수의 제1 맵퍼(310) 중 일부만이 맵핑 동작을 수행하고, 복수의 제1 맵퍼(310) 중 나머지 맵퍼는 맵핑 동작을 수행하지 않을 수도 있다. 그리고, 복수의 제1 맵퍼(310)의 특정 범위 및 변경되는 값은 서로 상이할 수 있다.
도 3a의 퍼셉트론을 총 m개의 입력 신호와 가중치가 입력되는 하드웨어 구조로 구성하면 도 3b와 같이 도시할 수도 있으며, 중복되는 설명은 생략한다.
도 4는 본 개시의 일 실시 예에 따른 임계 범위를 설명하기 위한 도면이다.
도 4에 도시된 바와 같이, 프로세서(120)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 문턱값_M0 및 문턱값_M1 내이면, 해당 값을 맵핑값_M으로 변경할 수 있다. 즉, 프로세서(120)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 ② 구간 내이면, 해당 값을 맵핑값_M으로 변경할 수 있으며, 맵핑값_M이 0이라면 곱셈 또는 덧셈 연산을 수행하지 않고 0을 곱셈 결과로서 출력할 수 있다.
프로세서(120)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 ① 또는 ③ 구간 내이면, 맵핑 동작 없이 곱셈 또는 덧셈 연산을 수행할 수 있다.
이상과 같은 동작을 통해 ② 구간 내의 연산을 최소화하여 전력 소모를 절감할 수 있다.
도 5는 본 개시의 일 실시 예에 따른 활성 스위치를 포함한 맵핑 동작을 설명하기 위한 흐름도이다.
프로세서(120)는 M_맵핑 활성 스위치의 활성 여부를 식별할 수 있다(S510). 즉, 프로세서(120)는 사용자 명령이 있으면, M_맵핑 활성 스위치가 활성화된 것으로 식별하고, 입력과 문턱값_M1을 비교할 수 있다(S520).
프로세서(120)는 비교 결과, 입력이 문턱값_M1보다 크면 맵핑 동작 없이 입력을 그대로 출력할 수 있다(S530).
또는, 프로세서(120)는 M_맵핑 활성 스위치가 활성화되지 않았거나, 비교 결과 입력이 문턱값_M1보다 작으면, M_맵핑 활성 스위치의 활성 여부를 식별할 수 있다(S540).
프로세서(120)는 M_맵핑 활성 스위치가 활성화되지 않았으면, 입력을 그대로 출력할 수 있다(S530).
또는, 프로세서(120)는 M_맵핑 활성 스위치가 활성화된 것으로 식별되면, 입력과 문턱값_M0을 비교할 수 있다(S550). 프로세서(120)는 비교 결과, 입력이 문턱값_M0보다 작으면 맵핑 동작 없이 입력을 그대로 출력할 수 있다(S530).
또는, 프로세서(120)는 비교 결과 입력이 문턱값_M1보다 크면, 입력을 맵핑값_M으로 변경하여 출력할 수 있다(S560).
도 6은 본 개시의 일 실시 예에 따른 임계 범위, 제1 임계 범위 및 제2 임계 범위를 설명하기 위한 도면이다. 도 6은 도 4의 임계 범위를 포함하는 개념으로, 중복되는 설명은 생략한다.
도 6에 도시된 바와 같이, 프로세서(120)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 문턱값_H0 및 문턱값_Hmax 내이면 해당 값을 복수의 제1 대표 값 중 하나로 변경하고, 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 문턱값_L0 및 문턱값_Lmin 내이면 해당 값을 복수의 제2 대표 값 중 하나로 변경할 수 있다.
즉, 제1 임계 범위는 문턱값_H0 및 문턱값_Hmax 내이고, 제2 임계 범위는 문턱값_L0 및 문턱값_Lmin 내일 수 있다. 제1 임계 범위와 제2 임계 범위는 유사한 개념으로 제1 임계 범위를 기준으로 설명한다.
복수의 제1 대표 값(맵핑값_H0 내지 맵핑값_Hmax)은 제1 임계 범위 내의 2의 승수일 수 있다. 또한, 제1 임계 범위 내에는 복수의 구간이 있으며, 복수의 구간의 경계는 인접한 맵핑값의 중간 값일 수 있다.
프로세서(120)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나를 문턱값들과 순차적으로 비교함으로써 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나를 대응되는 맵핑값으로 변경할 수 있다.
프로세서(120)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 제1 임계 범위 또는 제2 임계 범위 내이면, 맵핑 동작을 수행하고 시프트 연산을 통해 곱셈 연산 결과를 획득할 수 있다.
한편, 프로세서(120)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 임계 범위, 제1 임계 범위 및 제2 임계 범위 내에 속하지 않으면, 맵핑 동작을 수행하지 않고 곱셈 연산을 수행하게 된다.
이상과 같이 시프트 연산을 통해 전력 소모의 절감이 가능하고, 곱셈 연산의 유효 비트를 줄여 곱셈기의 소형화가 가능하다.
도 7은 본 개시의 일 실시 예에 따른 복수의 임계 범위에서 활성 스위치를 포함한 맵핑 동작을 설명하기 위한 흐름도이다.
도 7에 도시된 바와 같이, 프로세서(120)는 활성 스위치 동작 및 복수의 임계 범위와의 비교 동작에 기초하여 맵핑 동작을 수행할 수 있으며, 도 5의 동작을 좀더 구체적으로 기재한 것에 불과하여 중복되는 설명을 생략한다.
도 8은 본 개시의 일 실시 예에 따른 전자 장치의 제어 방법을 설명하기 위한 흐름도이다.
먼저, 인공 지능 모델에 기초하여 입력 데이터에 대한 신경망 연산을 수행한다(S810). 그리고, 입력 데이터, 인공 지능 모델에 의해 학습된 복수의 가중치 또는 신경망 연산의 수행 과정에서 획득되는 연산 결과 중 적어도 하나가 임계 범위 내이면, 임계 범위 내의 값을 기설정된 값으로 변경하여 신경망 연산을 수행한다(S820).
그리고, 변경하여 신경망 연산을 수행하는 단계(S820)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 임계 범위 내이면, 임계 범위 내의 값을 0으로 변경하여 신경망 연산을 수행할 수 있다.
여기서, 임계 범위는 변경된 값을 이용하여 수행된 신경망 연산의 결과 및 변경 전의 값을 이용하여 수행된 신경망 연산의 결과에 기초하여 획득될 수 있다.
또는, 변경하여 신경망 연산을 수행하는 단계(S820)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 임계 범위보다 큰 제1 임계 범위 내이면, 제1 임계 범위 내의 값을 복수의 제1 대표 값 중 하나로 변경하고, 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 임계 범위보다 작은 제2 임계 범위 내이면, 제2 임계 범위 내의 값을 복수의 제2 대표 값 중 하나로 변경하여 신경망 연산을 수행할 수 있다.
여기서, 복수의 제1 대표 값 및 복수의 제2 대표 값 각각은 2의 승수이고, 변경하여 신경망 연산을 수행하는 단계(S820)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나를 복수의 제1 대표 값 및 복수의 제2 대표 값 중 크기 차이가 가장 작은 대표 값으로 변경하여 신경망 연산을 수행할 수 있다.
그리고, 변경하여 신경망 연산을 수행하는 단계(S820)는 시프트 연산에 기초하여 신경망 연산의 수행 과정에서 복수의 제1 대표 값 또는 복수의 제2 대표 값 중 하나를 이용한 곱셈 연산 결과를 획득할 수 있다.
한편, 입력 데이터에 대한 신경망 연산을 수행하는 단계(S810)는 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 임계 범위, 제1 임계 범위 및 제2 임계 범위 내에 속하지 않으면, 곱셈기를 이용하여 곱셈 연산 결과를 획득하며, 곱셈기는 복수의 제1 대표 값 및 복수의 제2 대표 값에 기초하여 결정된 임계 수치 미만의 비트 수 연산이 가능할 수 있다.
여기서, 임계 범위, 제1 임계 범위 및 제2 임계 범위는 변경된 값을 이용하여 수행된 신경망 연산의 결과 및 변경 전의 값을 이용하여 수행된 신경망 연산의 결과에 기초하여 획득될 수 있다.
그리고, 임계 범위는 인공 지능 모델에 포함된 레이어 별로 상이할 수 있다.
한편, 사용자 명령을 수신하는 단계를 더 포함하며, 변경하여 신경망 연산을 수행하는 단계(S820)는 사용자 명령이 수신되면, 입력 데이터, 복수의 가중치 또는 연산 결과 중 적어도 하나가 임계 범위 내인지 식별할 수 있다.
이상과 같은 본 개시의 다양한 실시 예에 따르면, 전자 장치는 입력 데이터, 인공 지능 모델에 의해 학습된 복수의 가중치 또는 신경망 연산의 수행 과정에서 획득되는 연산 결과 중 일부를 기설정된 값으로 변경하여 전력 소비를 절감할 수 있다.
그리고, 전자 장치는 신경망 연산의 수행 과정에서 복수의 곱셈 연산 중 일부를 시프트 연산으로 대체하여 전력 소비를 절감할 수 있다.
또한, 복수의 곱셈 연산 중 일부가 시프트 연산으로 대체됨에 따라 곱셈기의 크기를 줄일 수 있어 제조 비용이 감소될 수 있다.
한편, 본 개시의 일시 예에 따르면, 이상에서 설명된 다양한 실시 예들은 기기(machine)(예: 컴퓨터)로 읽을 수 있는 저장 매체(machine-readable storage media에 저장된 명령어를 포함하는 소프트웨어로 구현될 수 있다. 기기는, 저장 매체로부터 저장된 명령어를 호출하고, 호출된 명령어에 따라 동작이 가능한 장치로서, 개시된 실시 예들에 따른 전자 장치(예: 전자 장치(A))를 포함할 수 있다. 명령이 프로세서에 의해 실행될 경우, 프로세서가 직접, 또는 프로세서의 제어 하에 다른 구성요소들을 이용하여 명령에 해당하는 기능을 수행할 수 있다. 명령은 컴파일러 또는 인터프리터에 의해 생성 또는 실행되는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장매체는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, '비일시적'은 저장매체가 신호(signal)를 포함하지 않으며 실재(tangible)한다는 것을 의미할 뿐 데이터가 저장매체에 반영구적 또는 임시적으로 저장됨을 구분하지 않는다.
또한, 본 개시의 일 실시 예에 따르면, 이상에서 설명된 다양한 실시 예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory (CD-ROM))의 형태로, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 온라인으로 배포될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.
또한, 상술한 다양한 실시 예들에 따른 구성 요소(예: 모듈 또는 프로그램) 각각은 단수 또는 복수의 개체로 구성될 수 있으며, 전술한 해당 서브 구성 요소들 중 일부 서브 구성 요소가 생략되거나, 또는 다른 서브 구성 요소가 다양한 실시 예에 더 포함될 수 있다. 대체적으로 또는 추가적으로, 일부 구성 요소들(예: 모듈 또는 프로그램)은 하나의 개체로 통합되어, 통합되기 이전의 각각의 해당 구성 요소에 의해 수행되는 기능을 동일 또는 유사하게 수행할 수 있다. 다양한 실시 예들에 따른, 모듈, 프로그램 또는 다른 구성 요소에 의해 수행되는 동작들은 순차적, 병렬적, 반복적 또는 휴리스틱하게 실행되거나, 적어도 일부 동작이 다른 순서로 실행되거나, 생략되거나, 또는 다른 동작이 추가될 수 있다.
실시 예에 대하여 구체적으로 도시하고 설명하였지만, 다음의 청구 범위의 사상 및 범위를 벗어나지 않고 형태 및 세부 사항에서 다양한 변경이 이루어질 수 있다.

Claims (15)

  1. 전자 장치에 있어서,
    입력 인터페이스;
    인공 지능 모델에 대응되는 복수의 가중치가 저장된 메모리;
    상기 복수의 가중치에 기초하여 상기 입력 인터페이스를 통해 제공된 입력 데이터에 대한 신경망 연산을 수행하는 프로세서;를 포함하며,
    상기 프로세서는,
    상기 입력 데이터, 상기 복수의 가중치 또는 상기 신경망 연산의 수행 과정에서 획득되는 연산 결과 중 적어도 하나가 임계 범위 내이면, 상기 임계 범위 내의 원본 값을 기설정된 값으로 변경하고, 상기 기설정된 값에 기초하여 상기 신경망 연산을 수행하는, 전자 장치.
  2. 제1항에 있어서,
    상기 기설정된 값은 0인, 전자 장치.
  3. 제2항에 있어서,
    상기 프로세서는,
    상기 기설정된 값을 이용하여 수행된 상기 신경망 연산의 결과 및 상기 원본 값을 이용하여 수행된 상기 신경망 연산의 결과에 기초하여 상기 임계 범위를 획득하는, 전자 장치.
  4. 제1항에 있어서,
    상기 임계 범위는,
    -a 부터 a 사이의 범위이며,
    a는,
    상기 입력 데이터, 상기 복수의 가중치 또는 상기 신경망 연산의 수행 과정에서 획득되는 연산 결과 중 적어도 하나의 최대값보다 작은 양수인, 전자 장치.
  5. 제1항에 있어서,
    상기 프로세서는,
    상기 입력 데이터, 상기 복수의 가중치 또는 상기 연산 결과 중 적어도 하나가 상기 임계 범위보다 큰 제1 임계 범위 내이면, 상기 제1 임계 범위 내의 상기 원본 값을 복수의 제1 대표 값 중 하나로 변경하고, 상기 복수의 제1 대표 값 중 하나에 대응되는 변경된 값에 기초하여 상기 신경망 연산을 수행하며,
    상기 입력 데이터, 상기 복수의 가중치 또는 상기 연산 결과 중 적어도 하나가 상기 임계 범위보다 작은 제2 임계 범위 내이면, 상기 제2 임계 범위 내의 상기 원본 값을 복수의 제2 대표 값 중 하나로 변경하고, 상기 복수의 제1 대표 값 중 하나에 대응되는 변경된 값에 기초하여 상기 신경망 연산을 수행하는, 전자 장치.
  6. 제5항에 있어서,
    상기 복수의 제1 대표 값 및 상기 복수의 제2 대표 값 각각은, 2의 승수이고,
    상기 프로세서는,
    상기 입력 데이터, 상기 복수의 가중치 또는 상기 연산 결과 중 적어도 하나를 상기 복수의 제1 대표 값 및 상기 복수의 제2 대표 값 중 크기 차이가 가장 작은 대표 값으로 변경하고, 상기 대표 값에 기초하여 상기 신경망 연산을 수행하는, 전장 장치.
  7. 제6항에 있어서,
    상기 프로세서는,
    시프트 연산에 기초하여 상기 신경망 연산의 수행 과정에서 상기 복수의 제1 대표 값 또는 상기 복수의 제2 대표 값 중 하나를 이용한 곱셈 연산 결과를 획득하는, 전자 장치.
  8. 제5항에 있어서,
    상기 프로세서는,
    상기 복수의 제1 대표 값 및 상기 복수의 제2 대표 값에 기초하여 결정된 임계 수치 미만의 비트 수를 획득하며,
    상기 입력 데이터, 상기 복수의 가중치 또는 상기 연산 결과 중 적어도 하나가 상기 임계 범위, 상기 제1 임계 범위 및 상기 제2 임계 범위 내에 속하지 않으면, 상기 비트 수를 획득하는, 전자 장치.
  9. 제5항에 있어서,
    상기 프로세서는,
    상기 변경된 값을 이용하여 수행된 상기 신경망 연산의 결과 및 상기 기설정된 값을 이용하여 수행된 상기 신경망 연산의 결과에 기초하여 상기 임계 범위, 상기 제1 임계 범위 및 상기 제2 임계 범위를 획득하는, 전자 장치.
  10. 제5항에 있어서,
    상기 임계 범위는,
    -a 부터 a 사이의 범위이며,
    a는, 양수이고,
    상기 제1 임계 범위는,
    b 부터 c 사이의 범위이며,
    상기 제2 임계 범위는,
    -c 부터 -b 사이의 범위이며,
    b는, a보다 크고 c보다 작은 양수이고,
    c는,
    상기 입력 데이터, 상기 복수의 가중치 또는 상기 신경망 연산의 수행 과정에서 획득되는 연산 결과 중 적어도 하나의 최대값보다 작은 양수인, 전자 장치.
  11. 제1항에 있어서,
    상기 임계 범위는,
    상기 인공 지능 모델의 레이어 별로 상이한, 전자 장치.
  12. 제1항에 있어서,
    사용자 인터페이스;를 더 포함하며,
    상기 프로세서는,
    상기 사용자 인터페이스를 통해 사용자 명령이 수신되면, 상기 입력 데이터, 상기 복수의 가중치 또는 상기 연산 결과 중 적어도 하나가 임계 범위 내인지 식별하는, 전자 장치.
  13. 신경망(Neural Network) 연산을 수행하는 전자 장치의 제어 방법에 있어서,
    인공 지능 모델에 의해 학습된 복수의 가중치에 기초하여 입력 데이터에 대한 신경망 연산을 수행하는 단계;
    상기 입력 데이터, 상기 복수의 가중치 또는 상기 신경망 연산의 수행 과정에서 획득되는 연산 결과 중 적어도 하나가 임계 범위 내인지 식별하고, 상기 임계 범위 내의 원본 값을 기설정된 값으로 변경하는 단계; 및
    상기 기설정된 값에 기초하여 상기 신경망 연산을 수행하는 단계;를 포함하는 제어 방법.
  14. 제13항에 있어서,
    상기 기설정된 값은 0인, 제어 방법.
  15. 제14항에 있어서,
    상기 기설정된 값을 이용하여 수행된 상기 신경망 연산의 결과 및 상기 원본 값을 이용하여 수행된 상기 신경망 연산의 결과에 기초하여 상기 임계 범위를 획득하는 단계;를 더 포함하는, 제어 방법.
PCT/KR2021/008631 2020-08-21 2021-07-07 전자 장치 및 그 제어 방법 WO2022039385A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/425,216 US20230153068A1 (en) 2020-08-21 2021-07-07 Electronic apparatus and control method thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2020-0105273 2020-08-21
KR1020200105273A KR20220023490A (ko) 2020-08-21 2020-08-21 전자 장치 및 그 제어 방법

Publications (1)

Publication Number Publication Date
WO2022039385A1 true WO2022039385A1 (ko) 2022-02-24

Family

ID=80323484

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/008631 WO2022039385A1 (ko) 2020-08-21 2021-07-07 전자 장치 및 그 제어 방법

Country Status (3)

Country Link
US (1) US20230153068A1 (ko)
KR (1) KR20220023490A (ko)
WO (1) WO2022039385A1 (ko)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180111271A (ko) * 2017-03-31 2018-10-11 삼성전자주식회사 신경망 모델을 이용하여 노이즈를 제거하는 방법 및 장치
KR20190104406A (ko) * 2017-10-20 2019-09-09 상하이 캠브리콘 인포메이션 테크놀로지 컴퍼니 리미티드 처리방법 및 장치
KR20200037816A (ko) * 2017-08-02 2020-04-09 스트롱 포스 아이오티 포트폴리오 2016, 엘엘씨 대규모 데이터 세트들을 갖는 산업 사물 인터넷 데이터 수집 환경에서의 검출을 위한 방법들 및 시스템들
KR20200084427A (ko) * 2018-12-24 2020-07-13 주식회사 포스코아이씨티 딥러닝 기반의 얼굴인식모델을 이용하여 특징벡터를 추출하는 얼굴인식시스템
KR20200096861A (ko) * 2019-02-05 2020-08-14 삼성디스플레이 주식회사 불량 감지 방법 및 장치

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180111271A (ko) * 2017-03-31 2018-10-11 삼성전자주식회사 신경망 모델을 이용하여 노이즈를 제거하는 방법 및 장치
KR20200037816A (ko) * 2017-08-02 2020-04-09 스트롱 포스 아이오티 포트폴리오 2016, 엘엘씨 대규모 데이터 세트들을 갖는 산업 사물 인터넷 데이터 수집 환경에서의 검출을 위한 방법들 및 시스템들
KR20190104406A (ko) * 2017-10-20 2019-09-09 상하이 캠브리콘 인포메이션 테크놀로지 컴퍼니 리미티드 처리방법 및 장치
KR20200084427A (ko) * 2018-12-24 2020-07-13 주식회사 포스코아이씨티 딥러닝 기반의 얼굴인식모델을 이용하여 특징벡터를 추출하는 얼굴인식시스템
KR20200096861A (ko) * 2019-02-05 2020-08-14 삼성디스플레이 주식회사 불량 감지 방법 및 장치

Also Published As

Publication number Publication date
US20230153068A1 (en) 2023-05-18
KR20220023490A (ko) 2022-03-02

Similar Documents

Publication Publication Date Title
WO2021101087A1 (en) Electronic apparatus and controlling method thereof
WO2020256460A1 (en) Apparatus and method for driving display based on frequency operation cycle set differently according to frequency
WO2020226317A1 (en) Image processing apparatus and image processing method thereof
WO2021107291A1 (en) Electronic apparatus and control method thereof
WO2021071155A1 (en) Electronic apparatus and control method thereof
WO2020017875A1 (en) Electronic apparatus, method for processing image and computer-readable recording medium
WO2020153626A1 (en) Electronic apparatus and control method thereof
WO2018048117A1 (en) Display apparatus and control method thereof
WO2023106890A1 (ko) 전자 장치 및 그 제어 방법
WO2021162260A1 (en) Electronic apparatus and control method thereof
WO2024014706A1 (ko) 화질 개선을 수행하는 신경망 모델을 학습시키는 전자 장치 및 그 제어 방법
WO2021080290A1 (en) Electronic apparatus and control method thereof
WO2022039385A1 (ko) 전자 장치 및 그 제어 방법
WO2020246724A1 (en) Electronic apparatus and method of performing operations thereof
WO2019198900A1 (en) Electronic apparatus and control method thereof
WO2022182046A1 (en) Method and apparatus for regulating screen refresh rate
WO2022059920A1 (ko) 전자 장치, 그 제어 방법 및 전자 시스템
WO2020060071A1 (en) Electronic apparatus and control method thereof
WO2022108008A1 (en) Electronic apparatus and controlling method thereof
WO2020138630A1 (en) Display apparatus and image processing method thereof
WO2022086045A1 (ko) 전자 장치 및 이의 제어 방법
WO2022030998A1 (ko) 디스플레이를 포함하는 전자 장치 및 그의 동작 방법
WO2021100985A1 (en) Electronic apparatus and control method thereof
WO2021230470A1 (ko) 전자 장치 및 그 제어 방법
EP3491831A1 (en) Display device and method operating in plurality of modes

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: 21858472

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: 21858472

Country of ref document: EP

Kind code of ref document: A1