TensorInt8Bit TensorInt8Bit TensorInt8Bit TensorInt8Bit TensorInt8Bit Class

Definition

An 8-bit signed integer tensor object.

public : sealed class TensorInt8Bit : ILearningModelFeatureValue, ITensor
struct winrt::Windows::AI::MachineLearning::TensorInt8Bit : ILearningModelFeatureValue, ITensor
public sealed class TensorInt8Bit : ILearningModelFeatureValue, ITensor
Public NotInheritable Class TensorInt8Bit Implements ILearningModelFeatureValue, ITensor
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

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

Remarks

A tensor is a multi-dimensional array of values. An 8-bit signed integer tensor is a tensor of 8-bit signed integer 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.

Version history

Windows version SDK version Value added
1903 18362 CreateFromBuffer
1903 18362 CreateFromShapeArrayAndDataArray

Properties

Kind Kind Kind Kind Kind

The kind of the feature.

Shape Shape Shape Shape Shape

Returns the count and size of each dimension.

TensorKind TensorKind TensorKind TensorKind TensorKind

Returns the data type of the tensor.

Methods

Close() Close() Close() Close() Close()

If there are no outstanding IMemoryBufferReference objects created from this object, Close will dispose of the object and destroy its associated resources. Otherwise, Close will detach itself from its associated resources and they will be destroyed when the last IMemoryBufferReference is closed.

Create() Create() Create() Create() Create()

Creates an 8-bit signed integer tensor object without allocating a buffer.

Create(IIterable<Int64>) Create(IIterable<Int64>) Create(IIterable<Int64>) Create(IIterable<Int64>) Create(IIterable<Int64>)

Creates an 8-bit signed integer tensor object and allocates a buffer of size shape.

CreateFromArray(IIterable<Int64>, Byte[]) CreateFromArray(IIterable<Int64>, Byte[]) CreateFromArray(IIterable<Int64>, Byte[]) CreateFromArray(IIterable<Int64>, Byte[]) CreateFromArray(IIterable<Int64>, Byte[])

Creates an 8-bit signed integer tensor object, allocates a buffer of size shape, and copies all of data into it.

CreateFromBuffer(Int64[], IBuffer) CreateFromBuffer(Int64[], IBuffer) CreateFromBuffer(Int64[], IBuffer) CreateFromBuffer(Int64[], IBuffer) CreateFromBuffer(Int64[], IBuffer)

Creates an 8-bit signed integer tensor object with the given shape and uses the underlying buffer in buffer for subsequent evaluation.

CreateFromIterable(IIterable<Int64>, IIterable<Byte>) CreateFromIterable(IIterable<Int64>, IIterable<Byte>) CreateFromIterable(IIterable<Int64>, IIterable<Byte>) CreateFromIterable(IIterable<Int64>, IIterable<Byte>) CreateFromIterable(IIterable<Int64>, IIterable<Byte>)

Creates an 8-bit signed integer tensor object, allocates a buffer of size shape, and copies all of data into it.

CreateFromShapeArrayAndDataArray(Int64[], Byte[]) CreateFromShapeArrayAndDataArray(Int64[], Byte[]) CreateFromShapeArrayAndDataArray(Int64[], Byte[]) CreateFromShapeArrayAndDataArray(Int64[], Byte[]) CreateFromShapeArrayAndDataArray(Int64[], Byte[])

Creates an 8-bit signed integer tensor object, allocates a buffer of size shape, and copies all of data into it.

CreateReference() CreateReference() CreateReference() CreateReference() CreateReference()

Returns an IMemoryBufferReference representation of the buffer backing the 8-bit signed integer tensor object.

GetAsVectorView() GetAsVectorView() GetAsVectorView() GetAsVectorView() GetAsVectorView()

Returns a read-only view of the data.

See also