I have implemented a deep NN architecture using model subclassing. In case of this architecture there is a custom loss which is a summation of loss taken at different points