going beyond the sequential modelthe keras functional api advanced deep-learning best practices until nowall neural networks introduced in this book output have been implemented using the sequential model the sequential model makes the assumption that the layer network has exactly one input and exactly one outputand that it consists of linear stack of layers (see figure this is commonly verified assumptionthe configulayer ration is so common that we've been able to cover many topics and practical applications in these pages so far layer using only the sequential model class but this set of sequential assumptions is too inflexible in number of cases some input networks require several independent inputsothers require multiple outputsand some networks have interfigure sequential nal branching between layers that makes them look like modela linear stack of layers graphs of layers rather than linear stacks of layers some tasksfor instancerequire multimodal inputsthey merge data coming from different input sourcesprocessing each type of data using different kinds of neural layers imagine deep-learning model trying to predict the most likely market price of second-hand piece of clothingusing the following inputsuser-provided metadata (such as the item' brandageand so on) user-provided text descriptionand picture of the item if you had only the metadata availableyou could one-hot encode it and use densely connected network to predict the price if you had only the text description availableyou could use an rnn or convnet if you had only the pictureyou could use convnet but how can you use all three at the same timea naive approach would be to train three separate models and then do weighted average of their predictions but this may be suboptimalbecause the information extracted by the models may be redundant better way is to jointly learn more accurate model of the data by using model that can see all available input modalities simultaneouslya model with three input branches (see figure price prediction merging module dense module rnn module convnet module metadata text description picture figure licensed to mult -input model