# NetMapOperator

NetMapOperator[net]

represents a net in which net is mapped over a sequence of inputs to give a sequence of outputs.

# Details and Options • NetMapOperator[net] represents a net that takes a sequence of arrays and outputs a sequence of the same length.
• NetMapOperator[net] accepts a single input sequence {x1,x2,,xn} and computes {net[x1],net[x2],,net[xn]}.
• In NetMapOperator[net], net should take exactly one input and produce exactly one output.
• NetExtract can be used to extract net from a NetMapOperator[net] object.
• The input and output ports of the net represented by NetMapOperator are:
•  "Input" a sequence of arrays "Output" a sequence of arrays
• NetMapOperator[net] can be seen as allowing a form of weight sharing between multiple copies of net, one for each sequence element that is being mapped.
• NetMapOperator[net,"Input"->shape] allows the shape of the input to be specified. Possible forms for shape are:
•  d a vector of size d {d1,d2} a matrix of size d1×d2 {d1,d2,…} an array of shape d1×d2×… {"Varying",d2,d3,…} an array whose first dimension is variable and whose remaining dimensions are d2×d3×…
• When given a NumericArray as input, the output will be a NumericArray.

# Examples

open all close all

## Basic Examples(2)

Create a NetMapOperator that maps a LinearLayer over a sequence:

 In:= Out= Create a NetMapOperator that maps a SummationLayer over a sequence:

 In:= Out= Apply the layer to a sequence of vectors:

 In:= Out= The layer threads across a batch of sequences of different lengths:

 In:= Out= ## Properties & Relations(1)

Introduced in 2017
(11.1)