copy

dragon.copy(
  inputs,
  **kwargs
)[source]

Copy the value to ref.

\[\text{Ref}[:] = \text{Value}[:] \]

Examples:

# Copy the content from ``x`` to ``xx``
x = dragon.ones(shape=(2, 3))
xx = dragon.zeros(shape=(2, 4))
dragon.copy([xx, x])

# Create a new tensor initialized from ``x``
xxx = dragon.copy(x)
Parameters:
Returns:

dragon.Tensor – The ref.