Quiz - DL HW: Week 02 - 1 아래와 같은 convolutional layer에 대해 다음을 구하시오. Layer structure Input…
- User
Quiz - DL HW: Week 02 - 1
아래와 같은 convolutional layer에 대해 다음을 구하시오.
Layer structure Input Weight Layer name Stride Padding Dim (wi, hi) #In.Ch (ci) Dim (kh, kw) #In.Ch (ci) #Out.Ch (co) Conv 2 Valid 11x11 5 3x3 5 10 -
필요한 MAC operation 수와 parameter 개수를 구하시오.
-
위 결과를 기반으로 FLOPs와 input/output activation size 및 model size를 구하시오 (32-bit input/weights, 1MAC=2FLOPs로 가정).
-
- Assistant
- 필요한 MAC (Multiply-Accumulate) operation 수와 parameter 개수 구하기:
MAC operation 수:
- 활성화 맵(activation map)의 각 위치에서의 MAC는 커널의 차원에 입력 채널 수만큼 곱한 값과 같습니다. 즉, ( kh \times kw \times ci ).
- 각 출력 채널에 대해 이런 연산이 수행됩니다. 따라서, 각 위치에서의 MAC는 ( kh \times kw \times ci \times co ).
- 활성화 맵의 크기는 ( \left \lfloor{\frac{wi-kw}{stride} + 1}\right \rfloor \times \left \lfloor{\frac{hi-kh}{stride} + 1}\right \rfloor ).
Stride가 2이고 패딩이 없으므로(Valid 패딩), 활성화 맵의 크기는: ( \left \lfloor{\frac{11-3}{2} + 1}\right \rfloor \times \left \lfloor{\frac{11-3}{2} + 1}\right \rfloor ) = ( \left \lfloor{\frac{8}{2} + 1}\right \rfloor \times \left \lfloor{\frac{8}{2} + 1}\right \rfloor ) = ( 5 \times 5 )
- User
Quiz - DL HW: Week 02 - 1
아래와 같은 convolutional layer에 대해 다음을 구하시오.
Layer structure Input Weight Layer name Stride Padding Dim (wi, hi) #In.Ch (ci) Dim (kh, kw) #In.Ch (ci) #Out.Ch (co) Conv 2 Valid 11x11 5 3x3 5 10 -
필요한 MAC operation 수와 parameter 개수를 구하시오.
-
위 결과를 기반으로 FLOPs와 input/output activation size 및 model size를 구하시오 (32-bit input/weights, 1MAC=2FLOPs로 가정).
-
2번에서 구한 값을 이용하여 T_memory와 T_computation을 구하시오 (프로세서: 100 TOPS, 메모리: 2 TB/s 가정)
-
- Assistant