TensorKind Enum
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
定义支持的张量数据类型的列表。
public enum class TensorKind
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.MachineLearningContract, 65536)]
enum class TensorKind
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.MachineLearningContract), 65536)]
public enum TensorKind
var value = Windows.AI.MachineLearning.TensorKind.undefined
Public Enum TensorKind
- 继承
-
TensorKind
- 属性
Windows 要求
| 设备系列 |
Windows 10, version 1809 (在 10.0.17763.0 中引入)
|
| API contract |
Windows.AI.MachineLearning.MachineLearningContract (在 v1.0 中引入)
|
字段
| 名称 | 值 | 说明 |
|---|---|---|
| Boolean | 9 | 张量类型为 布尔值。 |
| Complex128 | 15 | 类型无效。 |
| Complex64 | 14 | 类型无效。 |
| Double | 11 | 张量类型为 64 位浮点。 |
| Float | 1 | 张量类型是 32 位浮点。 |
| Float16 | 10 | 张量类型为 16 位浮点。 |
| Int16 | 5 | 张量类型是 16 位有符号整数。 |
| Int32 | 6 | 张量类型是 32 位带符号整数。 |
| Int64 | 7 | 张量类型是 64 位有符号整数。 |
| Int8 | 3 | 张量类型是 8 位有符号整数。 |
| String | 8 | 张量类型为 String。 |
| UInt16 | 4 | 张量类型是 16 位无符号整数。 |
| UInt32 | 12 | 张量类型是 32 位无符号整数。 |
| UInt64 | 13 | 张量类型是 64 位无符号整数。 |
| UInt8 | 2 | 张量类型为 8 位无符号整数。 |
| Undefined | 0 | 类型无效。 |
注解
张量是值的多维数组。
张量布局按行为主,紧密包装的连续数据表示每个维度。 张量的总大小是每个维度大小的乘积。
Windows Server
若要在 Windows Server 上使用此 API,必须使用具有桌面体验的 Windows Server 2019。
线程安全
此 API 是线程安全的。