z[i, j, k] = b[k] + sum_u sum_v sum_kp x[ip, jp, kp] w[u, v, kp, k]
with ip = i * sh + u and jp = j * sw + v. This is a
cross-correlation, as the book's own footnote 6 on p. 419 points
out. Exported as morie_convlayer because morie_conv2d was already
taken by R/gp_ch13_15.R.
Usage
morie_convlayer(x, kernel, bias = NULL, stride = c(1, 1), padding = c(0, 0))
Arguments
- x
height by width by in-channels array
- kernel
fh by fw by in-channels by out-channels array
- bias
one entry per output feature map
- stride
c(sh, sw)
- padding
c(ph, pw) zero padding
Value
list(z, height, width, channels, total, maxz, nparams)