WO2023038159A1 - Method and system for optimizing deep-learning model through layer-by-layer lightening - Google Patents

Method and system for optimizing deep-learning model through layer-by-layer lightening Download PDF

Info

Publication number
WO2023038159A1
WO2023038159A1 PCT/KR2021/012100 KR2021012100W WO2023038159A1 WO 2023038159 A1 WO2023038159 A1 WO 2023038159A1 KR 2021012100 W KR2021012100 W KR 2021012100W WO 2023038159 A1 WO2023038159 A1 WO 2023038159A1
Authority
WO
WIPO (PCT)
Prior art keywords
importance
learning model
deep learning
layer
layers
Prior art date
Application number
PCT/KR2021/012100
Other languages
French (fr)
Korean (ko)
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 PCT/KR2021/012100 priority Critical patent/WO2023038159A1/en
Priority to KR1020227029392A priority patent/KR102552478B1/en
Publication of WO2023038159A1 publication Critical patent/WO2023038159A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/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/08Learning methods

Definitions

  • the following description relates to a deep learning model optimization method and system through layer-by-layer weight reduction.
  • Representative technologies for lightening deep learning models include network pruning, filter decomposition, and quantization.
  • Network pruning is a technique that reduces the size of the model or accelerates the model by removing parameters that are judged to be of low importance in the model.
  • the objects of the removed parameters include weight vectors, entire channels, or layers. Include all components of the model.
  • Filter decomposition is a technique to reduce weight by approximating multi-dimensional model weights with a small number of coefficients.
  • the techniques include Tucker decomposition, canonical polyadic decomposition (CP decomposition), and singular value decomposition (SVD).
  • the quantization technique is a technique of expressing and approximating weights with a smaller number of bits than before in expressing weights of a model, thereby reducing weight.
  • the degree of lightening for each layer of each lightening technique is determined by how much network pruning is performed within the layer, how many coefficients are used to approximate the weights of the existing model (filter decomposition), or how many small bits. Including whether to approximate the weights, etc., this corresponds to the NP complete (Nondeterministic Polynomial Complete) problem.
  • a deep learning model optimization method performed by a computer device including at least one processor, wherein each of the layers included in the deep learning model is independently lightweight by the at least one processor, of the deep learning model determining an importance of each of the layers based on a degree of performance degradation; and performing, by the at least one processor, lightening of the deep learning model according to the importance determined for each of the layers.
  • the determining of the importance may include generating a lightweight first layer by lightening a first layer among the layers using a first value among preset values of parameters for controlling an amount of compression. Level 1; a second step of generating a first instance model of the deep learning model in which the first layer is replaced with the lightweight first layer; and a third step of determining whether to select the first value as the importance of the first layer by comparing the performance of the first instance model with a difference between the performance of the deep learning model and a preset tolerance for performance degradation. It can be characterized by doing.
  • the determining of the importance may include, when the first value is not selected as the importance of the first layer, using a second value among preset values of the parameter in the first step to the first layer. It may be characterized by further comprising a fourth step of re-performing step 3.
  • the step of determining the importance may further include a fifth step of repeatedly performing the first to fourth steps for a second layer among the layers.
  • the permissible value of performance degradation may be preset based on a user's input.
  • the importance depends on whether the layer corresponding to the importance is pruned or the weight vector of the layer corresponding to the importance, when the deep learning model is lightweight using network pruning. It may be characterized by indicating whether or not pruning is performed.
  • the importance may indicate a coefficient to which a weight of a layer corresponding to the importance is approximated when the deep learning model is lightweighted using filter decomposition.
  • the importance may indicate the number of bits representing the weight of the layer corresponding to the importance when the deep learning model is lightweighted using quantization.
  • a computer program stored in a computer readable recording medium is provided in combination with a computer device to execute the method on the computer device.
  • a computer readable recording medium having a program for executing the method in a computer device is recorded.
  • performance degradation of the deep learning model It provides a computer device characterized in that determining the importance of each of the layers based on the degree, and proceeding with the weight reduction of the deep learning model according to the determined importance of each of the layers.
  • the degree of weight reduction for each layer can be determined independently of each weight reduction technique.
  • FIG. 1 is a block diagram illustrating an example of a computer device according to one embodiment of the present invention.
  • FIG. 2 is a block diagram showing an example of the internal configuration of a deep learning model optimization system according to an embodiment of the present invention.
  • FIG. 3 is a flowchart illustrating an example of a deep learning model optimization method according to an embodiment of the present invention.
  • FIG. 4 is a flowchart illustrating an example of a process of determining importance according to an embodiment of the present invention.
  • a deep learning model optimization system may be implemented by at least one computer device.
  • a computer program according to an embodiment of the present invention may be installed and driven in the computer device, and the computer device may perform the deep learning model optimization method according to the embodiments of the present invention under the control of the driven computer program.
  • the above-described computer program may be combined with a computer device and stored in a computer readable recording medium to execute a deep learning model optimization method on a computer.
  • a computer device 100 includes a memory 110, a processor 120, a communication interface 130, and an I/O interface 140.
  • the memory 110 is a computer-readable recording medium and may include a random access memory (RAM), a read only memory (ROM), and a permanent mass storage device such as a disk drive.
  • RAM random access memory
  • ROM read only memory
  • a permanent mass storage device such as a disk drive.
  • a non-perishable mass storage device such as a ROM and a disk drive may be included in the computer device 100 as a separate permanent storage device distinct from the memory 110.
  • an operating system and at least one program code may be stored in the memory 110 .
  • These software components may be loaded into the memory 110 from a recording medium readable by a separate computer from the memory 110 .
  • the separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD/CD-ROM drive, and a memory card.
  • software components may be loaded into the memory 110 through the communication interface 130 rather than a computer-readable recording medium.
  • software components may be loaded into the memory 110 of the computer device 100 based on a computer program installed by files received through a network 160 .
  • the processor 120 may be configured to process commands of a computer program by performing basic arithmetic, logic, and input/output operations. Instructions may be provided to processor 120 by memory 110 or communication interface 130 . For example, processor 120 may be configured to execute received instructions according to program codes stored in a recording device such as memory 110 .
  • the communication interface 130 may provide a function for the computer device 100 to communicate with other devices through the network 160 .
  • a request, command, data, file, etc. generated according to a program code stored in a recording device such as the memory 110 by the processor 120 of the computer device 100 is transmitted to the network ( 160) to other devices.
  • signals, commands, data, files, etc. from other devices may be received by the computer device 100 via the communication interface 130 of the computer device 100 via the network 160 .
  • Signals, commands, data, etc. received through the communication interface 130 may be transmitted to the processor 120 or the memory 110, and files, etc. may be stored as storage media that the computer device 100 may further include (described above). permanent storage).
  • the input/output interface 140 may be a means for interface with the input/output device (I/O device, 150).
  • the input device may include a device such as a microphone, keyboard, or mouse
  • the output device may include a device such as a display or speaker.
  • the input/output interface 140 may be a means for interface with a device in which functions for input and output are integrated into one, such as a touch screen.
  • the input/output device 150 and the computer device 100 may be configured as one device.
  • computer device 100 may include fewer or more elements than those of FIG. 1 . However, there is no need to clearly show most of the prior art components.
  • the computer device 100 may be implemented to include at least a portion of the above-described input/output device 150 or may further include other components such as a transceiver and a database.
  • FIG. 2 is a block diagram showing an example of the internal configuration of a deep learning model optimization system according to an embodiment of the present invention
  • FIG. 3 is a flowchart showing an example of a deep learning model optimization method according to an embodiment of the present invention. am.
  • the deep learning model optimization system 200 may be implemented by at least one computer device 100 .
  • the deep learning model optimization system 200 of FIG. 2 may include an importance determination unit 210 and a weight reduction unit 220 .
  • the importance determination unit 210 and the weight reduction unit 220 are functional representations of functions in which the processor 120 of the computer device 100 implementing the deep learning model optimization system 200 operates under the control of a computer program ( functional expression).
  • the processor 120 of the computer device 100 may be implemented to execute control instructions according to codes of an operating system included in the memory 110 or codes of at least one computer program.
  • the processor 120 controls the computer device 100 so that the computer device 100 performs steps 310 and 320 included in the method of FIG.
  • the processor 120 for performing each of the steps 310 and 320, the importance determination unit 210 and the weight reduction unit 220 may be used.
  • the importance determiner 210 may determine the importance of each layer based on the degree of performance degradation of the deep learning model when each of the layers included in the deep learning model is independently weighted. For example, the importance determining unit 210 measures the performance of the original deep learning model, generates a first instance model of the deep learning model in which the first layer of the deep learning model is independently lightweight, and measures the performance. , the importance of the first layer may be determined based on how much the performance of the first instance model in which the first layer is independently lightweight is lowered compared to the original deep learning model. A process of determining the importance of each of the layers will be described in detail later with reference to FIG. 4 .
  • the weight reduction unit 220 may progress weight reduction of the deep learning model according to the importance determined for each of the layers. For example, when a deep learning model is lightweighted using network pruning, the importance may indicate whether a layer corresponding to the importance is pruned or whether the weight vector of the layer corresponding to the importance is pruned. . Since pruning for each of the layers or each of the weight vectors of the layers is determined through an absolute index of performance, the lightweight unit 220 may determine the degree of lightweighting for each layer for the network pruning technique. In addition, when a deep learning model is lightweighted using filter decomposition, the importance may indicate a coefficient to which a weight of a layer corresponding to the importance is approximated.
  • the lightweight unit 220 may determine the degree of lightweighting for each layer for the filter decomposition technique.
  • the importance may indicate the number of bits representing the weight of a layer corresponding to the importance. Since the number of bits representing the weight of each layer is determined through an absolute index of performance, the weight reduction unit 220 may determine the degree of weight reduction for each layer with respect to the quantization technique. As such, the deep learning model optimization system 200 can determine the degree of weight reduction for each layer independently of each weight reduction technique, and through this, it is possible to provide a deep learning model optimization method with guaranteed performance.
  • Steps 410 to 450 of FIG. 4 may be included in step 310 of FIG. 3 and performed by the importance determining unit 210 .
  • the importance determiner 210 may create a lightweight first layer by lightening the first layer among the layers using a first value among preset values of parameters for controlling the amount of compression.
  • the set of preset values may vary according to the lightweighting technique to be used for lightweighting the deep learning model.
  • the importance determiner 210 may generate a first instance model of the deep learning model in which the first layer is replaced with a lightweight first layer.
  • the importance determining unit 210 may generate the first instance model by replacing the first layer of the deep learning model with the first layer that is lightweight in step 410 .
  • the importance determination unit 210 may compare the performance of the first instance model with the difference between the performance of the deep learning model and a preset tolerance for performance degradation.
  • the importance determining unit 210 may determine whether to select the first value as the importance of the first layer.
  • the preset values are parameters for controlling the compression amount, and may be arranged in an order of relatively increasing compression amount.
  • the importance determining unit 210 may sequentially select and utilize values starting from the parameter having the smallest compression amount. For example, assuming that a set of preset values for network pruning is ⁇ 1, 0.9, 0.8, ⁇ , 0.1 ⁇ , the importance determining unit 210 first selects '1' as a first value and performs step Steps 410 to 440 may be performed.
  • the first value when the performance of the first instant model including the first layer reduced by using the first value is less than or equal to the difference between the performance of the deep learning model and the predetermined performance degradation tolerance (that is, close to the given performance degradation tolerance) performance degradation), the first value may be selected as the importance of the first layer.
  • the importance determining unit ( 210 may re-perform steps 410 to 440. At this time, the importance determiner 210 may lighten the first layer by using a second value different from the first value among preset values of parameters in the re-performed step 410 . As an example, assuming that a set of preset values for network pruning is ⁇ 1, 0.9, 0.8, ⁇ , 0.1 ⁇ , the importance determining unit 210 determines that '1' selected as the first value is the value of the first layer.
  • the importance determining unit 210 may create a lightweight first layer by lightening the first layer using the second value in the re-performed step 410, and in the re-performed step 420, the weighted first layer may be generated.
  • a second instance model of the deep learning model in which one layer is replaced with a lightweight first layer may be generated. Thereafter, the importance determiner 210 may compare the performance of the second instance model with the difference between the performance of the deep learning model and a preset tolerance for performance degradation in step 430, which is performed again.
  • the importance determiner 210 may select the second value as the importance of the first layer in the re-performed step 440 .
  • the importance determiner 210 determines a third value (eg, 0.8) different from the first and second values among preset values of the parameter. Steps 410 to 440 may be performed again using This re-execution may be performed until the importance is determined through step 440 or steps 410 to 440 are repeatedly performed for all preset values of the parameter.
  • the importance determiner 210 may check whether the importance has been determined for each of the layers. If there is a layer whose importance has not been determined, steps 410 to 440 may be re-performed on the next layer. Meanwhile, if the importance level is determined for each of the layers, the process for determining the level of importance may end and step 320 of FIG. 3 may be performed.
  • Table 1 below shows an example of an algorithm of a deep learning model optimization method.
  • Table 1 is an algorithm for lightening the deep learning model M by independently determining the importance of each of the layers included in the set L (1, 2, ..., l ⁇ L ) of the layers of the deep learning model M.
  • may be a parameter for adjusting the compression amount of the model, which changes according to the compression method F.
  • ⁇ ⁇ (0, 1] e.g., ⁇ ⁇ [1, 0.9, 0.8, ..., 0.1]
  • ⁇ ⁇ [0, 1, None ] e.g., ⁇ ⁇ [1, 0.9, 0.8, ..., 0.1]
  • ⁇ ⁇ [2, 4, 8, 16, 32] where 2, 4, and 8 may mean the number of bits representing an integer, and 16 and 32 may mean the number of bits representing a real number (floating point), respectively).
  • the function infer () and the dataset D can be used using the function infer () and the dataset D.
  • can be provided by the user.
  • the permissible performance degradation value, ⁇ may mean a set of preset values of parameters for adjusting the amount of compression.
  • the first row may be an example of declaring an array “ Compressed ” in which the importance determined for each of the layers included in the deep learning model M will be stored.
  • the second row may be an example of measuring the performance “ OrigAcc ” of the deep learning model M by inputting the deep learning model M and the dataset D to the function infer ().
  • the third row may mean that all elements included in the set L of the layers of the deep learning model M , that is, iterative performance may be performed for each of the layers, and the fourth row represents parameters for adjusting the amount of compression. This may mean that iterative performance may be performed for all elements included in the set of preset values ⁇ .
  • a fifth row shows an example of generating a compressed layer l ' by independently compressing (lightening) the layer l through a specific ⁇ .
  • the specific ⁇ may be selected in order of a relatively small amount of compression.
  • the sixth row shows an example of generating a compressed deep learning model M ' by replacing the layer l of the deep learning model M with the compressed layer l ' using the function replace () for replacing the layer.
  • the seventh row shows an example of measuring performance such as accuracy for the compressed deep learning model M ' using the dataset D.
  • the current value of ⁇ for layer l of the array “ Compressed ” is stored as an importance, as in the ninth row.
  • is selected in order of relatively small amount of compression, a specific ⁇ for which the measured performance is equal to or less than the difference between the performance of the deep learning model M minus the degradation tolerance ⁇ is a performance degradation close to the degradation tolerance. while having the highest compression rate at the same time, it is possible to obtain a compressed layer l '.
  • the degree of weight reduction for each layer can be determined independently for each weight reduction technique.
  • the system or device described above may be implemented as a hardware component or a combination of hardware components and software components.
  • devices and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA) , a programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions.
  • the processing device may run an operating system (OS) and one or more software applications running on the operating system.
  • a processing device may also access, store, manipulate, process, and generate data in response to execution of software.
  • the processing device includes a plurality of processing elements and/or a plurality of types of processing elements. It can be seen that it can include.
  • a processing device may include a plurality of processors or a processor and a controller. Other processing configurations are also possible, such as parallel processors.
  • Software may include a computer program, code, instructions, or a combination of one or more of the foregoing, which configures a processing device to operate as desired or processes independently or collectively. You can command the device.
  • Software and/or data may be any tangible machine, component, physical device, virtual equipment, computer storage medium or device, intended to be interpreted by or provide instructions or data to a processing device.
  • can be embodied in Software may be distributed on networked computer systems and stored or executed in a distributed manner.
  • Software and data may be stored on one or more computer readable media.
  • the method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer readable medium.
  • the computer readable medium may include program instructions, data files, data structures, etc. alone or in combination.
  • the medium may continuously store programs executable by a computer or temporarily store them for execution or download.
  • the medium may be various recording means or storage means in the form of a single or combined hardware, but is not limited to a medium directly connected to a certain computer system, and may be distributed on a network. Examples of the medium include magnetic media such as hard disks, floppy disks and magnetic tapes, optical recording media such as CD-ROM and DVD, magneto-optical media such as floptical disks, and ROM, RAM, flash memory, etc.
  • examples of other media include recording media or storage media managed by an app store that distributes applications, a site that supplies or distributes various other software, and a server.
  • Examples of program instructions include high-level language codes that can be executed by a computer using an interpreter, as well as machine language codes such as those produced by a compiler.

Abstract

Disclosed are a method and system for optimizing a deep-learning model through layer-by-layer lightening. The method for optimizing a deep-learning model according to an embodiment may comprise the steps of: determining the importance of each layer included in the deep-learning model on the basis of the degree of performance degradation of the deep-learning model when independently lightening each of the layers; and lightening the deep-learning model according to the importance determined for each of the layers.

Description

레이어 별 경량화를 통한 딥러닝 모델 최적화 방법 및 시스템Deep learning model optimization method and system through weight reduction by layer
아래의 설명은 레이어 별 경량화를 통한 딥러닝 모델 최적화 방법 및 시스템에 관한 것이다.The following description relates to a deep learning model optimization method and system through layer-by-layer weight reduction.
딥러닝 모델의 경량화 기술은 대표적으로 네트워크 프루닝(Network Pruning), 필터 분해(Filter Decomposition), 양자화(Quantization) 등이 존재한다. 네트워크 프루닝이란, 모델 내에서 중요도가 낮다고 판단되는 파라미터를 제거하여 해당 모델의 크기를 축소시키거나 혹은 해당 모델을 가속화시키는 기법이며, 제거되는 파라미터의 객체로는 가중치 벡터, 채널 전체 혹은 레이어 등으로 모델의 모든 구성 요소를 포함한다. 필터 분해는 다차원의 모델 가중치를 적은 수의 계수로 근사하여 경량화 하는 기법이다. 해당 기법은 터커 분해(Tucker decomposition), CP 분해(canonical polyadic decomposition), SVD(singular value decomposition) 등을 포함한다. 양자화 기법은 모델의 가중치를 표현하는데 있어 기존보다 더 적은 수의 비트 수로 가중치를 표현 및 근사하여 경량화하는 기법이다.Representative technologies for lightening deep learning models include network pruning, filter decomposition, and quantization. Network pruning is a technique that reduces the size of the model or accelerates the model by removing parameters that are judged to be of low importance in the model. The objects of the removed parameters include weight vectors, entire channels, or layers. Include all components of the model. Filter decomposition is a technique to reduce weight by approximating multi-dimensional model weights with a small number of coefficients. The techniques include Tucker decomposition, canonical polyadic decomposition (CP decomposition), and singular value decomposition (SVD). The quantization technique is a technique of expressing and approximating weights with a smaller number of bits than before in expressing weights of a model, thereby reducing weight.
상위의 기법을 통해 특정 모델을 경량화하기 위해서는, 각 레이어 별로 모델의 경량화 정도를 효율적으로 배정하는 알고리즘이 필요하며, 동일한 경량화 정도를 갖더라도 해당 알고리즘의 우월성에 따라 성능차이가 존재한다. 각 경량화 기법의 레이어 별 경량화 정도는 레이어 내에서 얼만큼 네트워크 프루닝을 진행할 것인지, 얼만큼의 계수를 활용하여 기존 모델의 가중치를 근사(필터 분해)할 것인지 혹은, 얼마만큼의 적은 양의 비트 수로 가중치를 근사할 것인지 등을 포함하며, 이는 NP 완전(Nondeterministic Polynomial Complete) 문제에 해당된다.In order to lighten a specific model through the above technique, an algorithm that efficiently allocates the degree of lightness of the model for each layer is required, and even if the degree of lightness is the same, there is a difference in performance depending on the superiority of the corresponding algorithm. The degree of lightening for each layer of each lightening technique is determined by how much network pruning is performed within the layer, how many coefficients are used to approximate the weights of the existing model (filter decomposition), or how many small bits. Including whether to approximate the weights, etc., this corresponds to the NP complete (Nondeterministic Polynomial Complete) problem.
이때, 동일 모델임에도 레이어 간 특성이 매우 다양하며, 이를 동일한 경량화 정도 혹은 사용자가 정한 임의의 값으로 경량화 진행 시, 성능이 보장 되지 않는다는 문제점이 존재한다. 또한, 레이어 별 경량화 정도를 결정함에 있어, 각 경량화 기법의 특성으로부터 독립적인 기법이 요구된다.At this time, although the characteristics of the layers are very diverse even in the same model, there is a problem that the performance is not guaranteed when the weight is reduced to the same degree of weight or an arbitrary value determined by the user. In addition, in determining the degree of weight reduction for each layer, an independent technique from the characteristics of each weight reduction technique is required.
그러나, 경량화 및 가속화를 목적으로 한 다양한 기법들이 계속해서 발전하고 있으며, 각 경량화 기법에 알맞은 레이어 별 경량화 정도를 측정하기 매우 어렵다는 문제점이 있다.However, various techniques for the purpose of weight reduction and acceleration continue to develop, and there is a problem in that it is very difficult to measure the degree of weight reduction for each layer suitable for each weight reduction technique.
[선행문헌번호] [Prior document number]
한국공개특허 제10-2018-0013674호Korean Patent Publication No. 10-2018-0013674
각 경량화 기법에 독립적으로 레이어 별 경량화 정도를 결정할 수 있는 딥러닝 모델 최적화 방법 및 시스템을 제공한다.Provides a deep learning model optimization method and system that can determine the degree of weight reduction for each layer independently of each weight reduction technique.
적어도 하나의 프로세서를 포함하는 컴퓨터 장치에 의해 수행되는 딥러닝 모델 최적화 방법에 있어서, 상기 적어도 하나의 프로세서에 의해, 딥러닝 모델이 포함하는 레이어들 각각을 독립적으로 경량화하는 경우의 상기 딥러닝 모델의 성능 하락 정도에 기반하여 상기 레이어들 각각의 중요도를 결정하는 단계; 및 상기 적어도 하나의 프로세서에 의해, 상기 레이어들 각각에 대해 결정된 중요도에 따라 상기 딥러닝 모델의 경량화를 진행하는 단계를 포함하는 딥러닝 모델 최적화 방법을 제공한다.A deep learning model optimization method performed by a computer device including at least one processor, wherein each of the layers included in the deep learning model is independently lightweight by the at least one processor, of the deep learning model determining an importance of each of the layers based on a degree of performance degradation; and performing, by the at least one processor, lightening of the deep learning model according to the importance determined for each of the layers.
일측에 따르면, 상기 중요도를 결정하는 단계는, 상기 레이어들 중 제1 레이어를 압축량을 제어하기 위한 파라미터의 기설정된 값들 중 제1 값을 이용하여 경량화함으로써, 경량화된 제1 레이어를 생성하는 제1 단계; 상기 제1 레이어가 상기 경량화된 제1 레이어로 교체된 상기 딥러닝 모델의 제1 인스턴스 모델을 생성하는 제2 단계; 및 상기 제1 인스턴스 모델의 성능을 상기 딥러닝 모델의 성능과 기설정된 성능 하락 허용치간의 차이와 비교하여, 상기 제1 값을 상기 제1 레이어의 중요도로서 선택할 것인지 여부를 결정하는 제3 단계를 포함하는 것을 특징으로 할 수 있다.According to one aspect, the determining of the importance may include generating a lightweight first layer by lightening a first layer among the layers using a first value among preset values of parameters for controlling an amount of compression. Level 1; a second step of generating a first instance model of the deep learning model in which the first layer is replaced with the lightweight first layer; and a third step of determining whether to select the first value as the importance of the first layer by comparing the performance of the first instance model with a difference between the performance of the deep learning model and a preset tolerance for performance degradation. It can be characterized by doing.
다른 측면에 따르면, 상기 중요도를 결정하는 단계는, 상기 제1 값이 상기 제1 레이어의 중요도로서 선택되지 않은 경우, 상기 파라미터의 기설정된 값들 중 제2 값을 이용하여 상기 제1 단계 내지 상기 제3 단계를 재수행하는 제4 단계를 더 포함하는 것을 특징으로 할 수 있다.According to another aspect, the determining of the importance may include, when the first value is not selected as the importance of the first layer, using a second value among preset values of the parameter in the first step to the first layer. It may be characterized by further comprising a fourth step of re-performing step 3.
또 다른 측면에 따르면, 상기 중요도를 결정하는 단계는, 상기 레이어들 중 제2 레이어에 대해 상기 제1 단계 내지 상기 제4 단계를 반복 수행하는 제5 단계를 더 포함하는 것을 특징으로 할 수 있다.According to another aspect, the step of determining the importance may further include a fifth step of repeatedly performing the first to fourth steps for a second layer among the layers.
또 다른 측면에 따르면, 상기 성능 하락 허용치는 사용자의 입력에 기반하여 기설정되는 것을 특징으로 할 수 있다.According to another aspect, the permissible value of performance degradation may be preset based on a user's input.
또 다른 측면에 따르면, 상기 중요도는, 상기 딥러닝 모델을 네트워크 프루닝(network pruning)을 이용하여 경량화하는 경우, 상기 중요도에 대응하는 레이어의 프루닝 여부 또는 상기 중요도에 대응하는 레이어의 가중치 벡터에 대한 프루닝 여부를 나타내는 것을 특징으로 할 수 있다.According to another aspect, the importance depends on whether the layer corresponding to the importance is pruned or the weight vector of the layer corresponding to the importance, when the deep learning model is lightweight using network pruning. It may be characterized by indicating whether or not pruning is performed.
또 다른 측면에 따르면, 상기 중요도는, 상기 딥러닝 모델을 필터 분해(Filter Decomposition)를 이용하여 경량화하는 경우, 상기 중요도에 대응하는 레이어의 가중치가 근사될 계수를 나타내는 것을 특징으로 할 수 있다.According to another aspect, the importance may indicate a coefficient to which a weight of a layer corresponding to the importance is approximated when the deep learning model is lightweighted using filter decomposition.
또 다른 측면에 따르면, 상기 중요도는, 상기 딥러닝 모델을 양자화(Quantization)를 이용하여 경량화하는 경우, 상기 중요도에 대응하는 레이어의 가중치를 표현하는 비트 수를 나타내는 것을 특징으로 할 수 있다.According to another aspect, the importance may indicate the number of bits representing the weight of the layer corresponding to the importance when the deep learning model is lightweighted using quantization.
컴퓨터 장치와 결합되어 상기 방법을 컴퓨터 장치에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램을 제공한다.A computer program stored in a computer readable recording medium is provided in combination with a computer device to execute the method on the computer device.
상기 방법을 컴퓨터 장치에 실행시키기 위한 프로그램이 기록되어 있는 컴퓨터 판독 가능한 기록매체를 제공한다.A computer readable recording medium having a program for executing the method in a computer device is recorded.
컴퓨터 장치에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서에 의해, 딥러닝 모델이 포함하는 레이어들 각각을 독립적으로 경량화하는 경우의 상기 딥러닝 모델의 성능 하락 정도에 기반하여 상기 레이어들 각각의 중요도를 결정하고, 상기 레이어들 각각에 대해 결정된 중요도에 따라 상기 딥러닝 모델의 경량화를 진행하는 것을 특징으로 하는 컴퓨터 장치를 제공한다.In the case of including at least one processor implemented to execute instructions readable by a computer device, and independently lightweighting each of the layers included in the deep learning model by the at least one processor, performance degradation of the deep learning model It provides a computer device characterized in that determining the importance of each of the layers based on the degree, and proceeding with the weight reduction of the deep learning model according to the determined importance of each of the layers.
각 경량화 기법에 독립적으로 레이어 별 경량화 정도를 결정할 수 있다.The degree of weight reduction for each layer can be determined independently of each weight reduction technique.
도 1은 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다.1 is a block diagram illustrating an example of a computer device according to one embodiment of the present invention.
도 2는 본 발명의 일실시예에 따른 딥러닝 모델 최적화 시스템의 내부 구성의 예를 도시한 블록도이다.2 is a block diagram showing an example of the internal configuration of a deep learning model optimization system according to an embodiment of the present invention.
도 3은 본 발명의 일실시예에 따른 딥러닝 모델 최적화 방법의 예를 도시한 흐름도이다.3 is a flowchart illustrating an example of a deep learning model optimization method according to an embodiment of the present invention.
도 4는 본 발명의 일실시예에 있어서, 중요도를 결정하는 과정의 예를 도시한 흐름도이다.4 is a flowchart illustrating an example of a process of determining importance according to an embodiment of the present invention.
[규칙 제91조에 의한 정정 02.11.2021] 
[삭제]
[Correction under Rule 91 02.11.2021]
[delete]
이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, an embodiment will be described in detail with reference to the accompanying drawings.
본 발명의 실시예들에 따른 딥러닝 모델 최적화 시스템은 적어도 하나의 컴퓨터 장치에 의해 구현될 수 있다. 이때, 컴퓨터 장치에는 본 발명의 일실시예에 따른 컴퓨터 프로그램이 설치 및 구동될 수 있고, 컴퓨터 장치는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 실시예들에 따른 딥러닝 모델 최적화 방법을 수행할 수 있다. 상술한 컴퓨터 프로그램은 컴퓨터 장치와 결합되어 딥러닝 모델 최적화 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장될 수 있다.A deep learning model optimization system according to embodiments of the present invention may be implemented by at least one computer device. At this time, a computer program according to an embodiment of the present invention may be installed and driven in the computer device, and the computer device may perform the deep learning model optimization method according to the embodiments of the present invention under the control of the driven computer program. can The above-described computer program may be combined with a computer device and stored in a computer readable recording medium to execute a deep learning model optimization method on a computer.
도 1은 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다. 컴퓨터 장치(Computer device, 100)는 도 1에 도시된 바와 같이, 메모리(Memory, 110), 프로세서(Processor, 120), 통신 인터페이스(Communication interface, 130) 그리고 입출력 인터페이스(I/O interface, 140)를 포함할 수 있다. 메모리(110)는 컴퓨터에서 판독 가능한 기록매체로서, RAM(random access memory), ROM(read only memory) 및 디스크 드라이브와 같은 비소멸성 대용량 기록장치(permanent mass storage device)를 포함할 수 있다. 여기서 ROM과 디스크 드라이브와 같은 비소멸성 대용량 기록장치는 메모리(110)와는 구분되는 별도의 영구 저장 장치로서 컴퓨터 장치(100)에 포함될 수도 있다. 또한, 메모리(110)에는 운영체제와 적어도 하나의 프로그램 코드가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 메모리(110)와는 별도의 컴퓨터에서 판독 가능한 기록매체로부터 메모리(110)로 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록매체를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록매체가 아닌 통신 인터페이스(130)를 통해 메모리(110)에 로딩될 수도 있다. 예를 들어, 소프트웨어 구성요소들은 네트워크(Network, 160)를 통해 수신되는 파일들에 의해 설치되는 컴퓨터 프로그램에 기반하여 컴퓨터 장치(100)의 메모리(110)에 로딩될 수 있다.1 is a block diagram illustrating an example of a computer device according to one embodiment of the present invention. As shown in FIG. 1, a computer device 100 includes a memory 110, a processor 120, a communication interface 130, and an I/O interface 140. can include The memory 110 is a computer-readable recording medium and may include a random access memory (RAM), a read only memory (ROM), and a permanent mass storage device such as a disk drive. Here, a non-perishable mass storage device such as a ROM and a disk drive may be included in the computer device 100 as a separate permanent storage device distinct from the memory 110. Also, an operating system and at least one program code may be stored in the memory 110 . These software components may be loaded into the memory 110 from a recording medium readable by a separate computer from the memory 110 . The separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD/CD-ROM drive, and a memory card. In another embodiment, software components may be loaded into the memory 110 through the communication interface 130 rather than a computer-readable recording medium. For example, software components may be loaded into the memory 110 of the computer device 100 based on a computer program installed by files received through a network 160 .
프로세서(120)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(110) 또는 통신 인터페이스(130)에 의해 프로세서(120)로 제공될 수 있다. 예를 들어 프로세서(120)는 메모리(110)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다.The processor 120 may be configured to process commands of a computer program by performing basic arithmetic, logic, and input/output operations. Instructions may be provided to processor 120 by memory 110 or communication interface 130 . For example, processor 120 may be configured to execute received instructions according to program codes stored in a recording device such as memory 110 .
통신 인터페이스(130)은 네트워크(160)를 통해 컴퓨터 장치(100)가 다른 장치와 서로 통신하기 위한 기능을 제공할 수 있다. 일례로, 컴퓨터 장치(100)의 프로세서(120)가 메모리(110)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청이나 명령, 데이터, 파일 등이 통신 인터페이스(130)의 제어에 따라 네트워크(160)를 통해 다른 장치들로 전달될 수 있다. 역으로, 다른 장치로부터의 신호나 명령, 데이터, 파일 등이 네트워크(160)를 거쳐 컴퓨터 장치(100)의 통신 인터페이스(130)를 통해 컴퓨터 장치(100)로 수신될 수 있다. 통신 인터페이스(130)를 통해 수신된 신호나 명령, 데이터 등은 프로세서(120)나 메모리(110)로 전달될 수 있고, 파일 등은 컴퓨터 장치(100)가 더 포함할 수 있는 저장 매체(상술한 영구 저장 장치)로 저장될 수 있다.The communication interface 130 may provide a function for the computer device 100 to communicate with other devices through the network 160 . For example, a request, command, data, file, etc. generated according to a program code stored in a recording device such as the memory 110 by the processor 120 of the computer device 100 is transmitted to the network ( 160) to other devices. Conversely, signals, commands, data, files, etc. from other devices may be received by the computer device 100 via the communication interface 130 of the computer device 100 via the network 160 . Signals, commands, data, etc. received through the communication interface 130 may be transmitted to the processor 120 or the memory 110, and files, etc. may be stored as storage media that the computer device 100 may further include (described above). permanent storage).
입출력 인터페이스(140)는 입출력 장치(I/O device, 150)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 마이크, 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 디스플레이, 스피커와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(140)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 입출력 장치(150)는 컴퓨터 장치(100)와 하나의 장치로 구성될 수도 있다.The input/output interface 140 may be a means for interface with the input/output device (I/O device, 150). For example, the input device may include a device such as a microphone, keyboard, or mouse, and the output device may include a device such as a display or speaker. As another example, the input/output interface 140 may be a means for interface with a device in which functions for input and output are integrated into one, such as a touch screen. The input/output device 150 and the computer device 100 may be configured as one device.
또한, 다른 실시예들에서 컴퓨터 장치(100)는 도 1의 구성요소들보다 더 적은 혹은 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 컴퓨터 장치(100)는 상술한 입출력 장치(150) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다.Also, in other embodiments, computer device 100 may include fewer or more elements than those of FIG. 1 . However, there is no need to clearly show most of the prior art components. For example, the computer device 100 may be implemented to include at least a portion of the above-described input/output device 150 or may further include other components such as a transceiver and a database.
도 2는 본 발명의 일실시예에 따른 딥러닝 모델 최적화 시스템의 내부 구성의 예를 도시한 블록도이고, 도 3은 본 발명의 일실시예에 따른 딥러닝 모델 최적화 방법의 예를 도시한 흐름도이다.2 is a block diagram showing an example of the internal configuration of a deep learning model optimization system according to an embodiment of the present invention, and FIG. 3 is a flowchart showing an example of a deep learning model optimization method according to an embodiment of the present invention. am.
본 실시예에 따른 딥러닝 모델 최적화 시스템(200)은 적어도 하나의 컴퓨터 장치(100)에 의해 구현될 수 있다. 도 2의 딥러닝 모델 최적화 시스템(200)은 중요도 결정부(210) 및 경량화부(220)를 포함할 수 있다. 이때, 중요도 결정부(210) 및 경량화부(220)는 딥러닝 모델 최적화 시스템(200)을 구현하는 컴퓨터 장치(100)의 프로세서(120)가 컴퓨터 프로그램의 제어에 따라 동작하는 기능의 기능적 표현(functional expression)일 수 있다. 일례로, 컴퓨터 장치(100)의 프로세서(120)는 메모리(110)가 포함하는 운영체제의 코드나 적어도 하나의 컴퓨터 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(120)는 컴퓨터 장치(100)에 저장된 코드가 제공하는 제어 명령에 따라 컴퓨터 장치(100)가 도 3의 방법이 포함하는 단계들(310 및 320)을 수행하도록 컴퓨터 장치(100)를 제어할 수 있다. 이때, 각 단계들(310 및 320)의 수행을 위한 프로세서(120)의 기능적 표현으로서 중요도 결정부(210) 및 경량화부(220)가 사용될 수 있다.The deep learning model optimization system 200 according to this embodiment may be implemented by at least one computer device 100 . The deep learning model optimization system 200 of FIG. 2 may include an importance determination unit 210 and a weight reduction unit 220 . At this time, the importance determination unit 210 and the weight reduction unit 220 are functional representations of functions in which the processor 120 of the computer device 100 implementing the deep learning model optimization system 200 operates under the control of a computer program ( functional expression). For example, the processor 120 of the computer device 100 may be implemented to execute control instructions according to codes of an operating system included in the memory 110 or codes of at least one computer program. Here, the processor 120 controls the computer device 100 so that the computer device 100 performs steps 310 and 320 included in the method of FIG. 3 according to a control command provided by a code stored in the computer device 100. can control. At this time, as a functional expression of the processor 120 for performing each of the steps 310 and 320, the importance determination unit 210 and the weight reduction unit 220 may be used.
단계(310)에서 중요도 결정부(210)는 딥러닝 모델이 포함하는 레이어들 각각을 독립적으로 경량화하는 경우의 딥러닝 모델의 성능 하락 정도에 기반하여 레이어들 각각의 중요도를 결정할 수 있다. 예를 들어, 중요도 결정부(210)는 원래의 딥러닝 모델의 성능을 측정하고, 딥러닝 모델의 제1 레이어를 독립적으로 경량화한 딥러닝 모델의 제1 인스턴스 모델을 생성하여 성능을 측정한 후, 제1 레이어를 독립적으로 경량화한 제1 인스턴스 모델이 원래의 딥러닝 모델에 비해 성능이 얼마나 하락하였는가에 기반하여 제1 레이어의 중요도를 결정할 수 있다. 레이어들 각각의 중요도를 결정하는 과정에 대해서는 이후 도 4를 통해 더욱 자세히 설명한다.In step 310, the importance determiner 210 may determine the importance of each layer based on the degree of performance degradation of the deep learning model when each of the layers included in the deep learning model is independently weighted. For example, the importance determining unit 210 measures the performance of the original deep learning model, generates a first instance model of the deep learning model in which the first layer of the deep learning model is independently lightweight, and measures the performance. , the importance of the first layer may be determined based on how much the performance of the first instance model in which the first layer is independently lightweight is lowered compared to the original deep learning model. A process of determining the importance of each of the layers will be described in detail later with reference to FIG. 4 .
단계(320)에서 경량화부(220)는 레이어들 각각에 대해 결정된 중요도에 따라 딥러닝 모델의 경량화를 진행할 수 있다. 일례로, 딥러닝 모델을 네트워크 프루닝(network pruning)을 이용하여 경량화하는 경우, 중요도는 중요도에 대응하는 레이어의 프루닝 여부 또는 중요도에 대응하는 레이어의 가중치 벡터에 대한 프루닝 여부를 나타낼 수 있다. 레이어들 각각에 대해 또는 레이어들의 가중치 벡터들 각각에 대한 프루닝 여부가 성능이라는 절대적인 지표를 통해 결정되기 때문에, 경량화부(220)는 네트워크 프루닝 기법에 대해 레이어 별 경량화 정도를 결정할 수 있다. 또한, 딥러닝 모델을 필터 분해(Filter Decomposition)를 이용하여 경량화하는 경우, 중요도는 중요도에 대응하는 레이어의 가중치가 근사될 계수를 나타낼 수 있다. 레이어들 각각에 대해 가중치가 근사될 계수가 성능이라는 절대적인 지표를 통해 결정되기 때문에, 경량화부(220)는 필터 분해 기법에 대해 레이어 별 경량화 정도를 결정할 수 있다. 또한, 딥러닝 모델을 양자화(Quantization)를 이용하여 경량화하는 경우, 중요도는 중요도에 대응하는 레이어의 가중치를 표현하는 비트 수를 나타낼 수 있다. 레이어들 각각에 대해 레이어의 가중치를 표현하는 비트 수가 성능이라는 절대적인 지표를 통해 결정되기 때문에, 경량화부(220)는 양자화 기법에 대해 레이어 별 경량화 정도를 결정할 수 있다. 이처럼, 딥러닝 모델 최적화 시스템(200)은 각 경량화 기법에 독립적으로 레이어 별 경량화 정도를 결정할 수 있으며, 이를 통해 성능이 보장된 딥러닝 모델의 최적화 방법을 제공할 수 있게 된다.In step 320, the weight reduction unit 220 may progress weight reduction of the deep learning model according to the importance determined for each of the layers. For example, when a deep learning model is lightweighted using network pruning, the importance may indicate whether a layer corresponding to the importance is pruned or whether the weight vector of the layer corresponding to the importance is pruned. . Since pruning for each of the layers or each of the weight vectors of the layers is determined through an absolute index of performance, the lightweight unit 220 may determine the degree of lightweighting for each layer for the network pruning technique. In addition, when a deep learning model is lightweighted using filter decomposition, the importance may indicate a coefficient to which a weight of a layer corresponding to the importance is approximated. Since the coefficient to which the weight is approximated for each layer is determined through an absolute index of performance, the lightweight unit 220 may determine the degree of lightweighting for each layer for the filter decomposition technique. In addition, when a deep learning model is lightweighted using quantization, the importance may indicate the number of bits representing the weight of a layer corresponding to the importance. Since the number of bits representing the weight of each layer is determined through an absolute index of performance, the weight reduction unit 220 may determine the degree of weight reduction for each layer with respect to the quantization technique. As such, the deep learning model optimization system 200 can determine the degree of weight reduction for each layer independently of each weight reduction technique, and through this, it is possible to provide a deep learning model optimization method with guaranteed performance.
도 4는 본 발명의 일실시예에 있어서, 중요도를 결정하는 과정의 예를 도시한 흐름도이다. 도 4의 단계들(410 내지 450)는 도 3의 단계(310)에 포함되어 중요도 결정부(210)에 의해 수행될 수 있다.4 is a flowchart illustrating an example of a process of determining importance according to an embodiment of the present invention. Steps 410 to 450 of FIG. 4 may be included in step 310 of FIG. 3 and performed by the importance determining unit 210 .
단계(410)에서 중요도 결정부(210)는 레이어들 중 제1 레이어를 압축량을 제어하기 위한 파라미터의 기설정된 값들 중 제1 값을 이용하여 경량화함으로써, 경량화된 제1 레이어를 생성할 수 있다. 기설정된 값들의 집합은 딥러닝 모델의 경량화에 사용될 경량화 기법에 따라 달라질 수 있다.In step 410, the importance determiner 210 may create a lightweight first layer by lightening the first layer among the layers using a first value among preset values of parameters for controlling the amount of compression. . The set of preset values may vary according to the lightweighting technique to be used for lightweighting the deep learning model.
단계(420)에서 중요도 결정부(210)는 제1 레이어가 경량화된 제1 레이어로 교체된 딥러닝 모델의 제1 인스턴스 모델을 생성할 수 있다. 다시 말해, 중요도 결정부(210)는 딥러닝 모델의 제1 레이어를 단계(410)에서 경량화된 제1 레이어로 교체함으로써, 제1 인스턴스 모델을 생성할 수 있다. In step 420, the importance determiner 210 may generate a first instance model of the deep learning model in which the first layer is replaced with a lightweight first layer. In other words, the importance determining unit 210 may generate the first instance model by replacing the first layer of the deep learning model with the first layer that is lightweight in step 410 .
단계(430)에서 중요도 결정부(210)는 제1 인스턴스 모델의 성능을 딥러닝 모델의 성능과 기설정된 성능 하락 허용치간의 차이와 비교할 수 있다.In step 430, the importance determination unit 210 may compare the performance of the first instance model with the difference between the performance of the deep learning model and a preset tolerance for performance degradation.
단계(440)에서 중요도 결정부(210)는 제1 값을 제1 레이어의 중요도로서 선택할 것인지 여부를 결정할 수 있다.In step 440, the importance determining unit 210 may determine whether to select the first value as the importance of the first layer.
일례로, 기설정된 값들은 압축량을 제어하기 위한 파라미터로, 압축량을 상대적으로 증가시키는 순서로 정렬될 수 있다. 이때, 단계(410)에서 중요도 결정부(210)는 압축량이 가장 작은 파라미터부터 순차적으로 값을 선택하여 활용할 수 있다. 예를 들어, 네트워크 프루닝을 위한 기설정된 값들의 집합이 {1, 0.9, 0.8, 쪋, 0.1}이라 가정할 때, 중요도 결정부(210)는 먼저 '1'을 제1 값으로 선택하여 단계(410) 내지 단계(440)를 수행할 수 있다. 이때, 제1 값을 이용하여 경량화된 제1 레이어를 포함하는 제1 인스턴트 모델의 성능이 딥러닝 모델의 성능과 기설정된 성능 하락 허용치간의 차이 이하가 되는 경우(다시 말해, 주어진 성능 하락 허용치와 근사한 성능 하락을 보이는 경우), 제1 값이 제1 레이어의 중요도로서 선택될 수 있다.For example, the preset values are parameters for controlling the compression amount, and may be arranged in an order of relatively increasing compression amount. At this time, in step 410, the importance determining unit 210 may sequentially select and utilize values starting from the parameter having the smallest compression amount. For example, assuming that a set of preset values for network pruning is {1, 0.9, 0.8, 쪋, 0.1}, the importance determining unit 210 first selects '1' as a first value and performs step Steps 410 to 440 may be performed. In this case, when the performance of the first instant model including the first layer reduced by using the first value is less than or equal to the difference between the performance of the deep learning model and the predetermined performance degradation tolerance (that is, close to the given performance degradation tolerance) performance degradation), the first value may be selected as the importance of the first layer.
만약, 제1 값이 제1 레이어의 중요도로서 선택되지 않는 경우(다시 말해, 제1 인스턴스 모델의 성능이 딥러닝 모델의 성능과 기설정된 성능 하락 허용치간의 차이를 초과하는 경우), 중요도 결정부(210)는 단계(410) 내지 단계(440)를 재수행할 수 있다. 이때, 중요도 결정부(210)는 재수행되는 단계(410)에서 파라미터의 기설정된 값들 중 제1 값과는 다른 제2 값을 이용하여 제1 레이어를 경량화할 수 있다. 일례로, 네트워크 프루닝을 위한 기설정된 값들의 집합이 {1, 0.9, 0.8, 쪋, 0.1}이라 가정할 때, 중요도 결정부(210)는 제1 값으로 선택된 '1'이 제1 레이어의 중요도로 선택되지 않은 경우, 제2 값으로 '0.9'를 선택하여 단계(410) 내지 단계(440)를 재수행할 수 있다. 일례로, 중요도 결정부(210)는 재수행되는 단계(410)에서 제1 레이어를 제2 값을 이용하여 경량화하여 경량화된 제1 레이어를 생성할 수 있으며, 재수행되는 단계(420)에서 제1 레이어가 경량화된 제1 레이어로 교체된 딥러닝 모델의 제2 인스턴스 모델을 생성할 수 있다. 이후, 중요도 결정부(210)는 재수행되는 단계(430)에서 제2 인스턴스 모델의 성능을 딥러닝 모델의 성능과 기설정된 성능 하락 허용치간의 차이와 비교할 수 있다. 일례로, 제2 인스턴스 모델의 성능이 상기 차이 이하라면, 중요도 결정부(210)는 재수행되는 단계(440)에서 제2 값을 제1 레이어의 중요도로서 선택할 수 있다. 반면, 제2 값이 제1 레이어의 중요도로서 선택되지 않은 경우, 중요도 결정부(210)는 파라미터의 기설정된 값들 중 제1 값 및 제2 값과는 다른 제3 값(일례로, 0.8)을 이용하여 단계(410) 내지 단계(440)를 재수행할 수 있다. 이러한 재수행은 단계(440)를 통해 중요도가 결정되거나 또는 파라미터의 기설정된 값들 전체에 대해 단계(410) 내지 단계(440)가 반복 수행될 때까지 수행될 수 있다.If the first value is not selected as the importance of the first layer (that is, when the performance of the first instance model exceeds the difference between the performance of the deep learning model and the predetermined performance degradation tolerance), the importance determining unit ( 210 may re-perform steps 410 to 440. At this time, the importance determiner 210 may lighten the first layer by using a second value different from the first value among preset values of parameters in the re-performed step 410 . As an example, assuming that a set of preset values for network pruning is {1, 0.9, 0.8, 쪋, 0.1}, the importance determining unit 210 determines that '1' selected as the first value is the value of the first layer. If the importance is not selected, '0.9' may be selected as the second value and steps 410 to 440 may be performed again. For example, the importance determining unit 210 may create a lightweight first layer by lightening the first layer using the second value in the re-performed step 410, and in the re-performed step 420, the weighted first layer may be generated. A second instance model of the deep learning model in which one layer is replaced with a lightweight first layer may be generated. Thereafter, the importance determiner 210 may compare the performance of the second instance model with the difference between the performance of the deep learning model and a preset tolerance for performance degradation in step 430, which is performed again. For example, if the performance of the second instance model is equal to or less than the difference, the importance determiner 210 may select the second value as the importance of the first layer in the re-performed step 440 . On the other hand, when the second value is not selected as the importance of the first layer, the importance determiner 210 determines a third value (eg, 0.8) different from the first and second values among preset values of the parameter. Steps 410 to 440 may be performed again using This re-execution may be performed until the importance is determined through step 440 or steps 410 to 440 are repeatedly performed for all preset values of the parameter.
단계(450)에서 중요도 결정부(210)는 레이어들 각각에 대해 중요도가 결정되었는지 여부를 확인할 수 있다. 만약, 중요도가 결정되지 않은 레이어가 존재하는 경우, 다음 레이어에 대해 다시 단계(410) 내지 단계(440)이 재수행될 수 있다. 한편, 레이어들 각각에 대해 중요도가 결정되었다면, 중요도를 결정하기 위한 프로세스는 종료되어 도 3의 단계(320)가 수행될 수 있다.In step 450, the importance determiner 210 may check whether the importance has been determined for each of the layers. If there is a layer whose importance has not been determined, steps 410 to 440 may be re-performed on the next layer. Meanwhile, if the importance level is determined for each of the layers, the process for determining the level of importance may end and step 320 of FIG. 3 may be performed.
아래 표 1은 딥러닝 모델 최적화 방법의 알고리즘의 예를 나타내고 있다.Table 1 below shows an example of an algorithm of a deep learning model optimization method.
Figure PCTKR2021012100-appb-img-000001
Figure PCTKR2021012100-appb-img-000001
이때, 표 1은 딥러닝 모델 M의 레이어들의 집합 L(1, 2, …, l L)에 포함된 레이어들 각각에 대한 중요도를 독립적으로 판단하여 딥러닝 모델 M의 경량화를 진행하기 위한 알고리즘의 예를 나타내고 있다. 여기서, θ는 압축 메서드 F에 따라 변하는, 모델의 압축량을 조절하기 위한 파라미터일 수 있다. 일례로, 압축된 모델 M'또는 압축된 레이어 l'를 얻기 위해, 네트워크 프루닝의 경우에 θ ∈ (0, 1](일례로, θ ∈ [1, 0.9, 0.8, …, 0.1])일 수 있고, 필터 분해의 경우에 θ ∈ [0, 1, None] (일례로, θ ∈ [1, 0.9, 0.8, …, 0.1])일 수 있으며, 양자화의 경우에 θ ∈ [2, 4, 8, 16, 32](여기서, 2, 4, 8은 정수를 나타내는 비트 수를, 16, 32는 실수(부동소수점)를 나타내는 비트 수를 각각 의미할 수 있음)일 수 있다. 성능을 측정하기 위한 함수 infer()와 데이터셋 D를 이용하여 딥러닝 모델 M 또는 압축된 모델 M'의 성능을 측정하기 위해, 함수 infer()와 데이터셋 D이 사용될 수 있다. 또한, δ는 사용자로부터 제공될 수 있는 성능 하락 허용치를, Θ는 압축량을 조절하기 위한 파라미터의 기설정된 값들의 집합을 의미할 수 있다.At this time, Table 1 is an algorithm for lightening the deep learning model M by independently determining the importance of each of the layers included in the set L (1, 2, ..., lL ) of the layers of the deep learning model M. shows an example of Here, θ may be a parameter for adjusting the compression amount of the model, which changes according to the compression method F. As an example, θ ∈ (0, 1] (e.g., θ ∈ [1, 0.9, 0.8, …, 0.1]) in the case of network pruning to obtain a compressed model M 'or compressed layer l ' In the case of filter decomposition, θ ∈ [0, 1, None ] (eg, θ ∈ [1, 0.9, 0.8, …, 0.1]), and in the case of quantization, θ ∈ [2, 4, 8, 16, 32] (where 2, 4, and 8 may mean the number of bits representing an integer, and 16 and 32 may mean the number of bits representing a real number (floating point), respectively). In order to measure the performance of the deep learning model M or the compressed model M ', the function infer () and the dataset D can be used using the function infer () and the dataset D. In addition, δ can be provided by the user. The permissible performance degradation value, Θ may mean a set of preset values of parameters for adjusting the amount of compression.
표 1에서 제1 행은 딥러닝 모델 M이 포함하는 레이어들 각각에 대해 결정된 중요도가 저장될 배열 "Compressed"를 선언하는 예일 수 있다. 또한, 제2 행은 딥러닝 모델 M과 데이터셋 D를 함수 infer()에 입력하여 딥러닝 모델 M의 성능 "OrigAcc"를 측정하는 예일 수 있다. 제3 행은 딥러닝 모델 M의 레이어들의 집합 L에 포함된 모든 원소, 다시 말해 레이어들 각각에 대해 반복 수행이 이루어질 수 있음을 의미할 수 있으며, 제4 행은 압축량을 조절하기 위한 파라미터의 기설정된 값들의 집합 Θ에 포함된 모든 원소에 대해 반복 수행이 이루어질 수 있음을 의미할 수 있다. 제5 행은 특정 θ를 통해 레이어 l을 독립적으로 압축(경량화)하여 압축된 레이어 l'을 생성하는 예를 나타내고 있다. 여기서 특정 θ는 압축량이 상대적으로 적은 순서로 선택될 수 있다. 제6 행은 레이어를 교체하기 위한 함수 replace()를 이용하여 딥러닝 모델 M의 레이어 l을 압축된 레이어 l'로 교체함으로써, 압축된 딥러닝 모델 M'를 생성하는 예를 나타내고 있다. 제7 행은 압축된 딥러닝 모델 M'에 대해 데이터셋 D를 이용하여 정확도(accuracy)와 같은 성능을 측정하는 예를 나타내고 있다. 제8 행은 측정된 성능이 딥러닝 모델 M의 성능에서 성능 하락 허용치 δ를 뺀 차이값 이하인 경우에 제9 행에서와 같이 배열 "Compressed"의 레이어 l에 대해 현재의 θ의 값을 중요도로서 저장할 수 있다. 제5 행에서 θ가 압축량이 상대적으로 적은 순서로 선택되지 때문에 측정된 성능이 딥러닝 모델 M의 성능에서 성능 하락 허용치 δ를 뺀 차이값 이하가 되는 특정 θ는 성능 하락 허용치에 근사하는 성능 하락을 가지면서도 동시에 가장 큰 압축률을 가지는 압축된 레이어 l'을 얻을 수 있게 해준다. 레이어 l에 대해 현재의 θ의 값이 중요도로 결정되고 나면, 제10 행의 "break"에 의해 제4 행의 반복을 벗어나 제3 행을 통해 다른 레이어에 대한 중요도를 결정할 수 있다. 제11 행은 제8 행의 "if" 구문을 벗어남을, 제12 행은 제4 행의 "for" 구문을 벗어남을, 제13 행은 제3 행의 "for" 구문을 벗어남을 각각 의미할 수 있다. 모든 레이어 각각에 대해 θ의 값이 중요도로 결정되어 배열 "Compressed"가 완성되면, 제14 행에서 배열 "Compressed"의 중요도에 따라 딥러닝 모델 M이 압축 메서드 F를 통해 압축되어 최종적으로 압축된 딥러닝 모델 M'가 생성될 수 있다.In Table 1, the first row may be an example of declaring an array “ Compressed ” in which the importance determined for each of the layers included in the deep learning model M will be stored. In addition, the second row may be an example of measuring the performance “ OrigAcc ” of the deep learning model M by inputting the deep learning model M and the dataset D to the function infer (). The third row may mean that all elements included in the set L of the layers of the deep learning model M , that is, iterative performance may be performed for each of the layers, and the fourth row represents parameters for adjusting the amount of compression. This may mean that iterative performance may be performed for all elements included in the set of preset values Θ . A fifth row shows an example of generating a compressed layer l ' by independently compressing (lightening) the layer l through a specific θ . Here, the specific θ may be selected in order of a relatively small amount of compression. The sixth row shows an example of generating a compressed deep learning model M ' by replacing the layer l of the deep learning model M with the compressed layer l ' using the function replace () for replacing the layer. The seventh row shows an example of measuring performance such as accuracy for the compressed deep learning model M ' using the dataset D. In the eighth row, when the measured performance is less than or equal to the difference between the performance of the deep learning model M minus the performance degradation tolerance δ , the current value of θ for layer l of the array “ Compressed ” is stored as an importance, as in the ninth row. can In row 5, since θ is selected in order of relatively small amount of compression, a specific θ for which the measured performance is equal to or less than the difference between the performance of the deep learning model M minus the degradation tolerance δ is a performance degradation close to the degradation tolerance. while having the highest compression rate at the same time, it is possible to obtain a compressed layer l '. After the current value of θ for layer l is determined as the importance, it is possible to deviate from the repetition of the fourth row by “break” in the tenth row and determine the importance for other layers through the third row. Line 11 means to escape the "if" statement on line 8, line 12 means to escape the "for" statement on line 4, and line 13 means to escape the "for" statement on line 3. can When the value of θ is determined as the importance for each of all layers and the array " Compressed " is completed, the deep learning model M is compressed through the compression method F according to the importance of the array " Compressed " in the 14th row, and the final compressed deep A running model M ' may be created.
이처럼, 본 발명의 실시예들에 따르면, 각 경량화 기법에 독립적으로 레이어 별 경량화 정도를 결정할 수 있다.As such, according to embodiments of the present invention, the degree of weight reduction for each layer can be determined independently for each weight reduction technique.
이상에서 설명된 시스템 또는 장치는 하드웨어 구성요소, 또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 어플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The system or device described above may be implemented as a hardware component or a combination of hardware components and software components. For example, devices and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA) , a programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions. The processing device may run an operating system (OS) and one or more software applications running on the operating system. A processing device may also access, store, manipulate, process, and generate data in response to execution of software. For convenience of understanding, there are cases in which one processing device is used, but those skilled in the art will understand that the processing device includes a plurality of processing elements and/or a plurality of types of processing elements. It can be seen that it can include. For example, a processing device may include a plurality of processors or a processor and a controller. Other processing configurations are also possible, such as parallel processors.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록매체에 저장될 수 있다.Software may include a computer program, code, instructions, or a combination of one or more of the foregoing, which configures a processing device to operate as desired or processes independently or collectively. You can command the device. Software and/or data may be any tangible machine, component, physical device, virtual equipment, computer storage medium or device, intended to be interpreted by or provide instructions or data to a processing device. can be embodied in Software may be distributed on networked computer systems and stored or executed in a distributed manner. Software and data may be stored on one or more computer readable media.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 매체는 컴퓨터로 실행 가능한 프로그램을 계속 저장하거나, 실행 또는 다운로드를 위해 임시 저장하는 것일 수도 있다. 또한, 매체는 단일 또는 수개 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있는데, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 매체의 예시로는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등을 포함하여 프로그램 명령어가 저장되도록 구성된 것이 있을 수 있다. 또한, 다른 매체의 예시로, 애플리케이션을 유통하는 앱 스토어나 기타 다양한 소프트웨어를 공급 내지 유통하는 사이트, 서버 등에서 관리하는 기록매체 내지 저장매체도 들 수 있다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer readable medium. The computer readable medium may include program instructions, data files, data structures, etc. alone or in combination. The medium may continuously store programs executable by a computer or temporarily store them for execution or download. In addition, the medium may be various recording means or storage means in the form of a single or combined hardware, but is not limited to a medium directly connected to a certain computer system, and may be distributed on a network. Examples of the medium include magnetic media such as hard disks, floppy disks and magnetic tapes, optical recording media such as CD-ROM and DVD, magneto-optical media such as floptical disks, and ROM, RAM, flash memory, etc. configured to store program instructions. In addition, examples of other media include recording media or storage media managed by an app store that distributes applications, a site that supplies or distributes various other software, and a server. Examples of program instructions include high-level language codes that can be executed by a computer using an interpreter, as well as machine language codes such as those produced by a compiler.
이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with limited examples and drawings, those skilled in the art can make various modifications and variations from the above description. For example, the described techniques may be performed in an order different from the method described, and/or components of the described system, structure, device, circuit, etc. may be combined or combined in a different form than the method described, or other components may be used. Or even if it is replaced or substituted by equivalents, appropriate results can be achieved.
그러므로, 다른 구현들, 다른 실시예들 및 청구범위와 균등한 것들도 후술하는 청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents of the claims are within the scope of the following claims.

Claims (14)

  1. 적어도 하나의 프로세서를 포함하는 컴퓨터 장치에 의해 수행되는 딥러닝 모델 최적화 방법에 있어서,A deep learning model optimization method performed by a computer device including at least one processor,
    상기 적어도 하나의 프로세서에 의해, 딥러닝 모델이 포함하는 레이어들 각각을 독립적으로 경량화하는 경우의 상기 딥러닝 모델의 성능 하락 정도에 기반하여 상기 레이어들 각각의 중요도를 결정하는 단계; 및determining, by the at least one processor, an importance of each of the layers based on a degree of performance degradation of the deep learning model when each of the layers included in the deep learning model is independently lightweight; and
    상기 적어도 하나의 프로세서에 의해, 상기 레이어들 각각에 대해 결정된 중요도에 따라 상기 딥러닝 모델의 경량화를 진행하는 단계Lightening the deep learning model according to the importance determined for each of the layers, by the at least one processor.
    를 포함하는 딥러닝 모델 최적화 방법.Deep learning model optimization method including.
  2. 제1항에 있어서,According to claim 1,
    상기 중요도를 결정하는 단계는,The step of determining the importance is,
    상기 레이어들 중 제1 레이어를 압축량을 제어하기 위한 파라미터의 기설정된 값들 중 제1 값을 이용하여 경량화함으로써, 경량화된 제1 레이어를 생성하는 제1 단계;A first step of generating a lightweight first layer by lightening a first layer among the layers using a first value among predetermined values of a parameter for controlling an amount of compression;
    상기 제1 레이어가 상기 경량화된 제1 레이어로 교체된 상기 딥러닝 모델의 제1 인스턴스 모델을 생성하는 제2 단계; 및a second step of generating a first instance model of the deep learning model in which the first layer is replaced with the lightweight first layer; and
    상기 제1 인스턴스 모델의 성능을 상기 딥러닝 모델의 성능과 기설정된 성능 하락 허용치간의 차이와 비교하여, 상기 제1 값을 상기 제1 레이어의 중요도로서 선택할 것인지 여부를 결정하는 제3 단계A third step of determining whether to select the first value as the importance of the first layer by comparing the performance of the first instance model with the difference between the performance of the deep learning model and a predetermined tolerance for performance degradation.
    를 포함하는 것을 특징으로 하는 딥러닝 모델 최적화 방법.Deep learning model optimization method comprising a.
  3. 제2항에 있어서,According to claim 2,
    상기 중요도를 결정하는 단계는,The step of determining the importance is,
    상기 제1 값이 상기 제1 레이어의 중요도로 선택되지 않은 경우, 상기 파라미터의 기설정된 값들 중 제2 값을 이용하여 상기 제1 단계 내지 상기 제3 단계를 재수행하는 제4 단계A fourth step of re-performing the first to third steps using a second value among preset values of the parameter when the first value is not selected as the importance of the first layer.
    를 더 포함하는 것을 특징으로 하는 딥러닝 모델 최적화 방법.Deep learning model optimization method further comprising a.
  4. 제3항에 있어서,According to claim 3,
    상기 중요도를 결정하는 단계는,The step of determining the importance is,
    상기 레이어들 중 제2 레이어에 대해 상기 제1 단계 내지 상기 제4 단계를 반복 수행하는 제5 단계A fifth step of repeatedly performing the first to fourth steps for a second layer among the layers.
    를 더 포함하는 것을 특징으로 하는 딥러닝 모델 최적화 방법.Deep learning model optimization method further comprising a.
  5. 제2항에 있어서,According to claim 2,
    상기 성능 하락 허용치는 사용자의 입력에 기반하여 기설정되는 것을 특징으로 하는 딥러닝 모델 최적화 방법.The deep learning model optimization method, characterized in that the performance degradation tolerance is preset based on a user's input.
  6. 제1항에 있어서,According to claim 1,
    상기 중요도는, 상기 딥러닝 모델을 네트워크 프루닝(network pruning)을 이용하여 경량화하는 경우, 상기 중요도에 대응하는 레이어의 프루닝 여부 또는 상기 중요도에 대응하는 레이어의 가중치 벡터에 대한 프루닝 여부를 나타내는 것을 특징으로 하는 딥러닝 모델 최적화 방법.The importance indicates whether the layer corresponding to the importance is pruned or the weight vector of the layer corresponding to the importance is pruned when the deep learning model is lightweighted using network pruning. Deep learning model optimization method, characterized in that.
  7. 제1항에 있어서,According to claim 1,
    상기 중요도는, 상기 딥러닝 모델을 필터 분해(Filter Decomposition)를 이용하여 경량화하는 경우, 상기 중요도에 대응하는 레이어의 가중치가 근사될 계수를 나타내는 것을 특징으로 하는 딥러닝 모델 최적화 방법.The method of optimizing a deep learning model, characterized in that the importance indicates a coefficient to which a weight of a layer corresponding to the importance is approximated when the deep learning model is lightweighted using filter decomposition.
  8. 제1항에 있어서,According to claim 1,
    상기 중요도는, 상기 딥러닝 모델을 양자화(Quantization)를 이용하여 경량화하는 경우, 상기 중요도에 대응하는 레이어의 가중치를 표현하는 비트 수를 나타내는 것을 특징으로 하는 딥러닝 모델 최적화 방법.The deep learning model optimization method, characterized in that the importance represents the number of bits representing the weight of the layer corresponding to the importance when the deep learning model is lightweighted using quantization.
  9. 컴퓨터 장치와 결합되어 제1항 내지 제8항 중 어느 한 항의 방법을 컴퓨터 장치에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램.A computer program stored in a computer readable recording medium to be combined with a computer device to execute the method of any one of claims 1 to 8 on the computer device.
  10. 제1항 내지 제8항 중 어느 한 항의 방법을 컴퓨터 장치에 실행시키기 위한 프로그램이 기록되어 있는 컴퓨터 판독 가능한 기록매체.A computer readable recording medium on which a program for executing the method of any one of claims 1 to 8 is recorded in a computer device.
  11. 컴퓨터 장치에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서at least one processor implemented to execute instructions readable by a computer device;
    를 포함하고,including,
    상기 적어도 하나의 프로세서에 의해,by the at least one processor,
    딥러닝 모델이 포함하는 레이어들 각각을 독립적으로 경량화하는 경우의 상기 딥러닝 모델의 성능 하락 정도에 기반하여 상기 레이어들 각각의 중요도를 결정하고,Determine the importance of each of the layers based on the degree of performance degradation of the deep learning model when each of the layers included in the deep learning model is independently lightweight,
    상기 레이어들 각각에 대해 결정된 중요도에 따라 상기 딥러닝 모델의 경량화를 진행하는 것Lightening the deep learning model according to the importance determined for each of the layers.
    을 특징으로 하는 컴퓨터 장치.Characterized by a computer device.
  12. 제11항에 있어서,According to claim 11,
    상기 중요도를 결정하기 위해, 상기 적어도 하나의 프로세서에 의해,To determine the importance, by the at least one processor,
    상기 레이어들 중 제1 레이어를 압축량을 제어하기 위한 파라미터의 기설정된 값들 중 제1 값을 이용하여 경량화함으로써, 경량화된 제1 레이어를 생성하는 제1 과정;A first process of generating a lightweight first layer by lightening a first layer among the layers using a first value among predetermined values of parameters for controlling an amount of compression;
    상기 제1 레이어가 상기 경량화된 제1 레이어로 교체된 상기 딥러닝 모델의 제1 인스턴스 모델을 생성하는 제2 과정; 및a second process of generating a first instance model of the deep learning model in which the first layer is replaced with the lightweight first layer; and
    상기 제1 인스턴스 모델의 성능을 상기 딥러닝 모델의 성능과 기설정된 성능 하락 허용치간의 차이와 비교하여, 상기 제1 값을 상기 제1 레이어의 중요도로서 선택할 것인지 여부를 결정하는 제3 과정A third process of determining whether to select the first value as the importance of the first layer by comparing the performance of the first instance model with the difference between the performance of the deep learning model and a predetermined tolerance for performance degradation.
    을 수행하는 것을 특징으로 하는 컴퓨터 장치.A computer device characterized in that for performing.
  13. 제12항에 있어서,According to claim 12,
    상기 중요도를 결정하기 위해, 상기 적어도 하나의 프로세서에 의해,To determine the importance, by the at least one processor,
    상기 제1 값이 상기 제1 레이어의 중요도로서 선택되지 않은 경우, 상기 파라미터의 기설정된 값들 중 제2 값을 이용하여 상기 제1 과정 내지 상기 제3 과정을 재수행하는 제4 과정A fourth process of re-performing the first to third processes using a second value among preset values of the parameter when the first value is not selected as the importance of the first layer.
    을 더 수행하는 것을 특징으로 하는 컴퓨터 장치.A computer device characterized in that it further performs.
  14. 제13항에 있어서,According to claim 13,
    상기 중요도를 결정하기 위해, 상기 적어도 하나의 프로세서에 의해,To determine the importance, by the at least one processor,
    상기 레이어들 중 제2 레이어에 대해 상기 제1 과정 내지 상기 제4 과정을 반복 수행하는 제5 과정A fifth process of repeatedly performing the first to fourth processes on a second layer among the layers.
    을 더 수행하는 것을 특징으로 하는 컴퓨터 장치.A computer device characterized in that it further performs.
PCT/KR2021/012100 2021-09-07 2021-09-07 Method and system for optimizing deep-learning model through layer-by-layer lightening WO2023038159A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/KR2021/012100 WO2023038159A1 (en) 2021-09-07 2021-09-07 Method and system for optimizing deep-learning model through layer-by-layer lightening
KR1020227029392A KR102552478B1 (en) 2021-09-07 2021-09-07 Deep learning model optimization method and system through weight reduction by layer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/KR2021/012100 WO2023038159A1 (en) 2021-09-07 2021-09-07 Method and system for optimizing deep-learning model through layer-by-layer lightening

Publications (1)

Publication Number Publication Date
WO2023038159A1 true WO2023038159A1 (en) 2023-03-16

Family

ID=85506496

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/012100 WO2023038159A1 (en) 2021-09-07 2021-09-07 Method and system for optimizing deep-learning model through layer-by-layer lightening

Country Status (2)

Country Link
KR (1) KR102552478B1 (en)
WO (1) WO2023038159A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190018885A (en) * 2017-08-16 2019-02-26 에스케이하이닉스 주식회사 Method and device for pruning convolutional neural network
KR20200086581A (en) * 2019-01-09 2020-07-17 삼성전자주식회사 Method and apparatus for neural network quantization
KR102152374B1 (en) * 2019-02-25 2020-09-07 주식회사 딥엑스 Method and system for bit quantization of artificial neural network
KR20210032140A (en) * 2019-09-16 2021-03-24 삼성전자주식회사 Method and apparatus for performing pruning of neural network
KR20210039921A (en) * 2019-10-02 2021-04-12 한국전자통신연구원 Operation method of deep neural network system configured to optimize neural network model

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102608467B1 (en) 2016-07-28 2023-12-04 삼성전자주식회사 Method for lightening neural network and recognition method and apparatus using the same
KR102457463B1 (en) * 2017-01-16 2022-10-21 한국전자통신연구원 Compressed neural network system using sparse parameter and design method thereof
US20190050735A1 (en) * 2017-08-11 2019-02-14 Samsung Electronics Co., Ltd. Methods and algorithms of reducing computation for deep neural networks via pruning
KR102368447B1 (en) * 2019-09-24 2022-02-28 (주)인시그널 Compressing apparatus and method of trained deep artificial neural networks for video coding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190018885A (en) * 2017-08-16 2019-02-26 에스케이하이닉스 주식회사 Method and device for pruning convolutional neural network
KR20200086581A (en) * 2019-01-09 2020-07-17 삼성전자주식회사 Method and apparatus for neural network quantization
KR102152374B1 (en) * 2019-02-25 2020-09-07 주식회사 딥엑스 Method and system for bit quantization of artificial neural network
KR20210032140A (en) * 2019-09-16 2021-03-24 삼성전자주식회사 Method and apparatus for performing pruning of neural network
KR20210039921A (en) * 2019-10-02 2021-04-12 한국전자통신연구원 Operation method of deep neural network system configured to optimize neural network model

Also Published As

Publication number Publication date
KR102552478B1 (en) 2023-07-11
KR20230038636A (en) 2023-03-21

Similar Documents

Publication Publication Date Title
WO2018068421A1 (en) Method and device for optimizing neural network
CN108459964B (en) Test case selection method, device, equipment and computer readable storage medium
CN114580280A (en) Model quantization method, device, apparatus, computer program and storage medium
KR102169543B1 (en) Method for setting artificial intelligence execution model and system for acceleration a.i execution
WO2023038159A1 (en) Method and system for optimizing deep-learning model through layer-by-layer lightening
CN114781650A (en) Data processing method, device, equipment and storage medium
CN111385601B (en) Video auditing method, system and equipment
WO2020091139A1 (en) Effective network compression using simulation-guided iterative pruning
EP4020327A2 (en) Method and apparatus for training data processing model, electronic device and storage medium
US20220300784A1 (en) Computer-readable recording medium having stored therein machine-learning program, method for machine learning, and calculating machine
CN108008999B (en) Index evaluation method and device
KR20210124934A (en) Method and apparatus of training model, development system, electronic device, computer readable storage medium, and computer program
WO2023101079A1 (en) Method and system for restoring accuracy by modifying quantization model generated by compiler
JP4311741B2 (en) Information processing apparatus and information processing method
WO2023017885A1 (en) Method and system for changing resolution of feature map according to changes in input resolution
WO2023022255A1 (en) Method and system for lightening deep learning model using pruning
WO2021086486A1 (en) Neural network instruction streaming
CN111158898A (en) BIM data processing method and device aiming at power transmission and transformation project site arrangement standardization
US20220067236A1 (en) Physical system simulation
US11803988B2 (en) Method and apparatus for adaptive image compression with flexible hyperprior model by meta learning
CN116010370B (en) Digital business information processing method and server combined with edge calculation
TW202328984A (en) Control method and system based on layer-wise adaptive channel pruning
KR20230116583A (en) Method and apparatus for controlling neural networks
CN115329957A (en) Neural network quantification method and device and electronic equipment
CN113961962A (en) Model training method and system based on privacy protection and computer equipment

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

Country of ref document: EP

Kind code of ref document: A1