Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PythonOT/POT
/ grad
Function
grad
test/test_optim.py:154–155 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
152
return
nx.sum((x - 5.0) ** 2)
153
154
def
grad(x):
155
return
2 * (x - 5.0)
156
157
xk = nx.from_numpy(np.array([[[-5.0, -5.0]]]))
158
pk = nx.from_numpy(np.array([[[100.0, 100.0]]]))
Callers
3
empirical_sinkhorn2_geomloss
Function · 0.85
test_line_search_armijo
Function · 0.85
test_line_search_armijo_dtype_device
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected