# is cost function of logistic regression convex or not? [duplicate]

For logistic regression, the loss function is convex or not? Andrew Ng of Coursera said it is convex but in NPTEL it is said is said it is non convex because there is no unique solution. (many possible classifying line)

$$L = - t \log(p) + (1 - t) \log(1-p)$$
Where $$p = \frac{1}{1 + \exp(-wx)}$$
$$t$$ is target, $$x$$ is input, and $$w$$ denotes weights.
L is twice differentiable with respect to $$w$$ and $$\frac{d}{dw^2} L = \frac{x^2 \exp(wx)}{(1 + \exp(wx))^2} > 0$$, so the loss function is convex.