This is a similar question to the one we have a bit further down on this page:
Inheriting from Layer vs Model for recurring building blocks
Course Q&A
TensorFlow: Advanced Techniques Specialization
Custom Models, Layers and Loss Functions with TF