Thank you both for the insightful discussion, and sorry for missing the related earlier discussion (When to use Layers or Model as parent class) – I went straight for the “Week 4” sub-forum and overlooked the general one…
Interesting point about the requirement for a Model’s input to be InputLayers – even though that seems to apply primarily when using Model “neat”, within the context of the Functional API. It is no longer the case for the custom-define subclasses derived in the W4 lectures/lab to construct ResNet (given the specific way the init and call methods are defined). So at least, custom Model subclasses can be made to stack/re-combine as flexibly as custom Layers (but of course with much additional functionality/overhead that may not actually be needed). Does that sound fair?
Inheriting from Layer vs Model for recurring building blocks
Course Q&A
TensorFlow: Advanced Techniques Specialization
Custom Models, Layers and Loss Functions with TF
1 Like