I have a model made like this:
class MyModel(tf.keras.Model): def __init__(self, input_shape, dropout_ratio=0.25,