OrderingLayer

OrderingLayer[]

represents a net layer that effectively applies Ordering to its input.

OrderingLayer[n]

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

Examples

open allclose all

Basic Examples  (1)

Create an OrderingLayer:

Apply the layer to a vector:

Scope  (2)

Create an OrderingLayer that returns the positions of the 4 smallest elements:

Apply the layer to a vector:

Create an OrderingLayer that returns the positions of the 4 largest elements:

Apply the layer to a vector:

Properties & Relations  (1)

OrderingLayer performs the same computation as Ordering:

Possible Issues  (1)

Element specifications cannot be zero:

Introduced in 2019
 (12.0)