IMLOperatorKernelContext.GetOutputTensor method

Overloads

Name Description
GetOutputTensor(uint32_t, IMLOperatorTensor**) Gets the output tensor of the operator at the specified index.
GetOutputTensor(uint32_t, uint32_t, const uint32_t*, IMLOperatorTensor**) Gets the output tensor of the operator at the specified index, while declaring its shape.

GetOutputTensor(uint32_t, IMLOperatorTensor**)

Gets the output tensor of the operator at the specified index. This sets the tensor to nullptr for optional outputs which do not exist. If the operator kernel was registered without a shape inference method, then the overload of GetOutputTensor which consumes the tensor's shape must be called instead. Returns an error if the output at the specified index is not a tensor.

void GetOutputTensor(
    uint32_t outputIndex,
    _COM_Outptr_result_maybenull_ IMLOperatorTensor** tensor)

GetOutputTensor(uint32_t, uint32_t, const uint32_t*, IMLOperatorTensor**)

Gets the output tensor of the operator at the specified index, while declaring its shape. This returns nullptr for optional outputs which do not exist. If the operator kernel was registered with a shape inference method, then the overload of GetOutputTensor which doesn't consume a shape may also be called. Returns an error if the output at the specified index is not a tensor.

void GetOutputTensor(
    uint32_t outputIndex,
    uint32_t dimensionCount,
    _In_reads_(dimensionCount) const uint32_t* dimensionSizes,
    _COM_Outptr_result_maybenull_ IMLOperatorTensor** tensor)

Requirements

Requirement
Minimum supported client Windows 10, build 17763
Minimum supported server Windows Server 2019 with Desktop Experience
Header MLOperatorAuthor.h

Note

Use the following resources for help with Windows ML:

  • To ask or answer technical questions about Windows ML, please use the windows-machine-learning tag on Stack Overflow.
  • To report a bug, please file an issue on our GitHub.