필터 지우기
필터 지우기

Sum -pooling

조회 수: 4 (최근 30일)
C N N
C N N 2012년 1월 21일
답변: Lorenzo Farina 2023년 1월 3일
Does anyone know how to do sum-pooling in MATLAB? I need to use it for multi-class SVM?
Would appreciate any help..

답변 (1개)

Lorenzo Farina
Lorenzo Farina 2023년 1월 3일
I think it could be a good way-around using the average pooling built-in function and then multipliying by the size of the pooling kernel ('Stride').
Here's an example having X as 1D array and applying an average pooling with N-cells stride.
N=4;
X= [1,2,3,4,5,6,7,8,9,10,11,12]
X = 1×12
1 2 3 4 5 6 7 8 9 10 11 12
X_dl= dlarray(X,'S');
Y_dl= avgpool(X_dl,N,'Stride',N);
Y_avg_pooling= extractdata(Y_dl);
Y_sum_pooling= (Y_avg_pooling*N)'
Y_sum_pooling = 1×3
10 26 42

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by