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"a tensor 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.

Examples

open allclose all

Basic Examples  (2)

Create a SummationLayer:

In[1]:=
Click for copyable input
Out[1]=

Create a SummationLayer with vector input of size 4:

In[1]:=
Click for copyable input
Out[1]=

Apply this layer to an input:

In[2]:=
Click for copyable input
Out[2]=

Scope  (1)

Properties & Relations  (1)

Possible Issues  (1)

See Also

TotalLayer  AggregationLayer  NetTrain  NetChain  NetGraph

Introduced in 2016
(11.0)