Model Subclassing (Part 2)
Learn to create DL models using model subclassing in Keras.
Model subclassing uses the superclass Model that’s part of the Keras library. We can follow the steps given below to perform model subclassing. Let’s implement model subclassing in Keras.
Step 1: Define a subclass
To perform model subclassing, we define a subclass and inherit the methods and attributes of the superclass Model.
Line 7: This creates
my_model_class, which is a subclass ofModel.Lines 10 and 11: ...