Skip to content

Latest commit

 

History

History

custom-layer

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

TensorFlow.js Example: Custom Layer

This example demonstrates how to write a custom layer for tfjs-layers.

We build a custom activation layer called 'Antirectifier' which outputs two channels for each input, one with just the positive signal, and one with just the negative signal. The example shows exercises the call and computeOutputShape overrides of the Layer.

See this example live!