MCPcopy Create free account
hub / github.com/PythonOT/POT / set_gradients

Method set_gradients

ot/backend.py:286–288  ·  view source on GitHub ↗

Define the gradients for the value val wrt the inputs

(self, val, inputs, grads)

Source from the content-addressed store, hash-verified

284 raise NotImplementedError()
285
286 def set_gradients(self, val, inputs, grads):
287 """Define the gradients for the value val wrt the inputs"""
288 raise NotImplementedError()
289
290 def detach(self, *arrays):
291 """Detach the tensors from the computation graph

Callers 15

test_empty_backendFunction · 0.95
co_optimal_transport2Function · 0.45
solveFunction · 0.45
dmmot_monge_1dgrid_lossFunction · 0.45
fFunction · 0.45
gromov_wasserstein2Function · 0.45

Calls

no outgoing calls

Tested by 3

test_empty_backendFunction · 0.76
test_func_backendsFunction · 0.36
funFunction · 0.36