represents a net that reverses the order of an input sequence.

Details and Options

  • SequenceReverseLayer[] represents a net that takes a sequence of arrays and outputs a sequence of the same length.
  • SequenceReverseLayer[][input] explicitly computes the output from applying the layer.
  • SequenceReverseLayer[][{input1,input2,}] explicitly computes an output for each of the inputi.
  • When given a NumericArray as input, the output will be a NumericArray.
  • SequenceReverseLayer is typically used inside NetChain, NetGraph, etc.
  • The input and output ports of the net represented by SequenceReverseLayer[] are:
  • "Input"a sequence of n arrays
    "Output"a sequence of n arrays
  • SequenceReverseLayer["Input"shape] allows the shape of the input to be specified. Possible forms for shape are:
  • na sequence of n numbers
    "Varying"a sequence of numbers of varying length
    {len,d1,d2,}sequence of len arrays of dimensions d1×d2×
    {"Varying",d1,d2,}varying number of arrays of dimensions d1×d2×


open all close all

Basic Examples  (2)

Create a SequenceReverseLayer:

Click for copyable input

Create a SequenceReverseLayer that expects a sequence of vectors of size 3:

Click for copyable input

Apply the layer to a sequence of vectors:

Click for copyable input

Scope  (3)

Applications  (1)

Possible Issues  (1)

Introduced in 2017