getting started with neural networks picking the right network architecture is more an art than scienceand although there are some best practices and principles you can rely ononly practice can help you become proper neural-network architect the next few will both teach you explicit principles for building neural networks and help you develop intuition as to what works or doesn' work for specific problems loss functions and optimizerskeys to configuring the learning process once the network architecture is definedyou still have to choose two more thingsloss function (objective function)--the quantity that will be minimized during training it represents measure of success for the task at hand optimizer--determines how the network will be updated based on the loss function it implements specific variant of stochastic gradient descent (sgda neural network that has multiple outputs may have multiple loss functions (one per outputbut the gradient-descent process must be based on single scalar loss valuesofor multiloss networksall losses are combined (via averaginginto single scalar quantity choosing the right objective function for the right problem is extremely importantyour network will take any shortcut it canto minimize the lossso if the objective doesn' fully correlate with success for the task at handyour network will end up doing things you may not have wanted imagine stupidomnipotent ai trained via sgdwith this poorly chosen objective function"maximizing the average well-being of all humans alive to make its job easierthis ai might choose to kill all humans except few and focus on the well-being of the remaining ones--because average well-being isn' affected by how many humans are left that might not be what you intendedjust remember that all neural networks you build will be just as ruthless in lowering their loss function--so choose the objective wiselyor you'll have to face unintended side effects fortunatelywhen it comes to common problems such as classificationregressionand sequence predictionthere are simple guidelines you can follow to choose the correct loss for instanceyou'll use binary crossentropy for two-class classification problemcategorical crossentropy for many-class classification problemmeansquared error for regression problemconnectionist temporal classification (ctcfor sequence-learning problemand so on only when you're working on truly new research problems will you have to develop your own objective functions in the next few we'll detail explicitly which loss functions to choose for wide range of common tasks licensed to