OrderingLayer
represents a net layer that effectively applies Ordering to its input.
gives the first n elements in the ordering of its input.
OrderingLayer[-n]
gives the last n elements in the ordering of its input.
Details and Options
- OrderingLayer[…][input] explicitly computes the output from applying the layer to input.
- OrderingLayer[…][{input1,input2,…}] explicitly computes outputs for each of the inputi.
- When given a NumericArray as input, the output will be a NumericArray.
- OrderingLayer exposes the following ports for use in NetGraph etc.:
-
"Input" a vector "Output" a vector of integer positions - OrderingLayer is typically used inside NetChain, NetGraph, etc.
- OrderingLayer normally infers the size of its input from its context in NetChain etc. The length l of the input vector can be specified using OrderingLayer["Input"l].
- OrderingLayer["Input"shape] allows the shape of the input port to be specified. Possible forms of shape are:
-
l a vector of length l "Varying" a vector whose length is variable NetEncoder[…] an encoder - OrderingLayer[] is equivalent to OrderingLayer[All].
- OrderingLayer performs the same computation as Ordering.
- Options[OrderingLayer] gives the list of default options to construct the layer. Options[OrderingLayer[…]] gives the list of default options to evaluate the layer on some data.
- Information[OrderingLayer[…]] gives a report about the layer.
- Information[OrderingLayer[…],prop] gives the value of the property prop of OrderingLayer[…]. Possible properties are the same as for NetGraph.
Examples
open allclose allBasic Examples (1)
Create an OrderingLayer:
Scope (3)
Arguments (2)
Create an OrderingLayer that returns the positions of the 4 smallest elements:
Create an OrderingLayer that returns the positions of the 4 largest elements:
Ports (1)
Create an OrderingLayer that returns the positions of the 4 smallest elements and takes a vector of length 8:
Properties & Relations (1)
OrderingLayer performs the same computation as Ordering:
Text
Wolfram Research (2019), OrderingLayer, Wolfram Language function, https://reference.wolfram.com/language/ref/OrderingLayer.html.
CMS
Wolfram Language. 2019. "OrderingLayer." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/OrderingLayer.html.
APA
Wolfram Language. (2019). OrderingLayer. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/OrderingLayer.html