ThreadingLayer

ThreadingLayer[f]

represents a net layer that takes two input tensors and applies a function f to corresponding tensor elements.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Create a ThreadingLayer using Times as the function to be threaded:

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

Create a ThreadingLayer and apply it to a pair of inputs:

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

Apply the layer to a pair of inputs:

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

Create a NetGraph that contains a ThreadingLayer:

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

Apply the layer to two vectors:

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

Scope  (3)

Applications  (1)

Possible Issues  (3)

See Also

ElementwiseLayer  ThreadingLayer  NetChain  NetGraph  NetTrain  SoftmaxLayer  DropoutLayer

Tutorials

Introduced in 2017
(11.1)
| Updated in 2018
(11.3)