MCPcopy Create free account
hub / github.com/pytorch/pytorch / f_grad

Method f_grad

test/test_proxy_tensor.py:406–408  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

404
405 def test_proxy_tensor(self):
406 def f_grad(x):
407 val = x.cos().cos().sum()
408 return torch.autograd.grad(val, x)
409
410 def f_backward(x):
411 val = x.cos().cos().sum()

Callers

nothing calls this directly

Calls 3

gradMethod · 0.80
sumMethod · 0.45
cosMethod · 0.45

Tested by

no test coverage detected