Skip to content

Commit f61c5cf

Browse files
committed
update
1 parent c4bb30f commit f61c5cf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/api/paddle/Tensor_cn.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,13 @@ is_cuda
335335
如果 Tensor 存储在 GPU 上,则为 True,否则为 False。
336336

337337
**代码示例**
338-
COPY-FROM: paddle.Tensor.is_cuda
338+
339+
.. code-block:: python
340+
341+
import paddle
342+
d = torch.Tensor([1,2,3])
343+
d.is_cuda
344+
339345
340346
numpy()
341347
:::::::::

0 commit comments

Comments
 (0)