TensorKind TensorKind TensorKind TensorKind TensorKind Enum


Defines the list of supported tensor data types.

public : enum class TensorKind
enum class winrt::Windows::AI::MachineLearning::TensorKind : int32_t
public enum TensorKind
Public Enum TensorKind
var value = Windows.AI.MachineLearning.TensorKind.boolean;

Windows 10 requirements

Device family
Windows 10, version 1809 (introduced v10.0.17763.0)
API contract
Windows.AI.MachineLearning.MachineLearningContract (introduced v1)


Boolean Boolean Boolean Boolean Boolean 9

The tensor type is Boolean.

Complex128 Complex128 Complex128 Complex128 Complex128 15

Invalid type.

Complex64 Complex64 Complex64 Complex64 Complex64 14

Invalid type.

Double Double Double Double Double 11

The tensor type is 64-bit floating point.

Float Float Float Float Float 1

The tensor type is 32-bit floating point.

Float16 Float16 Float16 Float16 Float16 10

The tensor type is 16-bit floating point.

Int16 Int16 Int16 Int16 Int16 5

The tensor type is 16-bit signed integer.

Int32 Int32 Int32 Int32 Int32 6

The tensor type is 32-bit signed integer.

Int64 Int64 Int64 Int64 Int64 7

The tensor type is 64-bit signed integer.

Int8 Int8 Int8 Int8 Int8 3

The tensor type is 8-bit signed integer.

String String String String String 8

The tensor type is String.

UInt16 UInt16 UInt16 UInt16 UInt16 4

The tensor type is 16-bit unsigned integer.

UInt32 UInt32 UInt32 UInt32 UInt32 12

The tensor type is 32-bit unsigned integer.

UInt64 UInt64 UInt64 UInt64 UInt64 13

The tensor type is 64-bit unsigned integer.

UInt8 UInt8 UInt8 UInt8 UInt8 2

The tensor type is 8-bit unsigned integer.

Undefined Undefined Undefined Undefined Undefined 0

Invalid type.


A tensor is a multi-dimensional array of values.

The layout of tensors is row-major, with tightly packed contiguous data representing each dimension. The total size of a tensor is the product of the size of each dimension.

Windows Server

To use this API on Windows Server, you must use Windows Server 2019 with Desktop Experience.

Thread safety

This API is thread-safe.

See also