Skip to contents

argmax_indices are 0-based positions inside the ROW-MAJOR flattened window, matching numpy's argmax on a C-ordered slice.

Usage

morie_geron_max_pooling(X, k = 2, stride = NULL)

Arguments

X

(H, W) map.

k

Window side.

stride

Defaults to k.

Value

List with output, output_shape, argmax_indices, reduction_factor.

Examples

M <- matrix(c(1, 2, 3, 4, 5, 6), nrow = 2)
morie_geron_max_pooling(M)
#> $output
#>      [,1]
#> [1,]    4
#> 
#> $output_shape
#> [1] 1 1
#> 
#> $argmax_indices
#>      [,1]
#> [1,]    3
#> 
#> $reduction_factor
#> [1] 6
#> 
#> $k
#> [1] 2
#> 
#> $stride
#> [1] 2
#> 
#> $estimate
#>      [,1]
#> [1,]    4
#> 
#> $n
#> [1] 1
#>