I've been thinking about the idea of replacing the classic gradient descent algorithm with an algorithm that is less sensitive to a local optimum. I was thinking about particle swarm optimization (PSO), which thus tries to select the best weights and biases for the model.
But I've seen everywhere that only one hidden layer is used (no one explains why just one layer is being used) and all those codes break when I try to use more than one hidden layer, so the questions are:
Can't PSO be used to optimize an Artificial Neural Network with more than one hidden layer?
In that case, why is that?