Read This Before Building Custom Keras Layers & Models
Content Overview Setup The Layer class: the combination of state (weights) and some computation Layers can have non-trainable weights Best practice: deferring weight creation until the shape of the inputs is known Layers are recursively composable The add_loss() method You can optionally enable serialization on your layers Privileged training argument in the call() method Privileged … Read more