requires_gradient#
- ivy.requires_gradient(x)[source]#
Check if gradient computation is enabled for the given array.
- Parameters:
x (
Union[Array,NativeArray]) – Array to check whether it requires gradient computation.- Return type:
bool- Returns:
ret – A boolean indicating whether gradient computation is enabled for the input array.