calcPartialDerivatives

Calculate partial derivatives of an slice.

Partial derivatives are calculated by convolving an slice with [-1, 1] kernel, horizontally and vertically.

void
calcPartialDerivatives
(
InputTensor
V = DeepElementType!InputTensor
)
(
InputTensor input
,
ref Slice!(Contiguous, [2], V*) fx
,
ref Slice!(Contiguous, [2], V*) fy
,
TaskPool pool = taskPool
)
if (
isFloatingPoint!V
)
in { static assert (isSlice!InputTensor, "Invalid input tensor type - has to be of type mir.ndslice.slice.Slice."); static assert (InputTensor.init.shape.length == 2, "Input tensor has to be 2 dimensional. (matrix)"); }

Meta