mindspore/docs/api/api_python/ops/mindspore.ops.func_assign.rst

16 lines
402 B
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.assign
=====================
.. py:function:: mindspore.ops.assign(variable, value)
为网络参数或者tensor赋值。
支持隐式类型转换、类型提升。
参数:
- **variable** (Union[Parameter, Tensor]) - 输入的网络参数或者tensor。
- **value** (Tensor) - 要分配的值shape与 `variable` 相同。
返回:
Tensor