Skip to contents

z = GAP(X); s = sigmoid(W2 relu(W1 z)); Y = s * X per channel – sigmoid, not softmax, so channels are gated independently.

Usage

morie_geron_senet_squeeze_excite(X, W1, W2)

Arguments

X

(H, W, C) feature map.

W1

(bottleneck, C) squeeze weights.

W2

(C, bottleneck) excite weights.

Value

List with output, scale, squeeze, hidden, reduction_ratio.

Examples

set.seed(4)
X <- array(rnorm(4 * 4 * 3), c(4, 4, 3))
r <- morie_geron_senet_squeeze_excite(X, W1 = matrix(0.3, 2, 3),
                                      W2 = matrix(0.3, 3, 2))
r$scale
#> [1] 0.5359777 0.5359777 0.5359777