TensorFloat 클래스

정의

32비트 float 텐서 개체입니다.

public ref class TensorFloat sealed : ITensor
public ref class TensorFloat sealed : ITensor, IClosable, IMemoryBuffer
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.MachineLearningContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TensorFloat final : ITensor
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.MachineLearningContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TensorFloat final : ITensor, IClosable, IMemoryBuffer
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.MachineLearningContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TensorFloat : ITensor
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.MachineLearningContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TensorFloat : System.IDisposable, ITensor, IMemoryBuffer
Public NotInheritable Class TensorFloat
Implements ITensor
Public NotInheritable Class TensorFloat
Implements IDisposable, IMemoryBuffer, ITensor
상속
Object Platform::Object IInspectable TensorFloat
특성
구현

Windows 요구 사항

디바이스 패밀리
Windows 10, version 1809 (10.0.17763.0에서 도입되었습니다.)
API contract
Windows.AI.MachineLearning.MachineLearningContract (v1.0에서 도입되었습니다.)

예제

코드 예제는 ImageFeatureValue를 참조하세요. 해당 항목의 코드 예제는 세션 및 바인딩을 만들고 입력 이미지를 바인딩한 다음 생성된 TensorFloat에 출력을 바인딩합니다.

설명

텐서 는 값의 다차원 배열입니다. float 텐서 는 32비트 부동 소수점 값의 텐서입니다.

텐서의 레이아웃은 행 중심이며 각 차원을 나타내는 연속 데이터가 밀접하게 압축되어 있습니다. 텐서의 총 크기는 각 차원 크기의 곱입니다.

Windows Server

Windows Server에서 이 API를 사용하려면 데스크톱 환경에서 Windows Server 2019를 사용해야 합니다.

스레드로부터의 안전성

이 API는 스레드로부터 안전합니다.

버전 기록

Windows 버전 SDK 버전 추가된 값
1903 18362 CreateFromBuffer
1903 18362 CreateFromShapeArrayAndDataArray

속성

Kind

기능과 연결된 Kind를 반환합니다.

Shape

각 차원의 개수와 크기를 반환합니다.

TensorKind

텐서의 데이터 형식을 반환합니다.

메서드

Close()

이 개체에서 만든 미해결 IMemoryBufferReference 개체가 없는 경우 Close 는 개체를 삭제하고 연결된 리소스를 삭제합니다. 그렇지 않으면 Close 가 연결된 리소스에서 자체적으로 분리되고 마지막 IMemoryBufferReference 가 닫히면 제거됩니다.

Create()

버퍼를 할당하지 않고 32비트 float 텐서 개체를 만듭니다.

Create(IIterable<Int64>)

32비트 float 텐서 개체를 만들고 크기 셰이프의 버퍼를 할당합니다.

CreateFromArray(IIterable<Int64>, Single[])

32비트 float 텐서 개체를 만들고, 셰이 크기의 버퍼를 할당하고, 모든 데이터를 복사합니다.

CreateFromBuffer(Int64[], IBuffer)

지정된 셰이 프를 사용하여 float 텐서 개체를 만들고 후속 평가를 위해 데이터의 기본 버퍼를 사용합니다.

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

32비트 float 텐서 개체를 만들고, 셰이 크기의 버퍼를 할당하고, 모든 데이터를 복사합니다.

CreateFromShapeArrayAndDataArray(Int64[], Single[])

32비트 float 텐서 개체를 만들고, 셰이 크기의 버퍼를 할당하고, 모든 데이터를 복사합니다.

CreateReference()

32비트 float 텐서 개체를 지원하는 버퍼의 IMemoryBufferReference 표현을 반환합니다.

Dispose()

관리되지 않는 리소스의 확보, 해제 또는 다시 설정과 관련된 애플리케이션 정의 작업을 수행합니다.

GetAsVectorView()

데이터의 읽기 전용 보기를 반환합니다.

적용 대상

추가 정보