Custom layers | TensorFlow Core
www.tensorflow.org › customization › custom_layersNov 11, 2021 · Implementing custom layers. The best way to implement your own layer is extending the tf.keras.Layer class and implementing: __init__ , where you can do all input-independent initialization. build, where you know the shapes of the input tensors and can do the rest of the initialization. call, where you do the forward computation.