We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0178442 commit f5c2946Copy full SHA for f5c2946
examples/simple/vectoradd_jax/tesseract_api.py
@@ -69,7 +69,7 @@ def apply_jit(inputs: dict) -> dict:
69
def safe_norm(x, ord):
70
# Compute the norm of a vector, adding a small epsilon to ensure
71
# differentiability and avoid division by zero
72
- return jnp.power(jnp.power(x, ord).sum() + 1e-8, 1 / ord)
+ return jnp.power(jnp.power(jnp.abs(x), ord).sum() + 1e-8, 1 / ord)
73
74
return {
75
"vector_add": {
0 commit comments