looking back at our first example you've reached the end of this and you should now have general understanding of what' going on behind the scenes in neural network let' go back to the first example and review each piece of it in the light of what you've learned in the previous three sections this was the input data(train_imagestrain_labels)(test_imagestest_labelsmnist load_data(train_images train_images reshape(( )train_images train_images astype('float ' test_images test_images reshape(( )test_images test_images astype('float ' now you understand that the input images are stored in numpy tensorswhich are here formatted as float tensors of shape ( (training dataand ( (test data)respectively this was our networknetwork models sequential(network add(layers dense( activation='relu'input_shape=( ,))network add(layers dense( activation='softmax')now you understand that this network consists of chain of two dense layersthat each layer applies few simple tensor operations to the input dataand that these operations involve weight tensors weight tensorswhich are attributes of the layersare where the knowledge of the network persists this was the network-compilation stepnetwork compile(optimizer='rmsprop'loss='categorical_crossentropy'metrics=['accuracy']now you understand that categorical_crossentropy is the loss function that' used as feedback signal for learning the weight tensorsand which the training phase will attempt to minimize you also know that this reduction of the loss happens via minibatch stochastic gradient descent the exact rules governing specific use of gradient descent are defined by the rmsprop optimizer passed as the first argument finallythis was the training loopnetwork fit(train_imagestrain_labelsepochs= batch_size= now you understand what happens when you call fitthe network will start to iterate on the training data in mini-batches of samples times over (each iteration over all the training data is called an epochat each iterationthe network will compute the gradients of the weights with regard to the loss on the batchand update the weights licensed to