mindspore.Tensor.flush_from_cache

View Source On Gitee
Tensor.flush_from_cache()[source]

Flush cache data to host if tensor is cache enable.

Examples

>>> from mindspore import Tensor
>>> import numpy as np
>>> x = Tensor(np.array([1, 2], dtype=np.float32))
>>> y = x.flush_from_cache()
>>> print(y)
None