DML_ELEMENT_WISE_DIFFERENCE_SQUARE_OPERATOR_DESC structure (directml.h)
Subtracts each element of BTensor from the corresponding element of ATensor, multiplies the result by itself, and places the result into the corresponding element of OutputTensor.
f(a, b) = (a - b) * (a - b)
This operator supports in-place execution, meaning that OutputTensor is permitted to alias ATensor or BTensor during binding.
struct DML_ELEMENT_WISE_DIFFERENCE_SQUARE_OPERATOR_DESC {
const DML_TENSOR_DESC *ATensor;
const DML_TENSOR_DESC *BTensor;
const DML_TENSOR_DESC *OutputTensor;
};
ATensor
Type: const DML_TENSOR_DESC*
A tensor containing the left-hand side inputs.
BTensor
Type: const DML_TENSOR_DESC*
A tensor containing the right-hand side inputs.
OutputTensor
Type: const DML_TENSOR_DESC*
The output tensor to write the results to.
This operator was introduced in DML_FEATURE_LEVEL_3_1
.
ATensor, BTensor, and OutputTensor must have the same DataType, DimensionCount, and Sizes.
Tensor | Kind | Supported dimension counts | Supported data types |
---|---|---|---|
ATensor | Input | 1 to 8 | FLOAT32, FLOAT16, INT32, UINT32 |
BTensor | Input | 1 to 8 | FLOAT32, FLOAT16, INT32, UINT32 |
OutputTensor | Output | 1 to 8 | FLOAT32, FLOAT16, INT32, UINT32 |
Requirement | Value |
---|---|
Minimum supported client | Windows Build 22000 |
Minimum supported server | Windows Build 22000 |
Header | directml.h |