Function arrayfire::gradient [] [src]

pub fn gradient(input: &Array) -> (Array, Array)

Calculate the gradients

The gradients along the first and second dimensions are calculated simultaneously.

Parameters

  • input is the input Array

Return Values

A tuple of Arrays.

The first Array is dx which is the gradient along the 1st dimension.

The second Array is dy which is the gradient along the 2nd dimension.