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)

TotalLayer

TotalLayer[]
represents a net layer taking a list of input tensors and performing elementwise addition on them.

Details and OptionsDetails and Options

  • TotalLayer[][{tensor1,tensor2,}] explicitly computes the output given a list of tensori.
  • TotalLayer exposes the following ports for use in NetGraph etc.:
  • "Input"a list of numerical tensors of arbitrary but equal dimensions
    "Output"a numerical tensor of the same dimension as the inputs
  • TotalLayer 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 TotalLayer.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Create a TotalLayer:

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

Apply this layer to a list of vectors:

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

Construct a NetGraph with a TotalLayer:

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

Apply the NetGraph to some data:

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