Enum DataType
Options for the data type of a Tensor.
Namespace: Unity.InferenceEngine
Assembly: Unity.InferenceEngine.dll
Syntax
[MovedFrom("Unity.Sentis")]
public enum DataType
Remarks
Pass a value from this enum to specify the element type of a tensor. Use Float or Int for most operations; these map directly to 32-bit storage. Short, Byte, and Custom are stored padded in an int32 buffer for alignment.
Examples
var input = Functional.Constant(new[] { 1.5f, 2.7f, 3.2f });
var result = Functional.Type(input, DataType.Int);
// result has integer elements: [1, 2, 3]
Fields
| Name | Description |
|---|---|
| Byte | 8-bit unsigned integer data, padded in an int32 buffer. |
| Custom | Raw n-bit field data, padded in an int32 buffer. |
| Float | 32-bit floating point data. |
| Int | 32-bit signed integer data. |
| Short | 16-bit signed integer data, padded in an int32 buffer. |