ZeroFraction ============ Returns the fraction of zeros in value. **Abstract Signature:** ``ZeroFraction(value: Tensor)`` .. raw:: html

PyTorch

API:
Strategy: Macro 'torch.mean(({value} == 0).float())'

JAX (Core)

API:
Strategy: Macro 'jnp.mean({value} == 0)'

NumPy

API:
Strategy: Macro 'np.mean({value} == 0)'

TensorFlow

API: tf.math.zero_fraction
Strategy: Direct Mapping

Apple MLX

API:
Strategy: Macro 'mx.mean({value} == 0)'

Flax NNX

API:
Strategy: Macro 'jnp.mean({value} == 0)'

PaxML / Praxis

API:
Strategy: Macro 'jnp.mean({value} == 0)'