sponge.function.get_tensor

View Source On Gitee
sponge.function.get_tensor(value: Union[float, int, Tensor, Parameter, ndarray, List[float], Tuple[float]], dtype: type = None)[source]

get mindspore.Tensor type of the input value

Parameters
  • value (Union[float, int, Tensor, Parameter, ndarray, list, tuple]) – Input value

  • dtype (type) – Data type. Default: None.

Returns

tensor (Tensor)

Supported Platforms:

Ascend GPU CPU