Files
openvino/docs/ops/movement/ScatterNDUpdate_3.md
Nikolay Tyukaev ef45b5da8d Doc Migration (master) (#1377)
* Doc Migration from Gitlab (#1289)

* doc migration

* fix

* Update FakeQuantize_1.md

* Update performance_benchmarks.md

* Updates graphs for FPGA

* Update performance_benchmarks.md

* Change DL Workbench structure (#1)

* Changed DL Workbench structure

* Fixed tags

* fixes

* Update ie_docs.xml

* Update performance_benchmarks_faq.md

* Fixes in DL Workbench layout

* Fixes for CVS-31290

* [DL Workbench] Minor correction

* Fix for CVS-30955

* Added nGraph deprecation notice as requested by Zoe

* fix broken links in api doxy layouts

* CVS-31131 fixes

* Additional fixes

* Fixed POT TOC

* Update PAC_Configure.md

PAC DCP 1.2.1 install guide.

* Update inference_engine_intro.md

* fix broken link

* Update opset.md

* fix

* added opset4 to layout

* added new opsets to layout, set labels for them

* Update VisionAcceleratorFPGA_Configure.md

Updated from 2020.3 to 2020.4

Co-authored-by: domi2000 <domi2000@users.noreply.github.com>
2020-07-20 17:36:08 +03:00

3.3 KiB

ScatterNDUpdate

Versioned name: ScatterNDUpdate-3

Category: Data movement operations

Short description: Creates a copy of the first input tensor with updated elements specified with second and third input tensors. This is similar to Reference

Detailed description: The operation produces a copy of data tensor and updates its value to values specified by updates at specific index positions specified by indices. The output shape is the same as the shape of data. indices tensor must not have duplicate entries. In case duplicate entries in indices the result is undefined.

The last dimension of indices can be at most the rank of data.shape. The last dimension of indices corresponds to indices into elements if indices.shape[-1] = data.shape.rank or slices if indices.shape[-1] < data.shape.rank. updates is a tensor with shape indices.shape[:-1] + data.shape[indices.shape[-1]:]

Example 1 that shows update of four single elements in data:

data    = [1, 2, 3, 4, 5, 6, 7, 8]
indices = [[4], [3], [1], [7]]
updates = [9, 10, 11, 12]
output  = [1, 11, 3, 10, 9, 6, 7, 12]

Example 2 that shows update of two slices of 4x4 shape in data:

data    = [[[1, 2, 3, 4], [5, 6, 7, 8], [8, 7, 6, 5], [4, 3, 2, 1]],
           [[1, 2, 3, 4], [5, 6, 7, 8], [8, 7, 6, 5], [4, 3, 2, 1]],
           [[8, 7, 6, 5], [4, 3, 2, 1], [1, 2, 3, 4], [5, 6, 7, 8]],
           [[8, 7, 6, 5], [4, 3, 2, 1], [1, 2, 3, 4], [5, 6, 7, 8]]]
indices = [[0], [2]]
updates = [[[5, 5, 5, 5], [6, 6, 6, 6], [7, 7, 7, 7], [8, 8, 8, 8]],
           [[1, 1, 1, 1], [2, 2, 2, 2], [3, 3, 3, 3], [4, 4, 4, 4]]]
output  = [[[5, 5, 5, 5], [6, 6, 6, 6], [7, 7, 7, 7], [8, 8, 8, 8]],
           [[1, 2, 3, 4], [5, 6, 7, 8], [8, 7, 6, 5], [4, 3, 2, 1]],
           [[1, 1, 1, 1], [2, 2, 2, 2], [3, 3, 3, 3], [4, 4, 4, 4]],
           [[8, 7, 6, 5], [4, 3, 2, 1], [1, 2, 3, 4], [5, 6, 7, 8]]]

Attributes: ScatterNDUpdate does not have attributes.

Inputs:

  • 1: data tensor of arbitrary rank r >= 1 and of type T. Required.

  • 2: indices tensor with indices of arbitrary rank q >= 1 and of type T_IND. All index values i_j in index entry (i_0, i_1, ...,i_k) (where k = indices.shape[-1]) must be within bounds [0, s_j - 1] where s_j = data.shape[j]. k must be at most r. Required.

  • 3: updates tensor of rank r - indices.shape[-1] + q - 1 of type T. Required.

Outputs:

  • 1: tensor with shape equal to data tensor of the type T.

Types

  • T: any supported type.

  • T_IND: any supported integer types.

Example

<layer ... type="ScatterNDUpdate">
    <input>
        <port id="0">
            <dim>1000</dim>
            <dim>256</dim>
            <dim>10</dim>
            <dim>15</dim>
        </port>
        <port id="1">
            <dim>25</dim>
            <dim>125</dim>
            <dim>3</dim>
        </port>
        <port id="2">
            <dim>25</dim>
            <dim>125</dim>
            <dim>15</dim>
        </port>
    </input>
    <output>
        <port id="3">
            <dim>1000</dim>
            <dim>256</dim>
            <dim>10</dim>
            <dim>15</dim>
        </port>
    </output>
</layer>