MCPcopy Create free account
hub / github.com/ml-explore/mlx / func

Method func

python/tests/test_ops.py:1133–1134  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

1131
1132 def test_stop_gradient(self):
1133 def func(x):
1134 return mx.sum(2 * x + mx.stop_gradient(3 * x))
1135
1136 x = mx.array([0.0, 0.1, -3])
1137 expected = [2, 2, 2]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected