I am taking this deep learning course from Andrew NG. In the 3rd lecture of 2nd week of the first course, he mentions that we can use RMSE for logistic regression as well but it will take a nonconvex form having a lot of local minima and so gradient descent may not be able to find the global minima. So why using RMSE as loss function makes the cost function as non-convex in logistic regression but convex in case of linear regression?