# tensorplay.functional.clone Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.clone.html ```python tensorplay.functional.clone(input, *, memory_format=tensorplay.preserve_format) → Tensor ``` Returns a copy of input. > **Note** > > This function is differentiable, so gradients will flow back from the result of this operation to input. To create a tensor without an autograd relationship to input see detach(). In addition, when tensorplay.preserve_format is used: If the input tensor is dense (i.e., non-overlapping strided), its memory format (including strides) is retained. Otherwise (e.g., a non-dense view like a stepped slice), the output is converted to the dense (contiguous) format. Parameters: input ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – the input tensor. Keyword Arguments: memory_format ([tensorplay.memory_format](/docs/generated/tensorplay.MemoryFormat.html#tensorplay.MemoryFormat), optional) – the desired memory format of returned tensor. Default: tensorplay.preserve_format.