mindspore.ops.Assign
- class mindspore.ops.Assign[source]
Assigns Parameter with a value.
Refer to
mindspore.ops.assign()
for more detail.- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> value = Tensor([2.0], mindspore.float32) >>> variable = mindspore.Parameter(Tensor([1.0], mindspore.float32), name="variable") >>> assign = ops.Assign() >>> output = assign(variable, value) >>> print(output) [2.]