model building the model building process with keras is three-step process the first step is specifying the structure of the model this is done by configuring the base model that we want to usewhich is either sequential model or functional model once we have identified base model for our problem we will further enrich that model by adding layers to the model we will start with the input layerto which we will feed our input data feature vectors the subsequent layers to be added to the model are based on requirements of the model keras provides bunch of layers which can be added to the model (hidden layersfully connectedcnnlstmrnnand so on)we will describe some of them while running through our neural network example we can stack these layers together in complex manner and add the final output layerto arrive at our overall model architecture the next step in the model learning process is the compilation of the model architecture that we defined in the first step based on what we learned in the preceding sections on theano and tensorflowmost of the model building steps are symbolic and the actual learning is deferred until later in the compilation stepwe configure the learning process the learning processin addition to the structure of the modelneeds to specify the following additional three important parametersoptimizerwe learned in the first that the simplest explanation of learning process is the optimization of loss function once we have the model and the loss functionwe can specify the optimizer that will identify the actual optimization algorithm or program we will useto train the model and minimize the loss or error this could be string identifier to the already implemented optimizersa functionor an object to the optimizer class that we can implement loss functiona loss functionalso known as an objective functionwill specify the objective of minimizing loss/errorwhich our model will leverage to get the best performance over multiple epochs\iterations it again can be string identifier to some pre-implemented loss functions like cross-entropy loss (classificationor mean squared error (regressionor it can be custom loss function that we can develop performance metricsa metric is quantifiable measure of the learning process while compiling modelwe can specify performance metric we want to track (for exampleaccuracy for classification model)which will educate us about the effectiveness of the learning process this helps in evaluating model performance the last step in the model building process is executing the compiled method to start the training process this will execute the lower level compiled code to find out the necessary parameters and weights of our model during the training process in keraslike scikit-learnit is achieved by calling the fit function on our model we can control the behavior of the function by supplying appropriate arguments you can learn about these arguments at learning an example neural network we will conclude this section by building simple working neural network model on one of the datasets that comes bundled with the scikit-learn package we will use the tensorflow backend in our examplebut you can try to use theano backend and verify the execution of model on both the backends for our examplewe will use the wisconsin breast cancer datasetwhich is bundled with the scikit-learn library the dataset contains attribute drawn from digitized image of fine needle aspirate of breast mass they describe characteristics of the cell nuclei present in the image on the basis of those attributesthe mass can be marked as malignant or benign the goal of our classification system is to predict that level so let' get started by loading the dataset