MCPcopy 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
46def tensor_numpy(x):
47 x = paddle.to_tensor(x)
48 x.clear_gradient()
49 return x
50
51
52class TestTensorDygraphOnlyMethodError(Dy2StTestBase):

Callers

nothing calls this directly

Calls 2

to_tensorMethod · 0.80
clear_gradientMethod · 0.80

Tested by

no test coverage detected