Convert

Versioned name: Convert-1

Category: type conversion

Short description: Operation converts all elements of the input tensor to a type specified in the *"destination_type"* attribute.

Attributes:

Inputs

Outputs

Types

Detailed description

Conversion from one supported type to another supported type is always allowed. User must be aware of precision loss and value change caused by range difference between two types. For example, a 32-bit float 3.141592 may be round to a 32-bit int 3.

\[ o_{i} = convert(a_{i}) \]

Examples

Example 1

<layer ... type="Convert">
<data destination_type="f32"/>
<input>
<port id="0">
<dim>256</dim>
<dim>56</dim>
</port>
</input>
<output>
<port id="1">
<dim>256</dim>
<dim>56</dim>
</port>
</output>
</layer>