SequenceIndicesLayer
represents a net layer that produces a list of indices for an input sequence.
Details and Options
- SequenceIndicesLayer[…] takes a sequence of arrays and outputs a sequence of integers of the same length.
- SequenceIndicesLayer is typically used inside NetChain, NetGraph, etc.
- The following optional parameter can be included:
-
"Maximum" Infinity maximum index to output - SequenceIndicesLayer["Maximum"max] corresponds to the function Min[max,Range[Length[#]]]&.
- The input and output ports of the net represented by SequenceIndicesLayer[] are:
-
"Input" a sequence of n arrays "Output" a sequence of n arrays - SequenceIndicesLayer["Input"shape] allows the shape of the input to be specified. Possible forms for shape include:
-
n a 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×… - Options[SequenceIndicesLayer] gives the list of default options to construct the layer. Options[SequenceIndicesLayer[…]] gives the list of default options to evaluate the layer on some data.
- Information[SequenceIndicesLayer[…]] gives a report about the layer.
- Information[SequenceIndicesLayer[…],prop] gives the value of the property prop of SequenceIndicesLayer[…]. Possible properties are the same as for NetGraph.
Examples
open allclose allBasic Examples (1)
Create a SequenceIndicesLayer that expects a sequence of vectors of size 3:
Scope (2)
Ports (2)
Create a SequenceIndicesLayer that expects a length-3 sequence of 2x2 matrices:
Apply the layer to a sequence:
Create a SequenceIndicesLayer that expects a sequence of real numbers:
Options (1)
"Maximum" (1)
Create a SequenceIndicesLayer that returns a maximum index of 3:
Possible Issues (1)
SequenceIndicesLayer cannot accept symbolic inputs:
Text
Wolfram Research (2021), SequenceIndicesLayer, Wolfram Language function, https://reference.wolfram.com/language/ref/SequenceIndicesLayer.html.
CMS
Wolfram Language. 2021. "SequenceIndicesLayer." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SequenceIndicesLayer.html.
APA
Wolfram Language. (2021). SequenceIndicesLayer. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SequenceIndicesLayer.html