assign

dragon.assign(
  inputs,
  starts=None,
  sizes=None,
  **kwargs
)[source]

Assign the value to ref.

\[\text{Ref}[start:start + size, ...] = \text{Value} \]
Parameters:
  • inputs (Sequence[dragon.Tensor]) – The ref and value.
  • starts (Sequence[Union[int, dragon.Tensor]], optional) – The start pos of each dimension.
  • sizes (Sequence[Union[int, dragon.Tensor]], optional) – The size of each dimension.
Returns:

dragon.Tensor – The ref.