Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/dmlc/dgl
/ clone_detach_and_grad
Function
clone_detach_and_grad
tests/python/pytorch/sparse/utils.py:10–13 ·
view source on GitHub ↗
(t)
Source
from the content-addressed store, hash-verified
8
9
10
def
clone_detach_and_grad(t):
11
t = t.clone().detach()
12
t.requires_grad_()
13
return
t
14
15
16
def
rand_stride(t):
Callers
5
sparse_matrix_to_dense
Function · 0.85
test_sddmm
Function · 0.85
test_bsddmm
Function · 0.85
test_spmm
Function · 0.85
test_bspmm
Function · 0.85
Calls
1
clone
Method · 0.45
Tested by
4
test_sddmm
Function · 0.68
test_bsddmm
Function · 0.68
test_spmm
Function · 0.68
test_bspmm
Function · 0.68