({{, (RefLink[SequenceRestLayer, paclet:ref/SequenceRestLayer])[] 
represents a net that takes a sequence of inputs and removes its first element.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[SequenceRestLayer, paclet:ref/SequenceRestLayer])[] represents a net that takes a sequence of arrays and outputs a sequence of arrays of length one less than the input sequence length.

(RefLink[SequenceRestLayer, paclet:ref/SequenceRestLayer])[…][input] explicitly computes the output from applying the layer.

(RefLink[SequenceRestLayer, paclet:ref/SequenceRestLayer])[…][{(Subscript[input, 1]),(Subscript[input, 2]),…}] explicitly computes an output for each of the (Subscript[input, i]).

When given a (RefLink[NumericArray, paclet:ref/NumericArray]) as input, the output will be a (RefLink[NumericArray, paclet:ref/NumericArray]).

(RefLink[SequenceRestLayer, paclet:ref/SequenceRestLayer]) is typically used inside (RefLink[NetChain, paclet:ref/NetChain]), (RefLink[NetGraph, paclet:ref/NetGraph]), etc.

The input and output ports of the net represented by (RefLink[SequenceRestLayer, paclet:ref/SequenceRestLayer])[] are:

(RefLink[SequenceRestLayer, paclet:ref/SequenceRestLayer])["Input"->shape] allows the shape of the input to be specified. Possible forms for shape are:

OpenersPrimaryExamplesSection(Spacer1)Examples  (7)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Create a (RefLink[SequenceRestLayer, paclet:ref/SequenceRestLayer]):

SequenceRestLayer[]

Create a (RefLink[SequenceRestLayer, paclet:ref/SequenceRestLayer]) that expects a sequence of vectors of size 3:

rest=SequenceRestLayer["Input"->{"Varying",3}]

Apply the layer to a sequence:

rest[{{1,2,3},{4,5,6},{7,8,9}}]

OpenersExampleSection1(Spacer1)Scope  (3)

Create a (RefLink[SequenceRestLayer, paclet:ref/SequenceRestLayer]) that expects a length-3 sequence of 2x2 matrices:

rest=SequenceRestLayer["Input"->{3,2,2}]

Apply the layer to a sequence:

rest[{{{1,2},{4,5}},{{7,8},{10,11}},{{12,13},{14,15}}}]

Create a (RefLink[SequenceRestLayer, paclet:ref/SequenceRestLayer]) that expects a sequence of real numbers:

rest=SequenceRestLayer["Input"->"Varying"]

Thread the layer across a batch of inputs:

rest[{{1,2},{4,5,3},{1,5},{6,7,8,9}}]

Create a (RefLink[SequenceRestLayer, paclet:ref/SequenceRestLayer]) that drops the first color channel from an RGB image, turning it into a two-channel image:

rest=SequenceRestLayer["Input"->NetEncoder["Image"],"Output"->NetDecoder["Image"]]

Apply it to an image:

rest[]

OpenersExampleSection3(Spacer1)Possible Issues  (2)

(RefLink[SequenceRestLayer, paclet:ref/SequenceRestLayer]) cannot be applied to sequences of length less than 2:

SequenceRestLayer[]@{2}

(RefLink[SequenceRestLayer, paclet:ref/SequenceRestLayer]) cannot accept symbolic inputs:

rest=SequenceRestLayer[];
rest[{1,2}]

rest[{1,z}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[SequenceMostLayer, paclet:ref/SequenceMostLayer])  ▪  (RefLink[SequenceLastLayer, paclet:ref/SequenceLastLayer])  ▪  (RefLink[SequenceReverseLayer, paclet:ref/SequenceReverseLayer])  ▪  (RefLink[NetMapOperator, paclet:ref/NetMapOperator])  ▪  (RefLink[BasicRecurrentLayer, paclet:ref/BasicRecurrentLayer])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Neural Networks in the Wolfram Language, paclet:tutorial/NeuralNetworksOverview])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Neural Networks, paclet:guide/NeuralNetworks])}})}})