I am using Keras, actually tensorflow.keras to be specific and want to know if it is possible to create reusable blocks of inbuilt Keras layers. For example I would like to repeatedly use the following block at different times in my model.
conv1a = Conv3D(filters=32, strides=(1, 1, 1), kernel_size=(3, 3, 3), padding='same')(inputs)
bn1a = BatchNormalization()(conv1a)
relu1a = ReLU()(bn1a)
conv1b = Conv3D(filters=32, strides=(1, 1, 1), kernel_size=(3, 3, 3), padding='same')(relu1a)
bn1b = BatchNormalization()(conv1b)
relu1b = ReLU()(bn1b)
I have read about creating custom layers in Keras but I did not find the documentation to be clear enough.
Any help would be appreciated.