Training the neural network for navigation