I am writing a custom layer inheriting tensorflow.keras.layers.Layer class as below.
class convolutional_block(tf.keras