You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- <dfn>input</dfn>: an {{MLOperand}}. The input N-D tensor from which the values are gathered.
4472
4472
- <dfn>indices</dfn>: an {{MLOperand}}. The indices array contains entire coordinates into the input tensor, with the rightmost dimension holding the number of dimensions per coordinate. So an indices tensor of shape [10,1] holds 10 single-axis indices, and a shape of [4,3] holds 4 indices of 3D coordinates. The values must be of type {{MLOperandDataType/"int32"}}, {{MLOperandDataType/"uint32"}}, or {{MLOperandDataType/"int64"}}, and each must be in the range -N (inclusive) to N (exclusive) where N is the size of the corresponding input dimension, and a negative index means indexing from the end of the corresponding dimension.
**Returns:** an {{MLOperand}}. The output N-D tensor of [=MLOperand/rank=] equal to the *input*'s [=MLOperand/rank=] + *indices*'s [=MLOperand/rank=] - *indices*'s [=MLOperand/shape=][-1] - 1.
:: Support limits for operator {{MLGraphBuilder/gatherNd()}}.
4506
+
: <dfn>gatherND</dfn>
4507
+
:: Support limits for operator {{MLGraphBuilder/gatherND()}}.
4508
4508
</dl>
4509
4509
4510
4510
<div class="note">
4511
-
The {{MLGraphBuilder/gatherNd(input, indices, options)/indices}} parameter to {{MLGraphBuilder/gatherNd()}} can not be clamped to the allowed range when the graph is built because the inputs are not known until execution. Implementations can introduce {{MLGraphBuilder/clamp()}} in the compiled graph if the required clamping behavior is not provided by the underlying platform. Similarly, if the underlying platform does not support negative indices, the implementation can introduce operations in the compiled graph to transform a negative index from the end of the dimension into a positive index.
4511
+
The {{MLGraphBuilder/gatherND(input, indices, options)/indices}} parameter to {{MLGraphBuilder/gatherND()}} can not be clamped to the allowed range when the graph is built because the inputs are not known until execution. Implementations can introduce {{MLGraphBuilder/clamp()}} in the compiled graph if the required clamping behavior is not provided by the underlying platform. Similarly, if the underlying platform does not support negative indices, the implementation can introduce operations in the compiled graph to transform a negative index from the end of the dimension into a positive index.
4512
4512
</div>
4513
4513
4514
4514
<details open algorithm>
4515
4515
<summary>
4516
-
The <dfn method for=MLGraphBuilder>gatherNd(|input|, |indices|, |options|)</dfn> method steps are:
4516
+
The <dfn method for=MLGraphBuilder>gatherND(|input|, |indices|, |options|)</dfn> method steps are:
4517
4517
</summary>
4518
4518
1. If [=this=][=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}.
4519
4519
1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input| and |indices| returns false, then [=exception/throw=] a {{TypeError}}.
- <dfn>input</dfn>: an {{MLOperand}}. The input N-D tensor from to initialize the output with.
8485
8485
- <dfn>indices</dfn>: an {{MLOperand}}. The indices array contains entire coordinates into the output tensor, with the rightmost dimension holding the number of dimensions per coordinate. So an indices tensor of shape [10,1] holds 10 single-axis indices, and a shape of [4,3] holds 4 indices of 3D coordinates. The values must be of type {{MLOperandDataType/"int32"}}, {{MLOperandDataType/"uint32"}}, or {{MLOperandDataType/"int64"}}, and each must be in the range -N (inclusive) to N (exclusive) where N is the size of the corresponding output dimension, and a negative index means indexing from the end of the corresponding dimension.
**Returns:** an {{MLOperand}}. The output N-D tensor of [=MLOperand/rank=] equal to the [=MLOperand/rank=] of *input*'s [=MLOperand/rank=] + *indices*'s [=MLOperand/rank=] - *indices*'s [=MLOperand/shape=][-1] - 1.
:: Support limits for operator {{MLGraphBuilder/scatterNd()}}.
8525
+
: <dfn>scatterND</dfn>
8526
+
:: Support limits for operator {{MLGraphBuilder/scatterND()}}.
8527
8527
</dl>
8528
8528
8529
8529
<div class="note">
8530
-
The {{MLGraphBuilder/scatterNd(input, indices, updates, options)/indices}} parameter to {{MLGraphBuilder/scatterNd()}} can not be clamped to the allowed range when the graph is built because the inputs are not known until execution. Implementations can introduce {{MLGraphBuilder/clamp()}} in the compiled graph if the required clamping behavior is not provided by the underlying platform. Similarly, if the underlying platform does not support negative indices, the implementation can introduce operations in the compiled graph to transform a negative index from the end of the dimension into a positive index.
8530
+
The {{MLGraphBuilder/scatterND(input, indices, updates, options)/indices}} parameter to {{MLGraphBuilder/scatterND()}} can not be clamped to the allowed range when the graph is built because the inputs are not known until execution. Implementations can introduce {{MLGraphBuilder/clamp()}} in the compiled graph if the required clamping behavior is not provided by the underlying platform. Similarly, if the underlying platform does not support negative indices, the implementation can introduce operations in the compiled graph to transform a negative index from the end of the dimension into a positive index.
8531
8531
</div>
8532
8532
8533
8533
<details open algorithm>
8534
8534
<summary>
8535
-
The <dfn method for=MLGraphBuilder>scatterNd(|input|, |indices|, |updates|, |options|)</dfn> method steps are:
8535
+
The <dfn method for=MLGraphBuilder>scatterND(|input|, |indices|, |updates|, |options|)</dfn> method steps are:
8536
8536
</summary>
8537
8537
1. If [=this=][=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}.
8538
8538
1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input|, |indices|, and |updates| returns false, then [=exception/throw=] a {{TypeError}}.
0 commit comments