WLJS LogoWLJS Notebook

ThreadingLayer

ThreadingLayer[f] represents a net layer that takes several input arrays and applies a function f to corresponding array elements.

  • ThreadingLayer[f, bspec] allows array shapes to be conformed according to broadcasting specification bspec.

Examples

Element-wise addition:

ThreadingLayer[Plus]

Element-wise multiplication:

ThreadingLayer[Times]

In a network:

net = NetChain[{LinearLayer[10], ThreadingLayer[Ramp]}];

Please visit the official Wolfram Language Reference for more details.

On this page