Also please check how to print summaries with nested models:

  

      github.com/keras-team/keras
  

  
    
  
    
  

  
    
      Print expanded nested layers feature in models.summary() 2
    

    
      keras-team:master ← krishrustagi:changes
    

    
      
        opened 
        
          
        
        Aug 26, 2021
      
      

      
        
          
          krishrustagi
        
      

      
        
          +191
          -19
        
      
    
  


  
    Issue #15250. I am making this PR.
The changes have been made using the recursi…on approach. All the nested layers get summarized one by one.
  

  

  
    
    
  

  


Or plot_model:
  

      github.com/keras-team/keras
  

  
    
  
    
  

  
    
      [P] [RELNOTES] Add ability to visualize wrapped models with plot_model function 1
    

    
      keras-team:master ← yoks:master
    

    
      
        opened 
        
          
        
        Oct 19, 2018
      
      

      
        
          
          yoks
        
      

      
        
          +73
          -20
        
      
    
  


  
    ### Summary
Added two new optional arguments to `plot_model` function in `vis_u…tils.py`, to be able to visualize nested (wrapped) models. Also adds `dpi` param to have ability to produce high resolution graphs.

For example giving this model:
```python
sentence_input = Input(shape=(2, 3), dtype='float32', name="input2")
l_lstm = Bidirectional(LSTM(16))(sentence_input)
sent_encoder = Model(sentence_input, l_lstm)
review_input = Input(shape=(5, 2, 3), dtype='float32')
review_encoder = TimeDistributed(sent_encoder)(review_input)
l_lstm_sent = LSTM(16)(review_encoder)
preds = Dense(5, activation='softmax')(l_lstm_sent)
model = Model(review_input, preds)
vis_utils.plot_model(model, to_file='model3.png', show_shapes=True,
                     expand_nested=True, dpi=300)
```
Will produce:
![model3](https://user-images.githubusercontent.com/3962002/47184729-4d86fe80-d2e0-11e8-903d-cbf5c393f3eb.png)

While calling it without new arguments will produce plot as before:
```python
vis_utils.plot_model(model, to_file='model3.png', show_shapes=True)
```
![model3](https://user-images.githubusercontent.com/3962002/47184794-7a3b1600-d2e0-11e8-8bf0-bc62b1043969.png)

### Related Issues
#5937

### PR Overview

- [x] This PR requires new unit tests [y/n] (make sure tests are included)
- [x] This PR requires to update the documentation [y/n] (make sure the docs are up-to-date)
- [x] This PR is backwards compatible [y/n]
- [x] This PR changes the current API [y/n] (all API changes need to be approved by fchollet)