Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

SummationLayer

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

Details and OptionsDetails 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 numerical 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.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Create a summation layer:

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

Create a summation layer 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]=

Apply this layer to multiple inputs:

In[3]:=
Click for copyable input
Out[3]=
Introduced in 2016
(11.0)