AppendLayer

AppendLayer[]

represents a net layer that takes an input array and appends another array to it.

Details and Options

  • AppendLayer exposes the following input ports for use in NetGraph etc.:
  • "Input"an array of rank n
    "Element"an array of rank n-1
  • AppendLayer exposes the output port "Output", which is an array of rank n.
  • AppendLayer is typically used inside NetGraph.
  • AppendLayer["port"->shape] allows the shape of the input or element port to be specified. Possible forms for shape are:
  • "Real"a single real number
    "Integer"a single integer
    na vector of length n
    {n1,n2,}an array of dimensions n1×n2×
    {"Varying",n2,n3,}an array whose first dimension is variable and remaining dimensions are n2×n3×
  • AppendLayer[][<|"Input"in,"Element"elem|>] explicitly computes the output from applying the layer, which is effectively given by Append[in,elem].
  • AppendLayer[][<|"Input"{in1,in2,},"Element"{element1,element2,}|>] explicitly computes outputs for each of the ini and elementi.
  • When given a NumericArray as input, the output will be a NumericArray.
  • Options[AppendLayer] gives the list of default options to construct the layer. Options[AppendLayer[]] gives the list of default options to evaluate the layer on some data.
  • Information[AppendLayer[]] gives a report about the layer.
  • Information[AppendLayer[],prop] gives the value of the property prop of AppendLayer[]. Possible properties are the same as for NetGraph.

Examples

open allclose all

Basic Examples  (2)

Create an AppendLayer:

Create an AppendLayer that takes a vector as input and appends a scalar:

Apply this layer to inputs:

Scope  (1)

Create an AppendLayer that takes a sequence of vectors represented by a matrix as input and appends another vector to it:

Apply this layer to inputs:

Wolfram Research (2018), AppendLayer, Wolfram Language function, https://reference.wolfram.com/language/ref/AppendLayer.html.

Text

Wolfram Research (2018), AppendLayer, Wolfram Language function, https://reference.wolfram.com/language/ref/AppendLayer.html.

CMS

Wolfram Language. 2018. "AppendLayer." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AppendLayer.html.

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_appendlayer, organization={Wolfram Research}, title={AppendLayer}, year={2018}, url={https://reference.wolfram.com/language/ref/AppendLayer.html}, note=[Accessed: 21-November-2024 ]}