You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
##Why does the variable become a placeholder mindspore.common._stub_tensor.StubTensor after calculating with ops.mul, and how can I convert it back to a regular mindspore.common.tensor.Tensor?
The text was updated successfully, but these errors were encountered:
This StubTensor doesn't actually need to be converted into a Tensor. It can be used as a Tensor during the process, and the framework will handle it internally. StubTensor is designed as a data type for host asynchronous dispatching in dynamic graphs. Apart from the difference in type, it functions the same as a Tensor. The main purpose of StubTensor is to reduce the overhead on the host side and solve the conversion overhead between Python and native.
If an error occurs, it may be caused by other reasons. You can enable the synchronous mode of the dynamic graph in the context, which might provide more accurate and detailed information.
Environment
Hardware Environment(
Ascend
):Software Environment:
mindspore == 2.3.0
python == 3.10.0
##Why does the variable become a placeholder


mindspore.common._stub_tensor.StubTensor
after calculating withops.mul
, and how can I convert it back to a regularmindspore.common.tensor.Tensor
?The text was updated successfully, but these errors were encountered: