Scan#

Scan - 8#

Version

  • name: Scan (GitHub)

  • domain: main

  • since_version: 8

  • function:

  • support_level: SupportType.COMMON

  • shape inference: True

This version of the operator has been available since version 8.

Summary

Attributes

  • body - GRAPH (required) : The graph run each iteration. It has N+M inputs: (loop state variables…, scan_input_elts…). It has N+K outputs: (loop state variables…, scan_output_elts…). Each scan_output is created by concatenating the value of the specified scan_output_elt value at the end of each iteration of the loop. It is an error if the dimensions of these values change across loop iterations.

  • directions - INTS : An optional list of M flags. The i-th element of the list specifies the direction to be scanned for the i-th scan_input tensor: 0 indicates forward direction and 1 indicates reverse direction. If omitted, all scan_input tensors will be scanned in the forward direction.

  • num_scan_inputs - INT (required) : An attribute specifying the number of scan_inputs M.

Inputs

Between 2 and 2147483647 inputs.

  • sequence_lens (optional, heterogeneous) - I:

  • initial_state_and_scan_inputs (variadic) - V:

Outputs

Between 1 and 2147483647 outputs.

  • final_state_and_scan_outputs (variadic) - V:

Type Constraints

  • I in ( tensor(int64) ): Int64 tensor

  • V in ( tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) ): All Tensor types