Custom Tensorflow-Keras model

Today I want to share with you how to create a Custom Tensorflow-Keras model. Mainly because is something I just learnd that is very useful, especially when working with particular models structures.

But why whould we create a custom tensorflow-keras model instead of a normal one, maybe with functional APIs and some cycles in it? Why some cycles ? Because 90% of the time a custom model is preferred since makes everything cleaner and easier to create/modify in future. Allow us to write down a single line of code, that may be an entire model (know as submodel, while the operation is submodelling), instead of copying and pasting lines and lines of code…

Lets see what I meant with an example:

(gonna add next days)