[src] Function arrayfire::gradient

pub fn gradient<T>(input: &Array<T>) -> ( Array<T>, Array<T>) where
T: HasAfEnum + FloatingPoint,

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.

AltStyle によって変換されたページ (->オリジナル) /