$$
\begin{array}{ll}
\mbox{out}(N_i, C_j, d, h, w) = & \max_{k=0, \ldots, kD-1} \max_{m=0, \ldots, kH-1} \max_{n=0, \ldots, kW-1} \\
& \mbox{input}(N_i, C_j, \mbox{stride[0]} \times d + k, \mbox{stride[1]} \times h + m, \mbox{stride[2]} \times w + n)
\end{array}
$$
If padding
is non-zero, then the input is implicitly zero-padded on both sides
for padding
number of points. dilation
controls the spacing between the kernel points.
It is harder to describe, but this link
_ has a nice visualization of what dilation
does.
The parameters kernel_size
, stride
, padding
, dilation
can either be:
a single int
-- in which case the same value is used for the depth, height and width dimension
a tuple
of three ints -- in which case, the first int
is used for the depth dimension,
the second int
for the height dimension and the third int
for the width dimension