represents a net in which mapnet is mapped over one or more inputs to give one or more outputs.

represents a net in which mapnet is mapped over its inputs at depth n.

represents a net in which mapnet is mapped over the input named inputi at depth ni, and all other inputs are replicated.

Details and Options

• NetMapThreadOperator[mapnet] represents a net that takes the same number of arrays as mapnet and produces the same number of arrays as mapnet, but repeatedly applies mapnet to corresponding elements of the inputs.
• NetMapThreadOperator[mapnet] effectively maps mapnet simultaneously over the first level of each of its inputs. These inputs must have the same length.
• NetMapThreadOperator[mapnet,n] effectively applies mapnet at level n to its inputs, and hence expects n additional dimensions over the inputs and outputs of mapnet.
• Therefore, if mapnet takes an input of rank i and produces an output of rank o, NetMapThreadOperator[mapnet,n] takes an input of rank n+i and produces an output of rank n+o.
• NetMapThreadOperator[mapnet,{"input1"n1,,"inputk"nk}] effectively maps mapnet at level n=Max[{n1,,nk}] by replicating those inputs with ni<n as appropriate.
• Specifying "inputi"->0 is equivalent to omitting the input from the level specification and means that the unmodified input is supplied to each mapped application of subnet unchanged.
• NetMapThreadOperator[net] can be seen as allowing a form of weight sharing between multiple copies of net, one for each element that is being mapped.
• NetExtract can be used to extract mapnet from a NetMapThreadOperator[mapnet] object.
• NetMapThreadOperator[net,"inputi"shape] allows the shape of the individual inputs 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 remaining dimensions are d2×d3×…
• The following training parameter can be included:
•  LearningRateMultipliers Automatic learning rate multipliers for trainable arrays in the net
• NetExtract allows access to the forward and reverse nets via "Net".
• Options[NetMapThreadOperator] gives the list of default options to construct the operator. Options[NetMapThreadOperator[]] gives the list of default options to evaluate the operator on some data.
• Information[NetMapThreadOperator[],prop] gives the value of the property prop of . Possible properties are the same as for NetGraph.

Examples

Basic Examples(3)

Map a MeanAbsoluteLossLayer over corresponding inputs and targets to produce a vector of losses:

Map a MeanAbsoluteLossLayer at level 2 of input and target matrices to produce a result matrix:

Map a MeanAbsoluteLossLayer at level 1 of the input vector only, replicating the target vector: