Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PaddlePaddle/Paddle
/ tensor_numpy
Function
tensor_numpy
test/dygraph_to_static/test_tensor_methods.py:46–49 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
44
45
46
def
tensor_numpy(x):
47
x = paddle.to_tensor(x)
48
x.clear_gradient()
49
return
x
50
51
52
class
TestTensorDygraphOnlyMethodError(Dy2StTestBase):
Callers
nothing calls this directly
Calls
2
to_tensor
Method · 0.80
clear_gradient
Method · 0.80
Tested by
no test coverage detected