Asked
            
        
        
            Active
            
        
            Viewed 192 times
        
    -3
            
            
         
    
    
        desertnaut
        
- 57,590
- 26
- 140
- 166
 
    
    
        Vishal Singh
        
- 3
- 1
- 
                    Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Oct 18 '22 at 05:28
- 
                    Welcome to SO; please post the relevant code *here*, *not* in external repos; see how to create a [mre[. – desertnaut Oct 18 '22 at 16:29
1 Answers
0
            In the code from your link, the model outputs is defined as [decoder_outputs2] + dec_states2, where decoder_outputs2 seems to be an output from a Dense layer, and dec_states2 is a list of outputs from some other layers (dec_states = [decoder_state_h, decoder_state_c]). Therefore both [decoder_outputs2] and dec_states2 are python lists and can be concatenated using + (see How do I concatenate two lists in Python?).
Doing outputs=[decoder_outputs2] + dec_states2 means the model will have three outputs. It is equivalent to specifying outputs=[decoder_outputs2, decoder_state_h, decoder_state_c], the latter option definitely being more readable.
 
    
    
        druskacik
        
- 2,176
- 2
- 13
- 26
- 
                    1Kindly refrain from answering such off-topic questions, as advised in the [community guidelines](https://meta.stackoverflow.com/a/276637/4685471). – desertnaut Oct 18 '22 at 16:31