NetNestOperator

NetNestOperator[net,n]

represents a net in which net is applied n times to the input.

Details and Options

  • NetNestOperator[net,n] accepts a single input array s0 and produces an output array sn, computed by applying net repeatedly to si-1 to compute si .
  • In NetNestOperator[net,n], net should take exactly one input and produce exactly one output. The input and output must be of the same dimensions.
  • NetNestOperator exposes the following ports for use in NetGraph etc.:
  • "Input"the initial state s0
    "Output"the final state sn
  • If net contains trainable parameters, the same parameters are used for every application of net to the input.
  • If net has no trainable parameters, NetNestOperator[net,n] is equivalent to a NetChain containing n copies of net.
  • The following training parameter can be included:
  • LearningRateMultipliersAutomaticlearning rate multipliers for trainable arrays in the net
  • NetExtract allows access to the forward and reverse nets via "Net".
  • Options[NetNestOperator] gives the list of default options to construct the operator. Options[NetNestOperator[]] gives the list of default options to evaluate the operator on some data.
  • Information[NetNestOperator[]] gives a report about the operator.
  • Information[NetNestOperator[],prop] gives the value of the property prop of NetNestOperator[]. Possible properties are the same as for NetGraph.

Examples

open allclose all

Basic Examples  (1)

Create a net that applies a LinearLayer 10 times:

Randomly initialize the net and apply it to an input:

Neat Examples  (1)

Distort an image by nesting convolutions and poolings. First, create a chain that applies a convolution, pooling and a nonlinearity:

Create a net the applies the chain 30 times:

Randomly initialize the net and apply it to a test image:

Create a gallery of the results from different random initializations:

Wolfram Research (2017), NetNestOperator, Wolfram Language function, https://reference.wolfram.com/language/ref/NetNestOperator.html (updated 2020).

Text

Wolfram Research (2017), NetNestOperator, Wolfram Language function, https://reference.wolfram.com/language/ref/NetNestOperator.html (updated 2020).

CMS

Wolfram Language. 2017. "NetNestOperator." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/NetNestOperator.html.

APA

Wolfram Language. (2017). NetNestOperator. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NetNestOperator.html

BibTeX

@misc{reference.wolfram_2024_netnestoperator, author="Wolfram Research", title="{NetNestOperator}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/NetNestOperator.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_netnestoperator, organization={Wolfram Research}, title={NetNestOperator}, year={2020}, url={https://reference.wolfram.com/language/ref/NetNestOperator.html}, note=[Accessed: 21-December-2024 ]}