Skip to contents

Each convolution delegated to morie_geron_conv2d_forward.

Usage

morie_geron_fcn(image, model, upsample = 1, activation = "relu")

Arguments

image

(H,W) or (C,H,W).

model

List of kernel arrays or (kernels, bias, stride) triples.

upsample

Nearest-neighbour upsample factor.

activation

"relu"/"identity".

Value

List with class_map, scores, segmentation, out_shape, n_classes.

Examples

set.seed(2)
img <- array(rnorm(1 * 6 * 6), c(1, 6, 6))
K <- array(rnorm(2 * 1 * 3 * 3, 0, 0.3), c(2, 1, 3, 3))
r <- morie_geron_fcn(img, list(list(K, 0, 1L)))
str(r, max.level = 1)
#> List of 13
#>  $ class_map          : num [1:2, 1:4, 1:4] -0.172 -0.318 0.211 2.143 -0.854 ...
#>  $ scores             : num [1:2, 1:4, 1:4] -0.172 -0.318 0.211 2.143 -0.854 ...
#>  $ segmentation       : int [1:4, 1:4] 0 1 0 1 0 1 1 1 0 1 ...
#>  $ coarse_segmentation: int [1:4, 1:4] 0 1 0 1 0 1 1 1 0 1 ...
#>  $ out_shape          : int [1:3] 2 4 4
#>  $ upsampled_shape    : int [1:3] 2 4 4
#>  $ n_classes          : int 2
#>  $ receptive_field    : int 3
#>  $ stride_total       : int 1
#>  $ upsample           : int 1
#>  $ estimate           : num -0.208
#>  $ n                  : int 16
#>  $ method             : chr "fully convolutional forward pass; each convolution delegated to grcvf"