Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PythonOT/POT
/ grad_marg_tv
Function
grad_marg_tv
ot/unbalanced/_lbfgs.py:119–122 ·
view source on GitHub ↗
(G)
Source
from the content-addressed store, hash-verified
117
)
118
119
def
grad_marg_tv(G):
120
return
reg_m1 * np.outer(np.sign(G.sum(1) - a), np.ones(n)) + reg_m2 * np.outer(
121
np.ones(m), np.sign(G.sum(0) - b)
122
)
123
124
if
regm_div ==
"kl"
:
125
regm_fun = marg_kl
Callers
nothing calls this directly
Calls
4
outer
Method · 0.45
sign
Method · 0.45
sum
Method · 0.45
ones
Method · 0.45
Tested by
no test coverage detected