advanced deep-learning best practices model compile(optimizer='rmsprop'loss={'age''mse''income''categorical_crossentropy''gender''binary_crossentropy'}loss_weights={'age' 'income' 'gender' }equivalent (possible only if you give names to the output layersmuch as in the case of multi-input modelsyou can pass numpy data to the model for training either via list of arrays or via dictionary of arrays listing feeding dat mult -out put model model fit(posts[age_targetsincome_targetsgender_targets]epochs= batch_size= model fit(posts{'age'age_targets'income'income_targets'gender'gender_targets}epochs= batch_size= equivalent (possible only if you give names to the output layersage_targetsincome_targetsand gender_targets are assumed to be numpy arrays directed acyclic graphs of layers with the functional apinot only can you build models with multiple inputs and multiple outputsbut you can also implement networks with complex internal topology neural networks in keras are allowed to be arbitrary directed acyclic graphs of layers the qualifier acyclic is importantthese graphs can' have cycles it' impossible for tensor to become the input of one of the layers that generated the only processing loops that are allowed (that isrecurrent connectionsare those internal to recurrent layers several common neural-network components are implemented as graphs two notable ones are inception modules and residual connections to better understand how the functional api can be used to build graphs of layerslet' take look at how you can implement both of them in keras inception modules inception is popular type of network architecture for convolutional neural networksit was developed by christian szegedy and his colleagues at google in - inspired by the earlier network-in-network architecture it consists of stack of modules that themselves look like small independent networkssplit into several parallel branches the most basic form of an inception module has three to four branches starting with convolutionfollowed by convolutionand ending with the concatenation of the resulting features this setup helps the network separately learn min linqiang chenand shuicheng yan"network in network,international conference on learning representations ( )licensed to