Training morphological neural networks with gradient descent: some theoretical insights