Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OUCMachineLearning/OUCML
/ var2tensor
Function
var2tensor
GAN/self_attention _gan/utils.py:16–17 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
14
return
Variable(x, requires_grad=grad)
15
16
def
var2tensor(x):
17
return
x.data.cpu()
18
19
def
var2numpy(x):
20
return
x.data.cpu().numpy()
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected