title: Inheritance vs composition in keras -- Why is Model inherited from Network
body: <p>Hi I am trying to set up my own deep learning framework for my specific domain and <a href="https://blog.keras.io/user-experience-design-for-apis.html" rel="nofollow noreferrer">this post</a> by @fchollet, the author of keras, helped me a lot. However I have a question regarding one specific design decision of keras, that Model is a class inherited from Network.</p>
  
  <p>If I were tasked to design the framework, I would perhaps use Network as one component of Model, instead of the parent class. I understand this is linked to the classic principle of <a href="https://en.wikipedia.org/wiki/Composition_over_inheritance" rel="nofollow noreferrer">"composition over inheritance"</a>. I was just wondering why keras chose inheritance over composition in this case. Is this because Network is not used as a component elsewhere? (In other words, Model is the top level abstraction?)</p>
  
  <p>Any comments are welcome. Thanks!</p>