parameters: (self, device)
return_statement: return apply(Copy(comp_node=cn), self)[0]
docstring: r"""Copy self :class:`~.Tensor` to specified device. See :func:`~.copy`
docstring_summary: r"""Copy self :class:`~.Tensor` to specified device. See :func:`~.copy`
docstring_tokens: r Copy self : class : ~ . Tensor to specified device . See : func : ~ . copy
function: def to(self, device):
          r"""Copy self :class:`~.Tensor` to specified device. See :func:`~.copy`"""
          if isinstance(device, str) and not _valid_device(device):
              raise ValueError(
                  "invalid device name {}. For the correct format of the device name, please refer to the instruction of megengine.device.set_default_device()".format(
                      device
                  )
              )
          cn = as_device(device).to_c()
          return apply(Copy(comp_node=cn), self)[0]
function_tokens: def to ( self , device ) : if isinstance ( device , str ) and not _valid_device ( device ) : raise ValueError ( "invalid device name {}. For the correct format of the device name, please refer to the instruction of megengine.device.set_default_device()" . format ( device ) ) cn = as_device ( device ) . to_c ( ) return apply ( Copy ( comp_node = cn ) , self ) [ 0 ]