set_data_type

Applicable Products

All processors

Function Usage

Sets the data type of a tensor into TensorDesc.

Prototype

1
set_data_type(data_type: DataType) -> TensorDesc

Parameters

Parameter

Input/Output

Description

data_type

Input

Data type of the tensor to be set.

Returns

(TensorDesc) Returns itself to support chain calls.

Restrictions

If data_type is not of the DataType type, TypeError is thrown.