SummationLayer

SummationLayer[]

represents a net layer that sums all of its input elements.

Details and Options

  • SummationLayer[][input] explicitly computes the output from applying the layer.
  • SummationLayer[][{input1,input2,}] explicitly computes outputs for each of the inputi.
  • SummationLayer exposes the following ports for use in NetGraph etc.:
  • "Input"an array of arbitrary rank
    "Output"a real number
  • SummationLayer is typically used inside NetChain, NetGraph, etc.
  • When it cannot be inferred from other layers in a larger net, the option "Input"->{n1,n2,} can be used to fix the input dimensions of SummationLayer.
  • Options[SummationLayer] gives the list of default options to construct the layer. Options[SummationLayer[]] gives the list of default options to evaluate the layer on some data.
  • Information[SummationLayer[]] gives a report about the layer.
  • Information[SummationLayer[],prop] gives the value of the property prop of SummationLayer[]. Possible properties are the same as for NetGraph.

Examples

open allclose all

Basic Examples  (2)

Create a SummationLayer:

Create a SummationLayer with vector input of size 4:

Apply this layer to an input:

Scope  (1)

Ports  (1)

Create a SummationLayer that takes an input array of dimensions 2×3×1:

Apply this layer to an input:

The layer threads across a batch of examples:

Properties & Relations  (2)

SummationLayer computes:

Evaluate on some data:

SummationLayer[] is equivalent to AggregationLayer[Total,All]:

Possible Issues  (1)

SummationLayer cannot accept symbolic inputs:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2023_summationlayer, author="Wolfram Research", title="{SummationLayer}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/SummationLayer.html}", note=[Accessed: 19-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_summationlayer, organization={Wolfram Research}, title={SummationLayer}, year={2016}, url={https://reference.wolfram.com/language/ref/SummationLayer.html}, note=[Accessed: 19-April-2024 ]}