jax_privacy.clipping.ClippedGradOutput#
- class jax_privacy.clipping.ClippedGradOutput(gradient: Array | ndarray | bool | number | bool | int | float | complex | Iterable[TypeAliasForwardRef('optax.ArrayTree')] | Mapping[Any, TypeAliasForwardRef('optax.ArrayTree')], slack: Array)[source]#
Bases:
NamedTupleGradient and slack fields forming a single primary query.
Both fields must be privatized together before
slackis released.Create new instance of ClippedGradOutput(gradient, slack)
Methods
__init__countReturn number of occurrences of value.
indexReturn first index of value.
Attributes
-
gradient:
Union[Array,ndarray,bool,number,bool,int,float,complex,Iterable[Union[Array,ndarray,bool,number,bool,int,float,complex,Iterable[ArrayTree],Mapping[Any, ArrayTree]]],Mapping[Any,Union[Array,ndarray,bool,number,bool,int,float,complex,Iterable[ArrayTree],Mapping[Any, ArrayTree]]]]# Alias for field number 0
-
slack:
Array# Alias for field number 1
-
gradient: