WLJS LogoWLJS Notebook

FunctionLayer

FunctionLayer[f] represents a net layer that applies function f to its input.

Examples

Create a function layer that applies ReLU:

FunctionLayer[Ramp]

Apply a custom function:

layer = FunctionLayer[#^2 &];
layer[{1, 2, 3}]

Please visit the official Wolfram Language Reference for more details.

On this page