tensor decomposition 간단한 설명

학습된 weight tensor를 더 작은 단위의 vector나 tensor의 곱이나 합의 조합으로 근사적으로 표현하는 것

 

저장해야하는 weight가 줄어들어 computation이 줄어드는 효과

 

 

1. CP decomposition

 

rank one tensor의 P개의 linear combination으로 주어진 tensor를 decomposition할 수 있다는 것

 

CP decomposition을 예시 그림으로 나타낸 것

 

 

convolution weight tensor x를 vector a,b,c의 outer product(=rank one tensor)의 linear combination(summation)으로 근사적으로 분해함

 

실제 network에 활용할 때는 일반적으로 full convolution이 image에 filter tensor를 convolution하여 하나의 component를 계산하는 것인데

 

filter를 CP decomposition을 수행하여 계산량을 감소시키고 빠르게 계산할 수 있다고함

 

 

 

논문에 나온 추가적인 설명을 첨부해봄

 

일반적인 full convolution은 수식으로 다음과 같다고 함

 

이 연산이 상당히 시간을 많이 소모하는 연산이라고 언급도 함

 

 

 

 

수식에서 $K(i - x + \delta, j - y + \delta, s, t)$를 CP decomposition하면 4개의 작은 kernel로 분해할 수 있다고함

 

 

 

각 kernel이 위 그림에서 어떤 kernel들과 매칭되는지 순서랑 모양을 표시했음

 

 

 

주어진 image를 1번으로 분할된 kernel에 convolution을 한 뒤에 얻은 결과를 2번으로 분할된 kernel과 convolution을 하고

 

이 결과를 3번으로 분할된 kernel과 convolution을 하고 이 결과를 4번으로 분할된 kernel과 convolution을 수행함

 

'딥러닝 > light weight modeling' 카테고리의 다른 글

network pruning이란  (0) 2024.08.18
MobileNet과 network decoupling  (0) 2024.08.18
network compiling 간단하게  (0) 2024.08.16
network quantization 간단하게  (0) 2024.08.16
knowledge distillation 간단하게  (0) 2024.08.15
TAGS.

Comments