Early learning of the optimal constant solution in neural networks and humans