Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/pytorch
/ getGradientForOp
Function
getGradientForOp
caffe2/python/gradient_checker.py:15–17 ·
view source on GitHub ↗
(op)
Source
from the content-addressed store, hash-verified
13
14
15
def
getGradientForOp(op):
16
return
core.GradientRegistry.GetGradientForOp(
17
op, [s +
'_grad'
for
s in op.output])
18
19
20
def
_get_grad_blob(grad_map, input_to_check):
Callers
1
CheckSimple
Method · 0.85
Calls
1
GetGradientForOp
Method · 0.80
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…