#For loop iterate over the training set for i in range(60000): #First layer is the input layer0 = X #Second layer can be obtained with the multiplication of each layer #and its synapsis and then running sigmoid function layer1 = sigmoid(np.dot(layer0, syn0)) #Do the same with l1 and its synapsis layer2 = sigmoid(np.dot(layer1,syn1))