提交 e89ee631 编写于 作者: M Megvii Engine Team

docs(mge/functional): update copy example

GitOrigin-RevId: 4011332ba62c56a64f691f406cbdb957825a0433
上级 7655d99a
...@@ -1050,13 +1050,13 @@ def copy(inp, device=None): ...@@ -1050,13 +1050,13 @@ def copy(inp, device=None):
Examples: Examples:
>>> x = megengine.tensor([1, 2, 3], numpy.int32) >>> x = Tensor([1, 2, 3], numpy.int32)
Tensor([1 2 3], dtype=int32, device=xpux:0) Tensor([1 2 3], dtype=int32, device=xpux:0)
>>> megengine.functional.copy(x, 'cpu1') >>> F.copy(x, 'cpu1')
Tensor([1 2 3], dtype=int32, device=cpu1:0) Tensor([1 2 3], dtype=int32, device=cpu1:0)
>>> megengine.functional.copy(x, 'xpu0') >>> F.copy(x, 'xpu0')
Tensor([1 2 3], dtype=int32, device=xpu0:0) Tensor([1 2 3], dtype=int32, device=xpu0:0)
""" """
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册